JAVA Program!
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;
THIS assignment MUST include your Java program with commented Java source code files.
MUST BE ORIGINAL AND NON-PLAGARIZED,
11 years ago 20
Purchase the answer to view it
- home.rar
Purchase the answer to view it
- orderitems.zip
- case_for_critical_analysis_chapter_14
- Assignment 2: Traumatic Brain Injury: Jefferson’s Case
- Bus-330 Ashford University
- matrix 4
- matrix 3
- Reflecting for the Future Purpose: Adult learners have a great desire to find the meaning in all they say, do, and learn. Connecting with the information, synthesizing with past experience, and hypothesizing about future application helps adult learners
- Describe the nature and characteristics of PCB’s. Why are they of importance to an EH&S or FS professional who encounters them when coming upon an incident scene where they are present? What precautions, or actions, should the EH&S or FS professional take
- In an essay of at least 500 words, describe how the Industrial Revolution impacted American society economically, socially, politically, and morally. Be sure to cite specific examples.
- Midterm
- West Nile Virus