Write a Java program to take a string & a number(N) from the user and print the string made starting with char 0, and then every Nth char of the string.
Q: For a variety of reasons, it is not practical to keep instructions and data in primary memory while ...
A: -two reasons may be 1.because primary memory stores instructions and data of currently executing pro...
Q: Why has PDF become the most widely used document exchange format?
A: Introduction: Most popular format for sharing documents: The properties of PDF make it an excelle...
Q: Explain what the EFS encryption key and BitLocker Drive Encryption are and how they work.
A: Introduction: EFS works by encrypting files with the File Encryption Key, or FEK, a bulk symmetric k...
Q: Task 2: Write the function HistogramEqualize which takes an 8-bit image (img) then calculate the new...
A: Algorithm to do Histogram-Equalization to an image: calculate the frequency for each pixel intensit...
Q: To begin with, the contents of the user's Documents directory are displayed in the Open dialog box b...
A: C# OpenFileDialog C# OpenFileDialog control allows us to browse and select files on a computer in an...
Q: When it comes to hardware, how can we make a single processor do more with less money?
A: Basically on single processor there is one cpu which capable of excecuting the instructions.The most...
Q: It is possible to distinguish two different services provided by database logs. What or who are they...
A: Introduction: Every database management system requires a database log, also known as a transaction ...
Q: Q ) Weight initialization should generate random numbers in the range [-r,r]. Please provide the pyt...
A: Using numpy random.randint() method to generate random numbers. Python provides a random module to g...
Q: Using java: Input the row number and display the sum of all numbers in that row. 2 6 8 12 32 54 8 5 ...
A: The first row is indexed by 0 and thus if we input row number n, then we will calculate the sum of e...
Q: What is the difference between Hadoop and Apache Spark?
A: Introduction: Hadoop is an open source system for storing and analysing huge volumes of data across ...
Q: What issues can be identified in the router layer 2 protocol? Why does an ICMP request work on a PPP...
A: Introduction: The router switches the connect on OSI layer 2, which is the data link layer.
Q: Is it acceptable to use cyber attacks against an organization or group in certain circumstances, and...
A: Is it acceptable to use cyber attacks against an organization or group in certain circumstances, and...
Q: Given: Language L2 = {w ϵ {a,b}* | w contains substring aab} Construct the DFA representing the g...
A:
Q: Which of the following best explain what a batch program is? A. Batch program typically are progr...
A: Answer: A. Batch program typically are program that automatically executes its instruction once its ...
Q: C++ is a programming language that can be used to Make a program that calculates the volume of diff...
A: C++ Program: #include <iostream>using namespace std; // Make a constant for piconst float pi =...
Q: What exactly is the Pretest loop?
A: The while and for statements are the pretest loop
Q: 1) Write pseudocode that reads two numbers and multiplies them together and print out their product.
A: Pseudocode : 1. read number to n1 2. read another number to n2 3. calculate product and save it into...
Q: Parts of a Resume (Fresh graduate): Arrange the parts of the resume according to their correct seque...
A: G. Name D. Contact Numbers H. Career Objective C. Work related Experience F. Skills and abilities
Q: In C++, how to read a number with decimal in input file and write that decimal number in output file...
A: To read the third line string name, you can continue using fin >> name3 so that the next conte...
Q: django python backend create a table in the data base to add an optional activity level, level 1 pow...
A: django python backend create a table in the data base to add an optional activity level, level 1 pow...
Q: Declare a structure variable hotel of the above HOTEL structure type which can hold 50 hotel room re...
A: Here is the solution with an output:-
Q: C++ PROGRAMMING EXERCISE Given an array of integers below, write a program to reverse all the elemen...
A: Required:- C++ PROGRAMMING EXERCISE Given an array of integers below, write a program to reverse all...
Q: In the field of data structures and algorithms, what is the binary tree, in which every node has eit...
A: Extended binary tree is a binary tree in which each node has either zero or two offspring.
Q: An expert system applies reasoning to answer questions, but cannot explain the reasorung pruc asked ...
A: True -an expert system is not creative, can't produce creative output for different scenarios.
Q: With the help of an example, distinguish between the Java classes GenericServlet and HttpServlet.
A: Introduction: In this answer, I will show you how to tell the javas Generic Servlet from the HTTP Se...
Q: Make a compelling case for why the SSL and SSH protocols are incompatible with deep packet inspectio...
A: Introduction: SSL (Secure Sockets Layer) and its successor, TLS (Transport Layer Security), are prot...
Q: (Practice) Convert the following numbers from scientific notation into standard decimal form: a. 2.6...
A: Below is the answer to above both parts. I hope this will meet your requirements..
Q: 18. In the program of Fig. 2.9, what is the advantage of writing (on line 107) MAXLEN EQU BUFEND-BUF...
A: Expressions:- Absolute expressions and relative expressions are two types of expressions relative e...
Q: C++ PROGRAMMING EXERCISE Given an array of integers below, write a program to reverse all the elemen...
A: Algorithm: Start Read array size n Read n numbers and store them in an array named a Iterate throug...
Q: Convert the following base numerals. a. 1430 to base 4 b. 13127 to decimal
A: The required conversions are done by using the number system principles as described in the next ste...
Q: Explain the XML (Extensible Markup Language) language's fundamental concepts.
A: Introduction: The text-based markup language Extensible Markup Language (XML) establishes a set of r...
Q: What strategies do firewalls use to block access to your logical ports?
A: Introduction: Firewalls protect our computers and networks from external cyber attackers by screenin...
Q: Which is more difficult for compilers to implement, VLIW or superscalar? Which architecture presents...
A: VLIW Processor: Computer processor in which a language compiler breaks program instruction down in...
Q: ecause both cache memory and random access memory (RAM) are transistor-based, it is unclear why cach...
A: Introduction: Transistors are semiconductor devices that are used to amplify or switch electrical si...
Q: ef or
A: given - What happens when you use either the ref or out keyword with an array parameter and see what...
Q: Create a Python statement that opens a text file named someStuff.txt for output and saves the conten...
A: Algorithm: Start Set filename="someStuff.txt" and readfile="demo.txt" Open filename file in write m...
Q: Unique Words (Use python) Implement an abstract data type class which takes in a given input file c...
A: Introduction Unique Words (Use python) Implement an abstract data type class which takes in a gi...
Q: Why is communication important in DSS?
A: Answer:
Q: Task 1: Write the function ImageHistogram which takes an 8-bit image (img) and an integer (k) that r...
A: According to the information given:- we have to write a function ImageHistogram
Q: Discuss three applications where discrete event simulation was employed.
A: Introduction: System performance, inventory planning/management, production planning and scheduling,...
Q: Write a Java program to take a string & a number(N) from the user and print the string made starting...
A: Required:- Write a Java program to take a string & a number(N) from the user and print the strin...
Q: e temperature at a certain location is modeled by the equation: T(t) = 41.45 - 31 cos (2at) + 12 sin...
A: Code: syms t ndays T(t)=41.45-31*cos(2*pi*t)+12*sin(365.25*2*pi*t)+(2/(1+exp(-0.2*t))); Tavg(ndays)=...
Q: How does the National Security Agency (NSA) recruit for information security positions? Visit its We...
A: NSA positions in information security The National Security Agency (NSA) has the task of gathering f...
Q: What is the function of a broadband modem? List two modulation techniques you're familiar with
A: Introduction: A broadband modem enables users to connect to the internet through modem on their comp...
Q: Why do we use commutative filters in DBMS?
A: In this question, we are going to discuss why we are going for commutative filters in DBMS.
Q: What are the advantages of implementing Hadoop?
A: Hadoop Hadoop is just the tool that is used in the big data to manage the huge amount of data and ex...
Q: process d an output enab-
A: As per protocol, allowed to answer first question and post the remaining in the next submission.
Q: Systems analysts and programmers, according to the information in Chapter 6, turn objects into modul...
A: Introduction: Modular design is a technique for analyzing complicated systems. The interface is segm...
Q: When you want to get money from your checking account, you use the ATM machine to do it How many ste...
A: Introduction: Assume a user withdraws money from his account at an ATM machine. Assume he took out $...
Q: You can talk about the current and future issues with databases.
A: Given: You can talk about the current and future issues with databases.
Step by step
Solved in 2 steps with 1 images
- java: Run length coding is a method to represent a string in a more compact manner. Each character that occurs more than 2 times in a row is represented by the character and a number following it. Two examples are: "abba" → "abba""abcccbbbba" → "abc3b4a"Write a function that calculates how many characters the encoded string is shorter than the original.JAVA Write a java program that takes a string as input from the user and finds out if the string is a palindrome or not. A string is a palindrome if it reads the same from forward as well as from backward. For example, the string “madam” is a palindrome. Use a for loop to solve this problem. Sample inputs and outputs: Input: madam Output: palindrome Input: Dad Output: palindrome Input: hello Output: not a palindromeWrite in Java: Write a program that takes in a positive integer as input, and outputs a string of 1's and 0's representing the integer in binary. For an integer x, the algorithm is: As long as x is greater than 0 Output x % 2 (remainder is either 0 or 1) x = x / 2 Note: The above algorithm outputs the 0's and 1's in reverse order. You will need to write a second function to reverse the string. Ex: If the input is: 6 the output is: 110 Your program must define and call the following two methods. The method integerToReverseBinary() should return a string of 1's and 0's representing the integer in binary (in reverse). The method reverseString() should return a string representing the input string in reverse. public static String integerToReverseBinary(int integerValue)public static String reverseString(String inputString) LabProgram.java: import java.util.Scanner; public class LabProgram {/* Define your method here */ public static void main(String[] args) {/* Type your code…
- Write a java program that generates random string called str of 10 characters from the English alphabet (lower and upper case) and then find the longest sequence of characters from str that is also a substring in your First Name called matchStr. The program should display: 1) The string str. 2) Your first name 3) The longest sequence matchStr. Note: In Random String str we can have at most two subsequent similar letters (we can have Aa but not AaA or aaa) Example: Suppose the generated random String is "AmedMoXMha" Name is "Mohamed" Output: Str = "Amed MOXMha" Name = "Mohamed" MatchStr = "medWrite a java program that generates random string called str of 10 characters from the English alphabet (lower and upper case) and then find the longest sequence of characters from str that is also a substring in your First Name called matchStr. The program should display: 1) The string str. 2) Your first name 3) The longest sequence matchStr. Note: In Random String str we can have at most two subsequent similar letters (we can have Aa but not AaA or aaa) Example: Suppose the generated random String is “AmedMoXMha” Name is “Mohamed” Output: Str = “AmedMoXMha” Name = “Mohamed” MatchStr = “med”: Write a java program that count the number of letters in a String and find the first occurrence of S, U, I, T in the String and return indices of S, U, I, T. Join the three initialized Strings string1, string2, and string3. Count the number of white spaces in the complete string. Use toUpperCase() and replaceAll("\\s", "") methods to convert string into Upper Case and remove all white Spaces from the string. Count the number of letters in the string. Find the first occurrence of S, U, I, T in the String and return indices of S, U, I, T. Strings are given below: String string1 = "Globalization and Information Technology continue to process at a dramatic pace" String string2 = "To answer the demand of a changing society Pakistan higher education system needs to shift its focus from individuals who simply absorb knowledge to those who are able to creatively utilize knowledge to excel in unfamiliar situations"; String string3 = "These creative individuals should be able to track…
- Please &-. Write a Java program to check if a given string is a palindrome or not. A palindrome is a word, phrase, number, or other sequence of characters that reads the same backward as forward, ignoring spaces, punctuation, and capitalization. For example, "racecar" and "Madam" are palindromes, while "hello" and "Java" are not. Your program should take a string as input and return true if it's a palindrome, and false otherwise. Ik.?In Java write a program to read Input a string and find number of lowercase alphabets in it.JAVA a and b are int variables containing values, and a > b.Write a for loop that prints numbers from a to b (both inclusive) divisible by 7.(Example: if a=74, b=16, then it will print 70 63 56 .... 21)Write only the for loop with its block, nothing else.
- 1. Write a Java program that will read numbers between 1 and 14 and will output the appropriate symbol for a playing card of that rank (use switch). For cards between 2 and 10 just print the rank, for 1 and 11 print "Ace", for 12 print "Jack", for 13 print "Queen", and for 14 print "King". Use a for loop to read and process n cards (input from user). Your program should also handle invalid input.Using Do-While Loop in Java Create a program that let the user input ten (10) positive integers. Then, it would be able to tell and print as to how many numbers are below 20, how many numbers typed are from 20 to 29, and how many are over 29.Write a program to reverse a string except the special characters or numbers in JAVA NOTE : pls provide explanation line by line for ex : String s = "test12pop90java989pyt"; output: "tset12pop90avaj989typ"