Jump to content


  • Please log in to reply
No replies to this topic

#1 BatMan-



  • Members
  • PipPipPipPip
  • 165 posts
  • Bnet Name:BatMan.
  • Bnet Realm:Azeroth

Posted 01 March 2010 - 04:17 AM

Hey I am really clueless about programing and have no idea how to do this assignment so maybe if I could get some help from anyone thats knows C++ . And yes I am newb and it is due 2morrow @ like 4pm!! HELP!

You have been asked to write a program that will collect and display weather data from numerous weather data collection stations. You will provide for input of temperature, barometric pressure and wind speed for each collection station using metric values (Celcius, kPa & kph). Identify the stations only by number where 1 is the first station entered. The data entry person must be able to quit entering data at any time by typing the sentinel value ‘-999’ at the first prompt (temperature) for any station.
After the data has been entered you will process it placing the data into a table along with the converted imperial values and averages in the last row of the table (virtual example below).
After populating the table display it formatted EXACTLY as the example program.
•   As each data item is entered store it in an appropriate vector (you must NOT store the -999 ‘quit’ value)
•   After data has been entered create a 2D array (table) that is six columns wide and has enough rows to hold all data sets plus a final row for column averages.
•   Populate the table from the data vectors and calculate the appropriate conversions to imperial, placing those values next to the metric value

Here is a virtual  example of the contents of the table for 2 data sets. Note that the column/row headings are there for your convenience and are not part of the table.

#   C   F   kPa   “Merc   km/h   m/h
1   5   41   101.34   29.90   22.4   13.9
2   20   68   101.50   29.94   11.0   6.8
Avg   12.5   54.5   101.42   29.92   16.7   10.35

•   Display the table EXACTLY as in the screen shots.
•   ALL prompts must also be displayed EXACTLY as the screen shots.
For the purpose of testing you MUST write a function that is called from input if the sentinel value ‘-1000’ is entered and is hard coded to enter 5 sets of data. When this function finishes input should quit in the same way as if -999 was entered. Since the function can be called even when data has already been entered it should first clear the data vector before populating them.
Here is a list of the things that I will look for in determining your grade:
•   Design Document
•   Input from the keyboard and output to the monitor
•   Variables and constants
•   Containers (array and vector)
•   Logic for selection and iteration
•   Modularization
•   with high cohesion and
•   using both pass by value and pass by reference

Dont worry about this "display exactly like in screen shots" thingy -.-
so any hints on how to start on this?

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users