Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am currently in java class. please dont use anything really advanced so that I can read and understand the problem. Also, comment on the

I am currently in java class. please dont use anything really advanced so that I can read and understand the problem. Also, comment on the program would be apreciated. I will definetly thumbs up.

Your program should ask you to enter in the mass, cross-sectional area, and drag coefficient of the skydiver. Your program should also ask how long do you want to calculate the dive out to and what your timestep image text in transcribed(t) will be. You can assume the density of air is image text in transcribed1.14 kg/m3 and gravitational acceleration is image text in transcribed9.81 m/s2. (Density of the atmosphere value from https://answers.yahoo.com/question/index?qid=20110201191027AADvsI0 (Links to an external site.)Links to an external site., accessed September 6, 2014.)

As your program does its calculations, it should save the time and velocities in an array (i.e., in two separate one-dimensional arrays, one for time and the other for velocities). One you have calculated all these values, write the output to a file. The file should have two columns, the first being the time image text in transcribed(t) and the second being the velocity image text in transcribed(v(t)) at that time. Please separate the values in each column (along a given row) by a comma (e.g., "0.200, 1.9616"). If you do so, you will create the comma-separated value (CSV) file I mentioned earlier that Excel can read in without difficulties: Importing a delimited text file into Excel usually means opening Excel and then choosing "Open" from the File menu. Excel should detect what kind of file it is and try to parse it into a spreadsheet grid format. Your program, then, should also prompt you for the output filename. (Note, you actually don't need arrays to solve this homework, but arrays are used in scientific computing all the time, and by asking you to write the code in this way, I'm hoping you'll get some practice manipulating arrays.)

While the full output will go to a file, you should write out a few values to screen, so you can see how you're doing. Make that diagnostic output match this example console output (when the parameter values are as shown):

Enter the mass of the skydiver (kg): 80 Enter the cross-sectional area of the skydiver (m^2): 1.035 Enter the drag coefficient of the skydiver: 0.581 Enter the ending time (sec): 16 Enter the time step (sec): 0.1 Enter the output filename: soln.csv Writing out file. Here are the first few lines: 0.100, 0.981 0.200, 1.9616 0.300, 2.9409 0.400, 3.9182 0.500, 4.8927 0.600, 5.8634 0.700, 6.8297 0.800, 7.7907 0.900, 8.7457 Enter another dive? (y/[n]): n 

For the case whose plot you turn in, you'll want to calculate a substantial number of timesteps, out at least to image text in transcribedt=16 sec. Use a image text in transcribedt=0.1 sec, a mass of 80 kg, cross-sectional area of image text in transcribed1.035 m2, and a drag coefficient of 0.581 (drag coefficient is unitless). (Values for the skydiver from https://answers.yahoo.com/question/index?qid=20110201191027AADvsI0 (Links to an external site.)Links to an external site., accessed September 6, 2014.) Your initial velocity, i.e., image text in transcribedv(t=0 sec), should be 0 m/s. By the way, when using these settings, your graph should show the skydiver achieves terminal velocity; at a certain time, the velocity shown on the graph should level off. If you aren't getting this behavior (or the sample output given above), something's wrong.

Finally, there should be at least one method that you write that can be used to provide output for tracing variables: The method should be called test-something, e.g., testVariableValues. Somewhere in your program, there should be a call to that method. In the code you submit, that call should be commented out, but I should be able to find it.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Lab Manual For Database Development

Authors: Rachelle Reese

1st Custom Edition

1256741736, 978-1256741732

More Books

Students also viewed these Databases questions