#include #include "hydro.h" #include "FlowList.h" #include #include using namespace std; int main(void) { FlowList x; int numRecords; displayHeader(); numRecords = readData(x); while(1) { switch(menu()) { case 1: display(x); break; case 2: break; } } } void clearScreen(void) { #ifndef UNIX system("clear") #endif } void pressEnter() { cout<<"<<>>"<>input_struct.year>>input_struct.flow; x.insert(input_struct); } return x.count(); } int menu() { int choice = -1; clearScreen(); cout<<"Please select one of the following operations"<>choice; cleanStandardInputStream(); return choice; } void display(FlowList* x) { x.display(); pressEnter(); } void addData(FlowList* x) { ListItem input_struct; cout<<"Please enter a year:"<>input_struct.year; cout<>input_struct.flow; x.insert(input_struct); numRecords = x.count(); pressEnter(); } void removeData(FlowList* x) { ListItem remove_struct; cout<<"Please enter the year to be removed:"<>remove_struct.year; x.remove(remove_struct); numRecords = x.count(); pressEnter(); return; } void saveData(FlowList* x) { x.export(); pressEnter(); } void statistics(FlowList* x) { cout<<"The average flow is "<