Home / Expert Answers / Computer Science / note-when-you-turn-in-an-assignment-to-be-graded-in-this-class-you-are-making-the-claim-that-you-pa654

(Solved): Note: When you turn in an assignment to be graded in this class, you are making the claim that you ...



student submitted image, transcription available belowstudent submitted image, transcription available below
Note: When you turn in an assignment to be graded in this class, you are making the claim that you neither gave nor received assistance on the work you turned in (except, of course, assistance from the instructor or teaching assistants). Veritable Carriaging Uptown (VCU) is a delivery company planning on deploying a number of warehouses to store goods prior to delivery. Write a program called VCUWarehouses.java that will help VCU figure out how many warehouses to construct. The amount and type of warehouses to purchase depends on the area being served. - A small warehouse can serve 5 square miles - A medium warehouse can replace 4 small warehouses - A large warehouse can replace 8 medium warehouses - An industrial warehouse can replace 11 large warehouses The program will first ask the user if they would like to randomly generate a square mileage or enter it. If the user picks the randomly generated square mileage amount, the program will use Math.random() to randomly generate a square mileage amount between 10 and 1,000,000 inclusively and will display the number generated to the user. If the user wants to enter the number, then the program will ask the user for a square mileage amount between 10 square miles and 1,000,000 square miles. The program will then calculate the appropriate number of each type of warehouse that should be constructed. It will only display the number of warehouses needed. For example, if you needed to service an area of 3525 square miles, you would only display 2 industrial warehouses and 1 small warehouse. Please use Listing 2.10 on page 63 of the PDF version of our textbook as your guide. The program should be able to handle incorrect numeric inputs by the user. If the user does not enter a number that is expected the program will state, "Incorrect input". Here are some sample runs: Would you like to randomly generate a square mileage (1) or enter it yourself (2)? (Note this is one line of output) 2 Enter a square mileage between 10 and 1,000,000 100000 To have 100000 square miles of storage, VCU must construct: 56 industrial warehouse(s) 9 large warehouse(s) Would you like to randomly generate a square mileage (1) or enter it yourself (2)? (Note this is one line of output) 1 103765 To have 103765 square miles of storage, VCU must construct: 58 industrial warehouse(s) 10 large warehouse(s) 4 medium warehouse(s) 1 small warehouse(s) Would you like to randomly generate a square mileage (1) or enter it yourself (2)? (Note this is one line of output) 25 Incorrect Input Would you like to randomly generate a square mileage (1) or enter it yourself (2)? (Note this is one line of output) 2 Enter a square mileage between 10 and 7 Incorrect Input


We have an Answer from Expert

View Expert Answer

Expert Answer



We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe