Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Goal:  Using loops, functions, and formatting output. Do not use arrays.

Problem:  Once launched a weather balloon can gather data about temperature and pressure for days.  During the day the sun will warm the helium in the balloon and the balloon will rise to a higher altitude.  At night, the helium will cool and the balloon will sink.  This change in altitude can be approximated by the equation

Altitude(t) = -0.12t4 + 12t3 - 380t2 + 4100 t +220

where t is time in hours and altitude is in meters.  The velocity of the balloon can similarly be approximated by the polynomial

Velocity(t) = -0.48t3 + 36t2 - 760t + 4100

where t again is in hours and velocity is in meters/hour.

For this project you are to write a program that will calculate the altitude (in meters) and velocity (in meters per second) of the balloon to create a table and histogram of the height.  You program should:

prompt the user to enter a start time for the monitoring,

robustly confirm that the number is greater than or equal to  0 and less than or equal to 50,

prompt the user to enter when the calculating should end,

robustly confirm that the input is greater than the starting time and less than or equal to 50 hours,

prompt the user to enter the time increments,

and robustly confirm that the time increments > 0 and less than 3 hours. 

Next your program should use a for loop to generate a table beginning at the start time and ending at the stop time.  This table should contain the time, the balloon height (meters) and the balloon velocity (meters/second) and a horizontal histogram that displays the height of the balloon using asterisks.  Each asterisk should symbolize 500 meters and you should round the number of asterisks that are printed, e.g. 3225 would be printed as 6 asterisks and 3790 would be printed as 8 asterisks.  Your table would then look something like

Time        Height         Velocity        (Each * symbolizes 500 meters)

(hrs)        (meters)        (m/s)

0.00         220.00         1.14                

0.50       2176.49         1.04                 ****

1.00       3951.88         0.94                 ********

1.50       5554.89         0.84                 ***********

2.00       6994.08         0.76                 **************

2.50       8277.81         0.67                 *****************

3.00       9414.28         0.59                 *******************

The calculation of height and velocity should be done in a single function that will accept the time, calculate the height and velocity of the balloon and send both the height and velocity back to the function call.

Your program should also employ a do-while loop that allows the user to repeat the entire process with different starting and stopping times.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91522518
  • Price:- $50

Priced at Now at $50, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Question suppose your corporate commercial website server

Question : Suppose your corporate commercial Website server is located in a demilitarized zone (DMZ) so that potential and existing customers can access it. Explain the steps you would take to secure the Web server and t ...

Question you need to research the topic and discuss the

Question: You need to research the topic and discuss the topic in at 400 words with references. Then, . reference will not count as a discussion. What would be the impact of predictive modeling on healthcare and medicine ...

Question 1 a server with an upload rate of 5000 bitssec

Question : 1. A server with an upload rate of 5,000 bits/sec must distribute a 10,000 bit file to 20 clients. Each client has a download rate of 4,000 bits/sec. What is the minimum time required to distribute the file to ...

The inflation rate is 20 per year the real rate of return

The inflation rate is 2.0% per year. The real rate of return is 2.5% per year. A perpetuity that paid $100 this year will provide income that grows by the inflation rate. What is the value of the perpetuity?

Write a program to ask the user to eithernbspselect 1 to

Write a program to ask the user to either  Select 1 to print the digits in an integer reversely  Select 2 to print the characters in a string reversely using a switch case, your program will either 1- call the recursive ...

Here is a series of addresses in hexadecimal20w 3cr 10r 16w

Here is a series of addresses in hexadecimal: 20(w), 3C(r), 10(r), 16(w), 20(r), 04(w), 28(r), 6(r), 10(w), 17(w) Assume a LRU replacement algorithm. Draw each of the following caches as it would appear at the end of the ...

Question summarize the human-computer interface hci of

Question : Summarize the human-computer interface (HCI) of Microsoft Word 2013 and Visio 2013. Explain the importance of HCI and usability of the software. Be sure to note any commonalities between the applications and n ...

Suppose there are n people in a team the coach wants to

Suppose there are n people in a team. The coach wants to know how many different pairs of people he can choose in a team. Write a program in C that shows the coach, the total number of different pairs he can choose in th ...

Suppose you have to write a small java program that catches

Suppose you have to write a small Java program that catches exceptions with super classes. You are required to use inheritance to create an exception superclass (called ExceptionA) and exception subclasses ExceptionB and ...

Calculate the present worth of all costs for a newly

Calculate the present worth of all costs for a newly acquired machine with an initial cost of $30,000, no trade-in value, a life of 15 years, and an annual operating cost of $13,000 for the first 4 years, increasing by 1 ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As