Advertisement
akosiraff

Product

Jun 22nd, 2014
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1.  
  2. Download: http://solutionzip.com/downloads/product/
  3. Your consulting firm has been hired to develop a program that meets the following requirements.
  4. 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.
  5. Display the following to the user.
  6. Name of the product selected
  7. Number of cases
  8. Number of items
  9. Subtotal (units * price per unit)
  10. State tax (with the percentage and state abbreviation in parentheses),
  11. Total cost (subtotal plus state tax)
  12. The table of random numbers displayed in a table of five numbers per row
  13. Requirements:
  14. 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,
  15. number = (int) ( range * Math.random () ) + 1;
  16. Your assignment submittal should include your Java program with commented Java source code files.
  17. This assignment will also be assessed using additional criteria provided here.
  18. Objective
  19. Use loops and decision structures in programs
  20. Design and create programs using control structures
  21. Use arrays, strings, and other common data types
  22.  
  23. Download: http://solutionzip.com/downloads/product/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement