Data about temperature and pressure for days

Assignment Help Basic Computer Science
Reference no: EM13919263

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.48t+ 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:

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

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

v  prompt the user to enter when the calculating should end,

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

v  prompt the user to enter the time increments,

v  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.

Reference no: EM13919263

Questions Cloud

Divided by estimated overhead pool : The general formula to allocate cost is: a. estimated overhead cost divided by cost pool b. cost pool divided by estimated overhead pool c. cost to be allocated divided by total occurrences of the allocation base d. cost base divided by estimated ove..
Creates a temporary array as part of merging : The textbook's Sorts.java merge() method creates a temporary array as part of merging, which is wasteful of computer memory. An alternative would be to store data to be sorted in a linked list rather than an array and to merge "in place" within th..
Assignment on creating a use case : Refer to the RMO CSMS marketing subsystem shown in Figure 3-11 on page 79-80 of the textbook. Write a two to three (2-3) page paper in which you:
What is the balance in additional paid-in capital : The corporation issued half the stock for cash at $8 per share, earned $336,000 during the first three months of operation, and declared a cash dividend of $60,000. At the end of the year, what is the balance in additional paid-in capital?
Data about temperature and pressure for days : 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 ..
What are the benefits of international standardization : What is ISO? What are the benefits of international standardization? How have the ISO 9000 standards been received worldwide? What are the latest changes in ISO 9000 (2000)? What are the basic principles of the latest revision to the ISO 9000 stan..
Narrow application of management accounting : The narrow application of management accounting that deals with costing products is known as:
Baseline for evaluating project performance : Tony Prince and his team working on the Recreation and Wellness Intranet Project have been asked to refine the existing cost estimate for the project so they can evaluate supplier bids and have a solid cost baseline for evaluating project performa..
Identify how your company uses quality management : Identify how your company uses quality management. Identify different areas for quality measurement and management. What types of quality tools and techniques are the best to be employed, process control, quality tools, employee involvement?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Pmt function to calculate the payments for students

In cell H13, insert a PMT function to calculate the payments for students who want to pay for their trips in three installments. Use the interest rate and months in the input area above the data. Use appropriate relative, mixed, and/or absolute ce..

  Create an employeeexception class

Create an EmployeeException class whose constructor receives a String that consists of an employee's ID and pay rate. Create an Employee class with two fields, idNum and hourlyWage.

  Database construction using mysql and php

Database Construction Using MySQL and PHP

  Analyze the use of gestures in ipads

Analyze the use of gestures in iPads. Address how users feel about gestures. Evaluate how users feel about the user input when it comes to filling out complicated forms on the iPad.

  What are federal express estimated annual savings

1. Is technology by itself enough to ensure high-quality customer service? 2. What are federal express's estimated annual savings from using information technology? 3. What are a couple of examples of information technologies used by federal Expre..

  Two main functions of user accounts in a network

What are the two main functions of user accounts in a network?

  Calculate overall return on investment of project

Calculate the overall return on investment of the project and then present a break even analysis. At what point does break-even occur?

  Research options for improving the current use of tcp/ip

Research options for improving the current use of TCP/IP and recommend new software and equipment that's available. Describe how use of equipment, software, and multiplexing could aid in improving use for communications which would reduce network con..

  Develop a web application using krl and the live web

Description/Requirements:Develop a web application using KRL and the Live web.

  Design, simulate and verify a 16-bit ripple-carry

Design, simulate and verify a 16-bit ripple-carry adder by performing the following additions/subtractions (the values of a and b are given in decimal): (i) (-10) + (100), (ii) (63) - (-127), (iii) (15) + (95), (iv) (-32) + (79), (v) (-59) + (-16)..

  Function count down

Function CountDown(count) { If (count

  Design a modular progama

A retail company must file a monthly sales tax report listing the total sales for the month and the amount of state and county sales tax collected. Design a modular progama that asks the user to enter the total sales for the month

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