Question: Could the steps to the code be explain also? Like why did you use certain lines of code? COMP163 Balloons and Orbits A. [35 points]
COMP163 Balloons and Orbits A. [35 points] When watching the Thanksgiving Day parade one year, I wondered how much lift a parade balloon has. Write a program to calculate how much weight a spherical balloon filled with helium will lift. Helium will lift 1.03 grams/liter or 1.03 kg/cubic meter. The volume of a spherical balloon can be calculated as 4 volume =- r3 where r is the radius of the balloon. If the program asks the user the diameter of the balloon, you will have to divide the diameter by 2 to get the radius. Knowing the volume of the balloon, you can multiple it by 1.03 and get the lifting power of the balloon. A balloon that has a diameter of one meter (a radius of half a meter), can lift approximately 0.539307 kg * Program to calculate the lifting power of a balloon. ourname COMP163 August 30, 2018 public claas Balloon ( public atatic void main (String unused) /* Create an object of the Scanner class for keyboard input./ /+ Define variables to hold the radius, volume and 1ift. /+ Prompt the user and read the diameter of the balloon. /* Calculate the volume of the balloon / / Calculate the lift of the balloon/ /+ Display the lifting power /
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
