I am facing a problem with a problem. My problem is I do not know how to start this problem. The problem is:
A mail-order house sells five products whose retail prices are as follows: Product 1, $2.98; product 2, $4.50; product 3, %9.98; product 4, $4.49 and product 5, $6.87. Write an application that reads a seris of pairs of numbers as follows: a) product number b)quantity sold
The program should use a switch statement to determine the retail price for each product. It should calculate and display the total retail value of all products sold. Use a sentinel-controlled loop to determine when the program should stop looping and display the final results.
The program should have two methods. Not counting the main.
public static void prodCounters(int N, int prodQ) { switch( prod N); case 1; += prodQ; // increment aCount break; // necessary to exit switch case 2; +
import java.util.Scanner; // program uses class Scanner
public class tw54663def { private int total; // sum of products private int Counter; // quantity entered by user private int aCount; // count of product 1 private int bCount; // count of product 2 private int cCount; // count of product 3 private int dCount; // count of product 4
This is How I think I am suppose to start it... How do i set values to the Products. So it still follows the format of the program.