Object Oriented Applications

May 3rd, 2014
Sigchi4life
Category:
Programming
Price: $70 USD

Question description

Your consulting firm has been hired to develop a program that meets the following requirements.

Your program must provide a menu to the user. This menu should list five different products of your choice. Once the user selects one product, they should specify which state they are located. The state choices should include CT, VT, WI, CA and WA. State taxes vary for each state (7.5%, 7.8%, 6.8%, 7.2% and 6.4%, respectively). The user should then specify the desired number of cases (assume there are 12 items per case). The appropriate state tax should be added to the total cost of the product (Item quantity multiplied by unit price). Next, using the Math class random method, generate 20 numbers ranging between 1-100. Ensure there are no duplicates.

Display the following to the user.

  • Name of the product selected
  • Number of cases
  • Number of items
  • Subtotal (units * price per unit)
  • State tax (with the percentage and state abbreviation in parentheses),
  • Total cost (subtotal plus state tax)
  • The table of random numbers displayed in a table of five numbers per row

Requirements:

You need to use at least one repetition statement, one selection statement, Scanner class, at least one array and the random method in this code. For generating random numbers you should use the random () static method of class Math. It returns a double so you will need to cast it as an integer. For example,

number = (int) ( range * Math.random () ) + 1;

Your assignment submittal should include your Java program with commented Java source code files


Tutor Answer

(Top Tutor) Daniel C.
(997)
School: Cornell University
PREMIUM TUTOR

Studypool has helped 1,244,100 students

8 Reviews


Summary
Quality
Communication
On Time
Value
darnay
Dec 3rd, 2016
" The best tutor out there!!!! "
dontuwannaknow
Nov 24th, 2016
" Excellent work as always thanks so much "
SjSurvivor143
Nov 11th, 2016
" Thanks for the help. "
ddg82
Nov 2nd, 2016
" Thanks, good work "
tinytim47
Oct 19th, 2016
" Wow this is really good.... didn't expect it. Sweet!!!! "
jestin7
Oct 10th, 2016
" This tutor is great! "
mixedballz
Oct 6th, 2016
" excellent work as always thanks for the help "
lilmoe415
Sep 27th, 2016
" Thank you, Thank you, for top quality work, this is your guy!! "
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1830 tutors are online

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors