Question: Date: Lab Objectives This lab was designed to reinforce the following programming concepts: Using repetition structures Using decision making Using L/O files. xercise#1: Counting Number

Date: Lab Objectives This lab was designed to reinforce the following programming concepts: Using repetition structures Using decision making Using L/O files. xercise#1: Counting Number of Digits Write a Java program that inputs one integer number from the user, determine the number af individual digits and prin the number of digits and the digits separated from one another by a tab space. For example, if the user types in the numb 42339, the program should print "There are 5 digits, which are 42 3 39 Sample Input/Output KnLer ar integer value: 123456 Ther a ats, wrich are( 2 3 5 6 7 B num/ e 113 Exercise#2: Sales s maorder house sells fve products whose retail arices are as follaws: Procuct i. $3,a; pr producL 3 .. yg . E Ledus t e . a 3 and product S 36 . oduct. 2, $4,5 B7. Write a Java program that reads a scries of pairs as fallows: pnnduct umber and roact name. Ime quantity sold isgenerated at random between 0 vElur sl alfl praduc:s sold as sho witch statement to deternine the rerail crice for each product. It should calculate and display the total retail in the sample autout. The loop should stop laoping when there is ns inout. The input is staredin an input file. Sample input file(call it 8a ' es ' t 1 paak Sample Output 4 paper pak Erapier 45 229.2 21 .50 anlaring hok Total Sale::S2009
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
