Write a Java program that computes how high the ball will be above the ground after x seconds in the above example? Where x is an input provided by the user. Step 1. Create an algorithm (either flowchart or pseudocode) that you will use to write the program. Place the algorithm in a Word document. Step 2. Code the program in Eclipse to compute the time. Inputs: The program should prompt the user for the height of the building, the initial speed, and the time the ball has traveled (i.e, flight time). The building height should be an integer variable, while the initial speed and flight time are double variables. Create a separate method from main to calculate the height of the ball. Name the separate method calcBallHeight and it needs to have three input arguments: height of building, initial speed, and flight time of the ball. The output of the calcBallHeight method will return a double, ballHeight, that is the height of the ball when the flight time has elapsed. Outputs: The program should have this output (below is an example): The ball will be feet above the ground after seconds of flight time. Where ballHeight, and flightTime must be formatted to two decimal places, e.g. 12.48, using a grintf statement. Add comments at the top of the class with your First and Last name. Step 3. Test your program with a height of 128 feet, an initial speed of 32 ft/sec, and a flight time of 3 seconds just like the example problem. Use the Snip It tool in Windows or a similar tool on the Mac to cut and paste the Eclipse Console output window into the same Word document as the algorithm in Step 1. C6 Project New [Java Application) C:\Program Files\Javaljdk-14.0.2\bin\java.exe (Oct 30, 2020 10:26:16 AM-10:26:29 AM) Enter the height of the building in feet as an integer: 128 Enter the init1 speed of the ball in ft/sec as a double: 32.0 Enter the ght time of the ball as a double: 3.0 The ball be 80.00 feet above the ground after 3.00 seconds of flight time.
Write a Java program that computes how high the ball will be above the ground after x seconds in the above example? Where x is an input provided by the user. Step 1. Create an algorithm (either flowchart or pseudocode) that you will use to write the program. Place the algorithm in a Word document. Step 2. Code the program in Eclipse to compute the time. Inputs: The program should prompt the user for the height of the building, the initial speed, and the time the ball has traveled (i.e, flight time). The building height should be an integer variable, while the initial speed and flight time are double variables. Create a separate method from main to calculate the height of the ball. Name the separate method calcBallHeight and it needs to have three input arguments: height of building, initial speed, and flight time of the ball. The output of the calcBallHeight method will return a double, ballHeight, that is the height of the ball when the flight time has elapsed. Outputs: The program should have this output (below is an example): The ball will be feet above the ground after seconds of flight time. Where ballHeight, and flightTime must be formatted to two decimal places, e.g. 12.48, using a grintf statement. Add comments at the top of the class with your First and Last name. Step 3. Test your program with a height of 128 feet, an initial speed of 32 ft/sec, and a flight time of 3 seconds just like the example problem. Use the Snip It tool in Windows or a similar tool on the Mac to cut and paste the Eclipse Console output window into the same Word document as the algorithm in Step 1. C6 Project New [Java Application) C:\Program Files\Javaljdk-14.0.2\bin\java.exe (Oct 30, 2020 10:26:16 AM-10:26:29 AM) Enter the height of the building in feet as an integer: 128 Enter the init1 speed of the ball in ft/sec as a double: 32.0 Enter the ght time of the ball as a double: 3.0 The ball be 80.00 feet above the ground after 3.00 seconds of flight time.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 4 images
Knowledge Booster
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.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education