Question: Solve in JAVA. 9.4: Box of chocolates Some say life is like a box of chocolates. Luckily, if you solve this problem correctly, you'll always


Solve in JAVA.
9.4: Box of chocolates Some say life is like a box of chocolates. Luckily, if you solve this problem correctly, you'll always know what you're gonna get In this problem, you will write a program that asks the user to input the dimensions of a box of chocolates. Then, you will print out a text representation of that box. In your ouput, use hyphens and pipe characters to make the outline of the box and the letter C to represent chocolates. If the user gives a negative dimension, keep asking until they enter a valid one. Your solution must use for loops to print out the box of chocolates. g Be sure to match the expected format and pass all the test cases. Dont forget to use good style in your solution and add implementation comments where appropriate. Example input/output: Enter the number of chocolates per row: -7 The number cannot be negative. Enter the number of chocolates per row 10 Enter the number of rows
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
