Write a Java program StringProg which creates a Scanner and then does the following: 1. Ask the user to enter their full name using prompt "Enter your full name: ". 2. Get the full name and store it in a variable. The full name could have several words separated by single spaces with possible one or more spaces at both sides. 3. Ask the user to enter an integer as the starting index for a substring using prompt "Enter an integer as the starting index for a substring: ". 4. Get the integer and store it in a variable.
Q: OPERATING SYSTEM Briefly describe the workflow and control handoffs used to execute a system call 2...
A: According to answering policy we are allowed to answer only one question.Please resubmit the remaini...
Q: 11. Solve the given logic circuit and find the Boolean expression for the output variable Y. A B
A: Solve the given logic circuit and find the Boolean expression for the output variable Y.
Q: Describe the steps you might take to learn how the computers were bought, used, and accounted for.
A: Computers: An computer is a machine that can react to commands and carry out logical and mathematic...
Q: Increased worker specialisation, along with higher levels of output, may lead to worker demotivation...
A: Introduction: Thus, a manager's care for people ranges from low to high, whereas his or her concern ...
Q: xplain the significance of encoded data, as well as hashing and encoding. What is the main differ...
A: Introduction: It's all encoded in a string of ones and zeros communicated across a communication med...
Q: Use C sharp language and code must get compiled in visual studio. ---------------------------------...
A: Here are some points to note exceptions can be caught by using try and catch block try block is u...
Q: Machine learning/deeplearning in additive manufacturing how to find projects or examples to learn t...
A: Lets see the solution.
Q: In what job did Ada Lovelace do?
A: The solution to the given problem is below.
Q: what is definition of networking? List at least five ways that networking is an essential part of th...
A: Step 1 The answer is given in the below step
Q: Create a Java program that will display the student's information. The program should perform the fo...
A: logic:- read users first name, mid name and last name. Read choice O or N. if(choice.equalsIgnore...
Q: The se of te phyal dress space o आ नहि procs 2 bytes Te word length is nd lemgth 2 byle The capcity ...
A: Total memory size = physical address space. In k way set associative Cache lines are grouped into se...
Q: Create a program that allows you to view and edit the sales amounts for each month of the current ye...
A: Python code for the given Question FILENAME = "monthly_sales.txt" # file name directory def read_sa...
Q: Create a Java program that asks the user to enter three (3) first names then display the following 1...
A: The answer is given below
Q: Host A sends a 1500-byte packet to Host B. What is the transmission delay (in ms) of the packet from...
A: The answer is
Q: Briefly describe
A: NOTE: ACCORDING TO COMPANY POLICY WE CAN SOLVE ONLY 1 QUESTION. YOU CAN RESUBMIT THE QUESTION AGAIN ...
Q: Write a JAVA program in which the user enters the initial velocity u, time of travel t, and the acce...
A: import java.util.Scanner;//to read inputpublic class Main{ public static void main(String[] args) { ...
Q: Why is interactive transaction recovery more difficult than batch transaction recovery? Is there an ...
A: Inactive transaction: Interactive transaction contains those application which works on the remote’s...
Q: The operating system is reset to a fresh state when you restart a computer. Booting, on the other ha...
A: Introduction: The operating system is reset to a fresh state when you restart a computer. Booting, o...
Q: What is the IEEE-754 single precision real number after encodingt the real decimal number -76.0625? ...
A: Here in this question we have given a decimal numbers and we have asked to convert it into IEEE 754 ...
Q: In a royal casino, there is a lottery at 134 number card. If a person is playing that game, find the...
A: Required:- In a royal casino, there is a lottery at 134 number card.If a person is playing that game...
Q: Is computer gaming, on the whole, good or harmful to people? What are your arguments for and against...
A: Introduction: In terms of computer gaming, is it good or harmful to people
Q: Programming Projects 2.4 Project 2.4.1. Write a C++ program to compute the weekly wage for an employ...
A: Given The answer is given below.
Q: How many days, years did quitting employees work in their past jobs. Name Null? Туре NUMBER (6) EMPL...
A: Here is the query for the the time span of the employees work
Q: How can i convert the temperature in Fahrenheit from the degree celsius which is entered by user in ...
A: We need to write a program in PHP programming language to convert the temperature from Degree Celciu...
Q: Your Question Which kind of parallelism (data or control) is optimal for SIMD? What kind of parallel...
A: Given: For SIMD, what form of parallelism (data or control) is best? MIMD excels at what form of par...
Q: 149. Write a C# Sharp program to create a new list from a given list of integers removing those valu...
A:
Q: Consider the int Array below and determine the values of A and B so that Array[0] has an integer in ...
A: The question is to find the values of A and B.
Q: 33. A certain ecesor deploys a single- level cache The cache bck se is words and the word sie in 4 b...
A: The answer is here
Q: In a royal casino, there is a lottery at 134 number card. If a person is playing that game, find the...
A: Required:- In a royal casino, there is a lottery at 134 number card.If a person is playing that game...
Q: m to be
A: Multi-user systemA multi-user system allows numerous users to access the system at the same time or ...
Q: ript as follows: For each file in the current direct ion about that file: number of lines, number of...
A: Lets see the solution.
Q: What are the three primary types of cloud services, as well as the AWS products that are based on th...
A: Introduction: What are the three primary types of cloud services, as well as the AWS products that a...
Q: 2. Compare and contrast three different methods to pass parameters into a system call.
A: There are three main methods to pass the parameters required for a system call: (1) Pass the paramet...
Q: Write a JAVA program in which the user enters the initial velocity u, time of travel t, and the acce...
A: Here, I have to provide a java solution to the above question.
Q: How do you determine the type of motherboard you have in order to repair it?
A: Introduction: Motherboard: Motherboards are the primary circuit boards that are found within compute...
Q: When did the first personal computer come out?
A: Personal Computer (PC) DefinitionA personal computer is one that is meant for a single user. This is...
Q: When the MPU starts up for the first time it goes to the and begins executing. Reset vector Interrup...
A: Introduction: When the MPU starts up for the first time it goes to the _____and begins executing. Re...
Q: Determine the influence of FIVE information systems/information technology on print/online media, as...
A: Introduction: Determine the influence of FIVE information systems/information technology on print/on...
Q: In terms of I/O cost, what is the difference between the three categories of storage: volatile, nonv...
A: First, define "first step." A volatile storage system stores information in a state that is suscepti...
Q: msh7.c can be terminated with exit , but msh8.c cannot. Is this true? O Yes! No!
A: Next step
Q: chis true? D Yes!
A: given - msh7 . c can be terminated with exit , but mshs. c cannot.Is this true? Yes!NO!
Q: Develop a program to add two numbers of 8 byte lon whose result is more than 8 byte. The first numbe...
A: In this question, we are asked to write a assembly program which store the numbers from 8501 to 8508...
Q: 8. Write a Python program to concatenate the lists 1 and 12 and form a single list without using the...
A: Write a Python program to concatenate the lists l1 and l2 and form a single list without using the l...
Q: YOU MUST VALIDATE ALL USER INPUT AND ALWAYS GIVE FRIENDLY ERROR MESSAGES. It is also important to ha...
A: There are different ways to quit and restart a game, u can generate the single one or both acc to yo...
Q: 1. Write a C++ program to check whether a string belongs to the below given grammar or not. H→ neY Y...
A: According to the above grammar all the strings that will be acceptable will be: new, near, net So we...
Q: A mitosis program has gone out of hand and now does abnormal cell duplication. Rather than scrapping...
A: times is useful in specifying the base case and this gets decreased by 1 in each call
Q: What is the ARM statement which correspond to the each following statement and find the value of RO
A: The answer is
Q: How can i convert the temperature in Fahrenheit from the degree celsius which is entered by user in ...
A: Required:- How can I convert the temperature in Fahrenheit from the degree celsius which is entered ...
Q: Using the MATLAB platform, Write a program to plot the given signal array [4,8,12,7,-2,6,4,5,0,-1,1,...
A: Required:- Using the MATLAB platform, Write a program to plot the given signal array = [4,8,12,7,-2,...
Q: How can i convert the temperature in Fahrenheit from the degree celsius which is entered by user in ...
A: Here is your php code with an output :-
As per the answering policy i can only answer upto 3 question max at a time, so I'm answering first three, for rest please upload your question specifically.
Program:
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images
- In java, without Arrays and using only String methods ( don't use String builder) // Question 17: In MS-DOS, a file name consists of up // to 8 characters (excluding '.', ':', backslask, '?', // and '*'), followed by an optional dot ('.' character) // and extension. The extension may contain zero to three // characters. For example, 1STFILE.TXT is a valid filename. // Filenames are case-blind. // // Write and test a method that takes // in a String, validates it as a valid MS-DOS file // name, appends the extensions ".TXT" if no extension // is given (that is, no '.' appears in FILENAME), converts // the name to uppercase, and returns the resulting string // to the calling method // If fileName ends with a dot, remove that dot and do not // append the default extension. If the name is invalid, // validFileName should return null. public String validFileName(String n) { }You are given a string. Get input from the user. In the first line, print the third character of this string. In the second line, print the second to last character of this string. In the third line, print the first five characters of this string. In the fourth line, print all but the last two characters of this string. In the fifth line, print all the characters of this string with even indices (remember indexing starts at 0, so the characters are displayed starting with the first). In the sixth line, print all the characters of this string with odd indices (i.e. starting with the second character in the string). In the seventh line, print all the characters of the string in reverse order. 8. In the eighth line, print every second character of the string in reverse order, starting from the last one. In the ninth line, print the length of the given string.You have been asked to develop the new system. You are to write an application to assign seats in an airline. Assume a small airplane with 28 seats (7 rows 4 wide) as follows: 1 A B C D 2 A B C D 3 A B C D 4 A B C D 5 A B C D 6 A B C D 7 A B CD The program should display the seat pattern, with an X marking the seats already assigned. 1 X B C D 2 A X C D 3 A B C D 4 A B X D 5 A B C D 6 A B C D 7 A B C D The program then requests a choice of seat. If the seat if available,then the seating display is updated. Otherwise, the program requests another choice of seat. If the user types in a seat that is already assigned, the program should say that that seat is occupied and ask for another choice. This continues until all seats are filled or until the user says that the program should end.
- JavaScript: Modify the provided JS file to force each of the JS error types to occur. Catch each error and log a message detailing which error type you triggered. /** Force each of the follow error types to occur* and catch them. Log a message describing each* of the error types.** Error types:* -SyntaxError (already done)* -ReferenceError* -TypeError* -RangeError** Additionally, throw your own error with a* custom error message containing your name.* Catch your error and log a message.*/ console.log('PROGRAM START'); try { JSON.parse(`{name: 'John', age: 18}`);} catch(error) { console.log(`Caught a syntax error: `); console.log(error);} // CODE STARTS HERE // CODE ENDS HERE console.log('PROGRAM END');Modify the CategorizeStrings application to divide the entered Strings into those that contain no spaces, one space, or more. After data entry is complete, continuously prompt the user to enter the type of String to display: O for one word Strings, T for two word Strings, and L for longer Strings. If the user does not enter one of the three valid choices, display all of the Strings. Allow the user to enter ZZZ to quit. import java.util.*;public class CategorizeStrings2{// Modify the code belowpublic static void main (String[] args){final int MAX = 20;final int CUTOFF = 10;final String QUIT = "ZZZ";String entry;int shortSub = 0;int longSub = 0;Scanner input = new Scanner(System.in);String[] longStrings = new String[MAX];String[] shortStrings = new String[MAX]; System.out.print("Enter a string or " +QUIT + " to quit >> ");entry = input.nextLine();while(!entry.equals(QUIT) && (shortSub + longSub < MAX)){if(entry.length() <= CUTOFF){shortStrings[shortSub] =…NEED HELP PLEASE! Write a Java program to read a text file (command line input for file name), process the text file and perform the following. Print the total number of words in the file. Print the total number of different words (case sensitive, meaning “We” and “we” are two different words) in the file. Print all words in ascending order (based on the ASCII code) without duplication. Write a pattern match method to find the location(s) of a specific word (a character string up to twelve characters, e.g. system). This method should return all line number(s) and location(s) of the word(s) found in the file. Print all line(s) with line number(s) of the file where the word is funds by invoking the method of 4). Under each output line indicate the location(s) of the first character of the matched word (refer to the output example below). Empty lines are lines, they also have their own unique line numbers. Repeat the pattern match (4 and 5 above) until user types in EINPUT. A word is…
- Here is the code i am working with, around the last line it says what i need to do, any help please! import java.util.*; import java.io.*; public class FileLoader implements Getter { String [][] data; String [] head; String FILENAME = "wv-covid-daily.csv"; String DELIMITER = ","; int MAX_ROW; int MAX_COL; int dataRows; boolean stillLoading; public FileLoader () { MAX_ROW = 100; MAX_COL = 50; dataRows = 0; data = new String[MAX_ROW][MAX_COL]; head = new String[MAX_COL]; stillLoading = false; } public int getNumRows() { return dataRows; } public String [] getRow (int row) { return data[row]; } public boolean isLoading () { return stillLoading; } public void run () { stillLoading = true; dataRows = 0; try { String line; int row = 0; BufferedReader reader = new BufferedReader(new FileReader(FILENAME)); if((line=reader.readLine())!=null){ String fields[] = line.split(DELIMITER); head=fields; } while((line=reader.readLine())!=null){ String fields[] = line.split(DELIMITER);…Problem: Write a program that prompts the user to enter 10 names, each with maximum of 30 characters. Output the names that start with letter A and its corresponding length. This is my C++ Codes but it has errors when I run it. Can you fix the errors? Please still use header files iostream and cstring. //Start of program#include <iostream>#include <cstring> using namespace std; int main(){//Declare arraychar name[10]; //Prompt the user to enter 10 namescout << "Enter 10 names: " << endl; //For loopfor (int i = 0; i < 10; i++){//Store each name in the arraycin >> name[i]; if (strlen(name) > 30){i--;}} //Display the names that start with A or acout << "Names starting with 'A' and their corresponding length: " << endl; //Iterate the value of i from 0 to 9 by using for loopfor (int i = 0; i < 10; i++){//Checking condition if name starts with A or aif (name[i][0] == 'A' || name[i][0] == 'a'){cout << name[i] << ": " <<…The do-while in my code does not work. when I enter yes, I can't input the name of the customer, what could be wrong with the code? Also, when entering the wrong item code, I want it to display invalid output and the system will ask to perform another transaction. package cashier; import java.util.Scanner; class List { Scanner sc = new Scanner(System.in);private String name;private int item;private int[] des;private double price;private int[] quan;private double total;private double[] sum; public List(String name, int item, int[] des, double total, int[] quan, double[] sum) {this.name = name;this.item = item;this.des = des;this.quan = quan;this.total = total;this.sum = sum;}public void Input() {System.out.print("\n Enter name of customer: ");name = sc.nextLine();System.out.print(" Enter number of items: ");item = sc.nextInt();des = new int[item];quan = new int[item];sum = new double[item];total = 0; for (int i = 0; i < item; i++) {System.out.print("\n Enter item code: ");des[i] =…
- Program 2Write a Java program that prompts the user to enter a password that matches a specific pattern. Your program must approve the user's entry.. Here is the pattern, in this order: 1 or more upper case letters two lower case letters 1 or 2 digits zero or 1 upper case letters any two of this group @#$%^&In Java Write a function to calculate a CSP number, which is defined as n(n+1)/2 for n = 1,2, ..., and so on. The first few CSP numbers, also known as terms, would therefore be 1, 3, 6,10, 15.... If n = 1 the CSP number is 1, for example. Your main program will prompt the user for the number of terms of CSP numbers to calculate and will send that as a parameter to the CSP number function. The result will be printed on the screen from the CSP number function. In addition, the CSP number function will sum all of the CSP terms the user requested and will return that value to main to be printed on the screen.Consider the processWords method. Assume that each of its two parameters is a String of length two or more. public void processWords(String word1, String word2) {String str1 = word1.substring(0, 2);String str2 = word2.substring(word2.length() - 1); String result = str2 + str1; System.out.println(result.indexOf(str2)); } Which of the following best describes the value printed when processWords is called? (A) The value 0 is always printed.(B) The value 1 is always printed.(C) The value result.length() - 1 is printed.(D) A substring containing the last character of word2 is printed.(E) A substring containing the last two characters of word2 is printed.