Question: in java programs help me java programs import java.util.Scanner; public class PointOfSaleSystem{ public static void main(String[] args){ Scanner input = new Scanner(System.in); int cases =
in java programs

![public static void main(String[] args){ Scanner input = new Scanner(System.in); int cases](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f393a6e9ca4_07866f393a66560d.jpg)


help me java programs
import java.util.Scanner;
public class PointOfSaleSystem{ public static void main(String[] args){ Scanner input = new Scanner(System.in); int cases = input.nextInt(); input.nextLine(); System.out.println(" *********************************************************");
System.out.println(" \t\t McDowell's Restaurant");
System.out.println(" *********************************************************");
System.out.println(" Make your selection from the menu below:");
System.out.println(" 1. Regular Hamburger $1.50 2. Regular Cheeseburger $1.75 3. Fish Sandwich $2.50 4. Half-pounder with cheese $2.75 5. French Fries $0.99 6. Large Soft Drink $1.25");
System.out.println(" *********************************************************");
System.out.println(" Select 1, 2, 3, 4, 5 or 6 ----->");
for (int i = 0; i
}
}
}
import java.util.Scanner;
public class MinMaxSearchByIndex{ public static void main(String[] args){ Scanner input = new Scanner(System.in); int cases = input.nextInt(); input.nextLine();
for (int i = 0; i
while (index.hasNextInt() == true){ int number = index.nextInt();
if (number > max){ max = number; } if (number
import java.util.Scanner;
public class AnInterestingProblem{ public static void main(String[] arg){ Scanner in = new Scanner(System.in); Scanner initialAmount = in.nextDouble; Scanner interestRate = in.nextDouble; double interest; double initialAmount; double initialRate; Scanner cases = nextInt; int cases; for(int y = 1; y
while(initialAmount
} }
import java.util.Scanner;
public class MinMaxSearchByValue{ public static void main(String[] args){ Scanner input = new Scanner(System.in); int cases = input.nextInt(); input.nextLine();
for (int i = 0; i
while (reader.hasNextInt() == true){ int number = reader.nextInt();
if (number > max){ max = number; } if (number
Activities Firefox Web Browser 50 * Wed 19:54 50 - Mozilla Firefox C Course: 20SPR-CSC1158 20SPR-CSC 1583-002: NX 20SPR-CSC 1583-002: NX 1583_HW3.pdf https://autolab.cs.uno.edu/courses/CSCI-1581-2020spring/assessments/labz/attachments/50 - + 90% x 20SPR-CSC11583-002: NX C CSCI 1581: Software De X + NE Problem 2: Point of Sale System The McDowell Restaurant chain has asked you to write a menu program for their new Fast-food service machines. Your program already prints the following menu like this: McDowell's Restaurant Make your selection from the menu below: 1. Regular Hamburger $1.50 2. Regular Cheeseburger $1.75 3. Fish Sandwich 52.58 4. Half-pounder with cheese $2.75 5. French Fries $0.99 6. Laree Soft Drink $1.25 Select 1, 2, 3, 4, 5, or 6 -----> Your program must now read the customer's selection and compute the total price of their purchase, including 6.5% sales tax Input The first line of input represents N, the number of test cases. The additional lines consists of a sequence of integers scoped between 1 to 6. Each number should indicate a selection from the above menu to be purchased. Output The program should print the sum of the orders plus tax as "Please pay $ dollars, where dollar is the total amount of the purchase then conclude with "Thank you for eating at McDowell's Sample Input Sample Output Please pay $12.77 Thank you for eating at McDowell's! 144531 Activities Firefox Web Browser 50 * Wed 19:51 50 - Mozilla Firefox C Course: 20SPR-CSC1158 20SPR-CSC 1583-002: NX 20SPR-CSC 1583-002: NX 1583_HW3.pdf O A https://autolab.cs.uno.edu/courses/CSCI-1581-2020spring/assessments/labz/attachments/50 - + 90% x 20SPR-CSC11583-002: NX C CSCI 1581: Software De X + NE Problem 5: Min/Max Search by Index Develop a program that given a sequence of integers as input, produces as output two sequences of positive integers, the first of which indicates all those positions in S at which S's minimum value occurs and the second of which indicates all those positions at which S's maximum value occurs. Positions are numbered starting at zero (0) Facts Scanner has a method that returns a boolean indicating whether a next integer exists in its input stream (hasNextInt()) Scanner objects can be initiated to to scan String data as input Input The input will begin with a single line containing T, the number of test cases to follow. The remaining lines contain the T sequences, one line per sequence. Each of these lines contains the values in the sequenos. Each such value is separated from the next by at least one space Output For each sequence given as input, there should be four lines of output. The first line echos the given sequence. The second line indicates the positions at which the minimum value occurs. The third line indicates the positions at which the maximum value occurs. The fourth line is biark Sample Input Sample Output 36-14653 0000 445 20 35 11-7 854 253-74-3 0000 0123 0123 -4 45 20 35 11-7 854 253-74-3 7 11 Activities Firefox Web Browser CSCI 1581:50: Wed 21:01 50 - Mozilla Firefox Course: 20SP Labo2.pdf 20SPR-CSC15 1583_HW3.pdf 20SPR-CSCU15 A https://autolab.cs.uno.edu/courses/CSCI-1581-2020spring/assessments/labz/attachments/50 - + 90% Google 50 x & Co Home | Chegg. B Course: 20SPP O Get Homewor o + = Problem 3: An Interesting Problem Write a program that accepts two positive integers: a deposited amount of money and an interest rate, as an annual percentage rate. Your program will calculate the number of years that will take for the account balance to reach $1,000,000. You can assure that the initial deposit is less than $1,000,000 Input The input will begin with a single line containing T, the number of test cases to follow. The remaining lines contain the lines to be calculated. Each of these lines has two positive integers separated by a single space. The first value is the deposited amount, the second is the interest rate. Output The output should consist of the number of years. Sample Input Sample output 10000 10 5005 49 years 156 years Activities Firefox Web Browser 50 * Wed 19:51 50 - Mozilla Firefox C Course: 20SPR-CSC1158 20SPR-CSC 1583-002: NX 20SPR-CSC 1583-002: NX 1583_HW3.pdf O A https://autolab.cs.uno.edu/courses/CSCI-1581-2020spring/assessments/labz/attachments/50 - + 90% x 20SPR-CSC1583-002: NX CSCI 1581: Software De X + NE 0 5 of 9 Problem 4: Min/Max Search by Value Develop a program that given a sequence of integers as input, produces as two output values, the first is the minimum value that appears in the sequence and the second is the maximum value that appears in the sequence Facts Scanner has a method that returns a boolean indicating whether a next integer exists in its input stream (hasNextInt()) Scanner objects can be initialized to to scan String dala as input. Input The input will begin with a single line containing the number of test cases to follow. The remaining lines contain the T sequences, one line per sequence. Each of these lines contains the values in the sequence. Each such value is separated from the next by at least one space. Output For each sequence given as input, there should be four lines of output. The first line echos the given sequence. The second line indicates the minimum value that occurs The third line indicates the maximum value that occurs. The fourth line is blank. Sample Input Sample Output 36-14653 36-14653 0000 445 20 35 11 -7 854 253-74-3 0000 -445 20 35 11 -7 854 253-74-3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
