Calculate and display the total retail value of all products

Assignment Help JAVA Programming
Reference no: EM13853818

Decision Control and Loops with User Interaction:

Write a Java application that prompts the user for pairs of inputs of a product number (1-5), and then an integer quantity of units sold (these are two separate prompts for input values). You must use a switch statement and a sentinel-controlled loop (i.e., a loop that stops execution when an out-of-range value, such as -1, is input). All 15 items below are for a single purchase. There are five sets of inputs as follows:

Product 1 1 unit (cost is $2.98 per unit)

Product 2 2 units (cost is $4.50 per unit)

Product 3 3 units (cost is $9.98 per unit)

Product 4 4 units (cost is $4.49 per unit)

Product 5 5 units (cost is $6.87 per unit)

Your application must calculate and display the total retail value of all products sold after all five pairs of inputs are completed. You must also display the line total and cumulative order total after each new pair of input values (i.e. a product number and its quantity) is entered. You must also show the input of the sentinel value and the resulting display of the total order amount.

(taken from Deitel&Deitel, 2012, p. 194).

1. You may use the Windows Command Prompt command line interface or any Java IDE you choose to compile and execute your program.

2. You are to submit the following deliverables to the Assignment Dropbox in a single Microsoft Word file:

a. A screen snapshot of your Java source code (just the beginning is OK) as it appears in your IDE (e.g., jGRASP, Net Beans, Eclipse, etc.) or editor (e.g., a Windows Command line more of the .java file's first screen).

b. A listing of your entire Java source code in the same Microsoft Word file as item a). The source code should be placed in the Word file so that it follows the screen snapshot from item a). To obtain the copy of your source code, you can simply copy and paste the text from your IDE into Microsoft Word. Be sure to maintain proper code alignment by using Courier font for this item.

c. A screen snapshot of your program's input and output in the same Microsoft Word file, and following item b). You must include screen snapshots of all inputs and all outputs, not just a sample.

• Your instructor will compile and run your program to verify that it compiles and executes properly.

• You will be evaluated on (in order of importance):

o Inclusion of all deliverables in Step #2.

o Correct execution of your program.

o Adequate commenting of your code.

o Good programming style (as specified in the textbook's examples).

o Neatness in packaging and labeling your deliverables.

Deficiencies in any of the above areas are subject to deductions in each area, based on the severity of the deficiency.

Reference no: EM13853818

Questions Cloud

Write the pseudocode for the flowchart : Write the pseudocode for the flowchart below, and list what the output will be if the input fornum is 8.
Company''s reason for implementing the change. : Company's reason for implementing the change.
What are the critical issues surrounding newly released taps : What are the critical issues surrounding the newly released tapes? How should Peter Bijur and Texaco respond to the allegations? How should the company respond to the publicity
What is the big-o run-time of the remove operation : What is the big-O run-time of the Remove operation for an array-based list? Do your empirical results agree with this? Why or why not. What are the big-O run-times of the Get and Set operations for a linked-list? Do your empirical results agree wi..
Calculate and display the total retail value of all products : Your application must calculate and display the total retail value of all products sold after all five pairs of inputs are completed - Write a Java application that prompts the user for pairs of inputs of a product number
Measures and scales in quantitative research : Measures and Scales in Quantitative Research .Distinguish between Correlation and Regression.
Method of obtaining necessary approval : Method of obtaining necessary approval
Is the related lease finance or operating lease : Is the related lease Finance or operating lease and how would Lion Nathan account for any profit or loss on the sale of the pubs?
Estimate mwms additional funds needed for next year : Midwest Mining (MWM) expects its sales to grow by 20 percent next year. Last year, when the firm was operating at full capacity. Estimate MWM's additional funds needed (AFN) for next year.

Reviews

Write a Review

JAVA Programming Questions & Answers

  What will unboxing do with null values

Java Question: Whatwill unboxing do with null values?

  Determine the output displayed when the button is clicked

Determine the output displayed when the button is clicked. Assume the five lines of the file Dates.txt contain the numbers 1492, 1776, 1812, 1929, and 1941 and the file is in the appropriate folder.

  Concept of web based information system

Design and implement a simple and small email server using the concept of web based information system

  Considered to be an improved version

Part (c) is considered to be an improved version of Part (b). You may use an array (2-dimessional) to store some values that has been computed during the run so that when making recursive calls the program does not compute certain values over and ..

  Program that allows users to enter a dollar amount

Write a program that allows users to enter a dollar amount for their bank account balance at the beginning of the month. Then ask the user to enter a dollar amount for any number of checks written in a month, up to 50.

  Need the build function.use recursion

Implement remaining function. Everything else is provided. Use given material to receive points. Implement remaining function. Everything else is provided. Use given material to receive points. Implement remaining function. Everything else is provide..

  Information from the user and prints a payroll statement

Write a program that accepts the following information from the user and prints a payroll statement

  Which method will a web browser call on a new applet

Which method will a web browser call on a new applet? What would happen if "String[]args" is not included as argument in the main method

  Prepare a method that takes a string as input

Prepare a method that takes a String as input and returns a String containing the middle character of the String if the length of that String is odd.

  Algorithm analysis with advanced data structures

Algorithm Analysis with Advanced Data Structures, Your good friend, a Rock Star, asked you to create a Time Manager app for him, The Rock Star performs gigs at certain dates, all around the country - at most one gig per day

  What is the output of the following program explain

What is the output of the following program? Explain. Explain the meaning of the reserved word this and why it is necessary in the class below. Will the class compile without using this

  Create the benefit class

create the Benefit class

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd