Write a program that displays a countdown first

Assignment Help JAVA Programming
Reference no: EM13845192

Problem Summary and Equations

When an object is dropped or thrown from an initial position (height), formulas can be used to determine the object's position (height) and velocity at each second, as it drops.

The position of a falling object can be calculated using the equation:
P(t) = -16t2 + V0t + H0
where:
t is time in seconds
P(t) is the position of the object at after t seconds,
V0 is the initial vertical velocity of the object in feet/sec, and
H0 is the initial height of the object in feet.
Likewise, the velocity of the object at any given time can be calculated from the equation:
V(t) = -32t + V0
where:
t is time in seconds
V(t) is the velocity of the object at after t seconds, and
V0 is the initial vertical velocity of the object in feet/sec

Example: Assume we drop a ball from an initial height of 1000 ft. (H0 = 1000.0) above the Earth. Since we dropped the ball and didn't throw it, its initial velocity is 0 ft/sec (V0 = 0.0). At zero, the ball is not moving up or down.

Now we can ask:

How high above the ground and how fast is the ball traveling after 5 seconds (t = 5)?

To determine these values, simply plug in all the numbers to the previous two equations:
P(5.0) = -16(5.0)2 + (0.0)(5.0) + 1000.0 P(5.0) = 600.0
V(5.0) = -32(5.0) + 0.0 V(5.0) = -160

Hence, after 5 seconds, the ball will be 600 feet above the ground traveling downwards at 160 ft/sec (downwards because of the negative sign).

Program Requirements

Write a program that displays a countdown first, and then displays the position and velocity of an object for every second it drops, as long as it is above 500 feet

Required Control Structures

Within this program, you must use at least one of each of the following programming constructs:
· while loop
· do-while loop
· for loop

Required Classes and Methods
Two separate classes will be required for this program.
1. Define a class with properties and methods for a falling object.

The class will have the following private properties:
constant initial position
constant initial velocity
current time
current position
current velocity

Reference no: EM13845192

Questions Cloud

Argument for both sides of a debate : Your task is to create an argument for both sides of a debate.
What is the imfs overall outlook for south korea : What is the IMF's overall outlook for South Korea? What impact will the condition of the global economy have on the country? What are the domestic risks facing South Korea?
Educational experience and course work : Prepare a list of at least three job-related assets that you have and explain why and how these qualities would be useful to a potential employer.
What is the risk to a business for not applying technology : Explain how you can use the technology in an organization for competitive advantage. Address Porter's Five Forces model (see picture below). What is the risk to a business for not applying/using the technology?
Write a program that displays a countdown first : Write a program that displays a countdown first, and then displays the position and velocity of an object for every second it drops, as long as it is above 500 feet
Define cloud computing and discuss : Define Cloud Computing and discuss whether it is disruptive or evolutionary to CA Technologies.
Chief expectations for yangban women : In Choson Korea, what were the chief expectations for yangban women? What were the chief expectations for yangban men?
Paper on assimilation or pluralism : Paper on Assimilation or Pluralism
Mobile technologies in a user-friendly manner : The items need to be easily searchable and of sufficiently high resolution for details to be viewed. They need to be accessible through mobile technologies in a user-friendly manner. The University also wants a way to protect the copyright of the ..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Explain why the teller application can call the withdraw

Explain why the Teller application can call the withdraw and deposit methods using a SavingsAccount object reference, even though we did not define these methods

  Create an application that keeps tracks of the information

Create an application that keeps tracks of the information in such a simple social network. More specifically, your application will allow for user profiles to be added to, deleted from, or looked-up in the social network.

  How are exceptions caught

How are exceptions caught? When should Exception Handling be used

  Assume an ideal gas mixture is in contact with water

Assume an ideal gas mixture is in contact with water. Determine the equilibrium concentration of the contaminant in the liquid is the gas stream is composed of 200 ppm of benzene in air

  Java program which demonstrates cellular automata

Using the internet, locate a Java program (or Java applet) which demonstrates "Cellular Automata", in particular "the Game of Life".

  Demonstrate all of the methods of your stack.

Create a StackTest.java file to demonstrate all of the methods of your stack. Instantiate two stacks; one for String and one for Integer. Push words/integers onto your stack. After you have pushed a series of words/integers on your stack use..

  Implement a shopping cart class with user interface

project will be to implement a shopping cart class with user interface (UI) that contains main() in Net Beans. The UI class will be used to perform user input/output and to invoke the appropriate methods of shopping cart class. When your program star..

  Squashes the difference in fruit weight-distribution

Assume that in squashes the difference in fruit weight between a 3-lb type and a 6-lb type results from three independently segregating allelic pairs, A/a, B/b, and C/c. Each capital-letter allele contributes a half pound to the weight of the squash...

  Create a web application for sheridan restaurant

Create a web application for Sheridan Restaurant Reviews that contains the following functionality - Display a table of all restaurants based on the city entered by the user

  Note the line number in the statement

Note the line number in the statement

  Coin change program

coin change program. Make change using fewest number of coins. I'm attempting dynamic programming and i may be misunderstanding the algorithm

  Create a class called point

Create a class called Point that has the following private members: float x - the x-coordinate of the point. float y - the y-coordinate of the point

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd