diff options
Diffstat (limited to 'Lab3Pseudocode.txt')
| -rw-r--r-- | Lab3Pseudocode.txt | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/Lab3Pseudocode.txt b/Lab3Pseudocode.txt index 2fee069..52a6e73 100644 --- a/Lab3Pseudocode.txt +++ b/Lab3Pseudocode.txt @@ -4,13 +4,14 @@ ifstream is declared ofstream is declared -const employees is set to 20 -const maxx is set to 21; +const max is set to 50; -Int ReadData is declared with the following: ifstream& inFile, ofstream& outFile, char name array, int age array +Int ReadData is declared with the following: ifstream& inFile, ofstream& outFile, int pick array, int drop array, int psgr array + int dist array int fare array, float toll array -void WriteOutputFile is declared with the following: ofstream& outFile, char name array, int age array, +void WriteOutputFile is declared with the following: ofstream& outFile, int pick array, int drop array, int psgr array + int dist array int fare array, float toll array int counter void PrintTotalsAndSummary is declared with the following: ofstream& out, int totalRecords @@ -18,15 +19,19 @@ void PrintTotalsAndSummary is declared with the following: ofstream& out, int to Main Function is Declared -name array is filled with two const (Employees)(Max) -age array is filled with const Employees + int record counter is set to zero +string nameFile is declared + ifstream infile is declared ofstream is set to make a output file to a path -infile is set to open a file that has been created. +infile is set to open a file that has been inputed by the user. + +Display Please Enter the file name with the file extension: +enter nameFile if the file is successfully opened @@ -70,9 +75,9 @@ Look for the following name and age on each side -Name Age +Trip Pass Dist Fare Toll TF CM -John 19 +1 5 5.43 9.69 0 9.69 1.78 contiune counting until all data has been read. @@ -90,9 +95,9 @@ for loop (For each record that is less than or equal to counter record is counte Write each record in this format -Name Age +Trip Pass Dist Fare Toll TF CM -John 19 +1 5 5.43 9.69 0 9.69 1.78 End of For loop @@ -102,15 +107,15 @@ PrintTotalsAndSummary is declared Display to the user -Total Records: - -The End +Total People Transported: +Total Paid: +Average Cost Per Person: Display to the file -Total Records: - -The End +Total People Transported: +Total Paid: +Average Cost Per Person: End of PrintTotalsAndSummary |