Reference no: EM131265990
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.
This assignment will also be assessed using additional criteria provided here.
Objective
Use loops and decision structures in programs
Design and create programs using control structures
Use arrays, strings, and other common data types.
Interest and principal will be repaid on the maturity date
: A 1- year, 6%, $30,000 promissory note was signed at the Citizens National Bank. Interest and principal will be repaid on the maturity date of Feb 1, 2014 _This is for the month of Feb 2013 -Im trying to figure out the amount. Cash: ? Note..
|
Find the per phase emf if the conductors are connected
: A 50-Hz synchronous salient pole generator is driven by a hydro-electric turbine at a speed of 125 rpm. There are 576 stator slots with two conductors per slot. The air-gap diameter is 6.1 m and the stator length is 1.2 m. The sinusoidally distrib..
|
Action the overall economy will suffer
: An interesting paradox called the "Paradox of Thrift" arises when households become concern about their future and attempt to increase their saving. As a consequence of such action the overall economy will suffer. Explain. Do you agree with thi..
|
Use the allowance method for estimating bad debt
: You have started a business that has now been going for a couple of years. Due to the increased volume in sales, you have started noticing more bad debt and want to use the allowance method for estimating bad debt. Would you use the percentage of sal..
|
Design and create programs using control structures
: Design and create programs using control structures. 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.
|
Infrastructure on the east coast
: Hurricane Sandy in 2011 destroyed much capital in houses, buildings, and infrastructure on the East Coast, but resulted in little loss of life or limb. What would you expect to be the effect on actualoutput and potential output in the short run (r..
|
Calculate the frequency of emf in the armature coils
: A 6-pole, wave-connected dc armature has 300 conductors and runs at 1200 rpm. The emf generated is 600 V. Find the useful flux/pole.
|
Does method have a societal marketing orientation
: Does Method have a societal marketing orientation, or is it just a marketoriented company that integrates a number of environmental practices into its operations? Explain.
|
Power-sizing exponent for a centrifugal blower
: White County, a neighbor, is considering buying a similar blower with a capacity of 15,000 cubic feet in 2007. Estimate the cost for the blower. The power-sizing exponent for a centrifugal blower is 0.59.
|