a) Display a \'Banner\' page at the beginning, which showsat least the following
ID: 3618746 • Letter: A
Question
a) Display a 'Banner' page at the beginning, which showsat least the
followinginformation (Order and format set by programmer):
. "Oregon WeatherStation Simulator"
. Team #6
. Members: Larry, Moe, Joe
. Date of Program Completion: 5/10/2010
. COSC 230
. Project 2
b) Provide:
1) A User friendly interface,
2) An interactive user interface, with
3) Only keyboard and display as I/Odevices: no Classes or Files shall be used
c) Prompt theuser for all actions to take
d) Begin by prompting user for weather atdesired dummy locations:
1) Washington DC
2) Baltimore MD
3) Alexandria VA
4) Columbia MD
e) For each userrequest the program shall display simulated data for:
1) Temperature, 2) Rel Humidity. 3),Barometric Pressure,
4) Wind Speed, 5) Wind direction (1 of4), 6) Probability of rain
f) Generate simulated weather data using arandom number generator
g) Nominal data shall be within the following limits:
Temperature deg.F - 40 to 78
Rel. Humidity % - 48 -100
Bar. Press MmHg - 28.0 to 31.5
Wind Speed Mph - 5 to 35
Wind Dir Compass - N, S, E, W
Prob Rain % - 10to 95
h) Prompt theuser to ask for a location or to quit
i) Have anarrative summary describing the program operation, which shall be included
in the program source code as a set ofmultiline comments.
j) Have everypart of the program fully COMMENTED such that the program may be a
SELF-DOCUMENTED program.
Explanation / Answer
please rate - thanks #include #include #include // contains prototypes for functions srandand rand #include // Include for the timefunction #include using namespace std; int menu(); void banner(); void seedrandom(); int getval(int,int); double getval(double,double); void print(int,int,int,int,int,int,double); int main() {int repeat = 1,choice; int temp,humid,speed,dir,rain; double press; seedrandom(); banner(); while(repeat > 0) // USE AGAIN IFNEEDED {choice=menu(); temp=getval(-40,100); humid=getval(-40,100); speed=getval(-5,35); dir=getval(1,4); rain=getval(-10,95); press=getval(28.0,31.5); print(choice,temp,humid,speed,dir,rain,press); system("PAUSE"); // WAIT cout>repeat; // GOAGAIN? } // ENDWHILE() return 0; // indicates successful termination } // end main void print(int choice,int temp,int humid,int speed,int dir,intrain,double press) {char direction[4]={'N','S','E','W'}; string city[4]={"Washington DC","Baltimore MD","AlexandriaVA","Columbia MD"}; time_t time_now; time(&time_now); coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.