4.2 Test a Ship Design (same as last program)
Input: the product will prompt the user for the name ot one space vehicle.
Output: the product will open one stored ship design file using the user’s input as the file name. 1f that
file dOes not e.sI che product will print an error message and return lo che menu, Otherwise, all values
should be read from the file and the following tests performed:
• Test 1: the Designer Name should not be “Thomas Harris”. l-le was fired.
• Test 2: the ship mass should be less than 1000kg
Test 3: the Acceleration should be more than 1 mfs2 but less than 10 mJs2
. Test 4: the Change in Velocity must be at least BOO mis
• Test S: if the Ship Mass is less than 100kg. then the Max Altitude must be at least
150km. Otherwise the Max Altitude must be at least 200km.
Interlace: any ship that tails one of the ests should have the number of the first test that it [ails primed
to the console in this format:
[Ship Namej has failed test number ITest Numberj
A ship that passes all ol the lests should have the following message printed to the console:
IShip Narnej has passed all tests.
The output should have IShip Namel and ITest Numberj replaced with the appropriate values.
4.3 Simulate a Flight (same as last program)
Input: the product will prompt the user to enter an acceleration value for one space vehicle in meters
per second squared and a number of second for the simulation to run.
Output: the product will compute the altitude and speed of the space vehicle at one second intervals
for che number seconds input by the user using these equations:
. Speed acceleration • time
• Altitude = (½) * acceleration * iime’2
The space vehicle is always assumed to scan motionless and on the ground (so with speed=O and
altitudeO).
Interface: the product should print text co the console starting with time=0 seconds and ending with
the time entered by the user. The output should be formatted as follows:
At [timej seconds: (speedjrn/s [altitudejm
DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma
Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t
Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th
1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of
1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of