Question: Name for the project: programming exercise 1 -Write a box allocation program with the following requirements: 1) A box can hold 20 bottles. Each box

Name for the project: programming exercise 1

-Write a box allocation program with the following requirements:

1) A box can hold 20 bottles. Each box costs $2.99

2) We want to ask the user how many bottles they want to box up

3) From that number, the program will calculate how many full boxes will be needed and how much that will cost

4) The program will also calculate how many bottles will be leftover and unboxed

-The sequence of the program should be as follows:

1) First, display a welcome message to the user

2) Prompts the user to enter the number of the bottles expected to be packed

3) Perform the necessary calculations and then display the results

Example: If the user enters 65 bottles, that should be 3 full boxes totaling $8.97 with 5 bottles leftover unboxed

- Use variables, data types and println statements as appropriate to meet the requirements of the program.

Please write this is java programming language and please explain in each step what we are doing.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!