Solving a Java Application Problem
Not what you're looking for?
I need help with this:
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; product 5, $6.87. I need help with writing an application that reads a series 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.
Make sure that the code is readable.
And I need to know what code was used to construct this application.
Purchase this Solution
Solution Summary
This solution helps solve a Java application problem.
Solution Preview
Hello Student,
I have attached the completed solution.
// Sales results.
import java.util.Scanner; // class uses class Scanner
public class Sales
{
public static void main(String args[])
{
// create Scanner to obtain input from command window
Scanner input = new Scanner( System.in );
// initializing ...
Purchase this Solution
Free BrainMass Quizzes
Basic Computer Terms
We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.
Javscript Basics
Quiz on basics of javascript programming language.
Word 2010: Table of Contents
Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.
Excel Introductory Quiz
This quiz tests your knowledge of basics of MS-Excel.
Java loops
This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.