Question: Please print the source code (JAVA program) and the output (2 sets). Thank you. For each of the following problems, complete the four steps pre-programming

 Please print the source code (JAVA program) and the output (2

Please print the source code (JAVA program) and the output (2 sets). Thank you.

For each of the following problems, complete the four steps pre-programming phase: i. Analyze the problem (PAC) ii. Develop the IPO Chart iii. Develop the algorithm (draw the flowchart and/or write the pseudocode) Then, based on the algorithm you have written, write a complete Java program for each problem. 1. A mail-order house sells five products whose retail prices are as follows: Product 1 = RM2.98; product 2 = RM4.50; product 3 = RM9.98; product 4 = 4.49 and product 5 = RM6.87. Write an algorithm and draw a flowchart that reads a series of pairs of numbers as follows: a. product number b. quantity sold You must use case logic structure to determine the retail price for each product. It should calculate and display the total retail value of all products sold. Use sentinel-controlled loop, - 9999, to determine when the program should stop looping and display the final results. 2. Draw a flowchart and write an algorithm that reads an unspecified number of integers, determines how many positive and negative values have been read, and computes the total and average of the input values, not counting zeros. Your program ends with the input 0. Display the average as a floating-point number. (For example, if you entered 1, 2, and 0, the average should be 1.5)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!