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

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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