Question
I need to edit to following code to implement what is being requested above: #include #include using namespace std; void input(double& current_temperature, double& current_wind_speed, string&
I need to edit to following code to implement what is being requested above:
#include
void input(double& current_temperature, double& current_wind_speed, string& wind_direction) { cout > current_temperature; cout > current_wind_speed; cout
//ask user to provide weather station name string weatherstation; cout
string wind_direction; int count = 0; int choice; do { cout > choice; switch (choice) { case 1: input(current_temperature, current_wind_speed, wind_direction); count += 1; // increment the value of count by 1; if its zero means no previous input given break; case 2: print(count, weatherstation, current_temperature, current_wind_speed, wind_direction); case 3: break; default: // for invalid option cout
Project 5 is based on Project 4, using functions. Extend the functionality of Project 4 to store a history of weather reading inputs, at most 5 inputs. If there are more than 5 inputs, the program just keeps the most recent 5 ones. replace the print option of the menu in Project 4 with the following 2 print options: Print the most recent weather information (including the station name, temperature, wind speed, and wind direction) Print the weather reading history from most recent to oldest Just print the station name once at the start of print If there are less than 5 inputs, e.g., 3, then just print 3 readings. If there are at least 5 inputs, print the most recent five onesStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started