ite a JAVA procedural program for an artist who is creating art instillation “experiences” consisting of rooms totally full of balloons that people will walk around in. Different instillations will be in different sized rooms and different sized balloons so need different numbers of balloons to fill them. The salesperson will enter the length, width and height of the room in centimetres. Write separate methods to input each of these values (they may possibly call other general methods) and return the results. These three numbers are multiplied together to get the volume of the room. This should by then be converted to m3 (calculated by dividing the volume by 1,000,000). This is then divided by the volume taken up by each balloon in m3 as given by the user. Print out the final number of balloons to be ordered along with the intermediate results as in the examples below. provide commented code with explanation in every step.The final answer should be given as an integer (rounded down) as seen in the image below.  provide commented code with explanation in every step HINT: You can round down to an integer, getting rid o

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 30PE
icon
Related questions
Question

Write a JAVA procedural program for an artist who is creating art instillation “experiences” consisting of rooms totally full of balloons that people will walk around in. Different instillations will be in different sized rooms and different sized balloons so need different numbers of balloons to fill them. The salesperson will enter the length, width and height of the room in centimetres. Write separate methods to input each of these values (they may possibly call other general methods) and return the results. These three numbers are multiplied together to get the volume of the room. This should by then be converted to m3 (calculated by dividing the volume by 1,000,000). This is then divided by the volume taken up by each balloon in m3 as given by the user. Print out the final number of balloons to be ordered along with the intermediate results as in the examples below. provide commented code with explanation in every step.The final answer should be given as an integer (rounded down) as seen in the image below. 

  • provide commented code with explanation in every step

HINT: You can round down to an integer, getting rid of spurious decimal places, using the integer cast operator (int).

THIS PROGRAM MUST:

  • use input instructions
  • use variables 
  • use final variables
  • use arithmetic expressions 
  • be split in to methods which each return a result
An example run of the program is as follows (numbers in bold are typed in by the user, either pop-up boxes
or the console may be used for input and output):
Length of the room (in cm)? 4600
Width of the room
(in cm)? 310
Height of the room (in cm)? 200
What is the balloon volume (in m3)? 0.03
Your room volume is 285.2 m3.
You need 9506 balloons.
Another example run:
Length of the room (in cm)? 1000
Width of the room (in cm)? 520
Height of the room
What is the balloon volume (in m3)? 0.07
Your room volume is 171.6 m3.
You need 2451 balloons.
(in cm)? 330
Transcribed Image Text:An example run of the program is as follows (numbers in bold are typed in by the user, either pop-up boxes or the console may be used for input and output): Length of the room (in cm)? 4600 Width of the room (in cm)? 310 Height of the room (in cm)? 200 What is the balloon volume (in m3)? 0.03 Your room volume is 285.2 m3. You need 9506 balloons. Another example run: Length of the room (in cm)? 1000 Width of the room (in cm)? 520 Height of the room What is the balloon volume (in m3)? 0.07 Your room volume is 171.6 m3. You need 2451 balloons. (in cm)? 330
Expert Solution
steps

Step by step

Solved in 5 steps with 3 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr