Question: I need help wring a code in the JAVA complier in netbeans for the following. It is for Chapter 2 of the How to program

I need help wring a code in the JAVA complier in netbeans for the following. It is for Chapter 2 of the How to program Java book.

This program should calculate the packing of Candles. First read:

The number of candles

The number of candles that fit in each case

Then calculate and print:

The number of full cases

The number of candles left over (partial case)

If this order is large (more than 5 full cases needed)

An extra message at the end to say you are done

Requirements:

Put System.out.println() after each call to nextInt().This will help you match the Test Program and make it easier to use it.

Even though you can do this with less variables, make sure you declare and use a variable for the number of full cases and another for the number left over

Sample Run #1: (the highlighted text is what the user types)

Num candles? 20

Candles per case? 8

2 cases 4 leftover

Done!

Sample Run #2: (the highlighted text is what the user types)

Num candles? 40

Candles per case? 6

6 cases 4 leftover

*** large order

Done!

Extra Notes:

Did you correctly name the package/folder?

Did you correctly name the class/file?

Did you include comments?

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!