Question: Create a class (program), named BoxRocks, that asks a user how many rocks will be used to fill boxes. You can use the Scanner class

 Create a class (program), named BoxRocks, that asks a user how

Create a class (program), named BoxRocks, that asks a user how many rocks will be used to fill boxes. You can use the Scanner class in chapter 4 (pages 100-103) to read in the data from the user. Use the program on page 100 as a guide submit this though. It reads in 2 integers, adds them together and displays the answer. The difference is, in this assignment you only read in1 into jGrasp this program, exactly as it appears on page 100, compile and run it. This would be good practice for you, no need to integer Hint: you should be using the modulus operator in this program Assuming it takes 12 rocks to fill a box, respond to the user with the number of boxes that will be filled. Your prompt and output should look exactly like the sample run, below How many rocks? 27 You will completely fill 2 boxes, with 3 rocks left over Submit BoxRocks.java here. Comment and indent your code

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!