summaryrefslogtreecommitdiff
path: root/Lab3Pseudocode.txt
diff options
context:
space:
mode:
authorAnibal LopezBonilla <[email protected]>2022-12-01 10:42:14 -0800
committerAnibal LopezBonilla <[email protected]>2022-12-01 10:42:14 -0800
commitb525c470edab074d05d24abfd7a935a83e1c7168 (patch)
tree80ec7ef3b08601ed0e6020b2b7c9acddc32251ca /Lab3Pseudocode.txt
parentPush 4 (diff)
downloadcst116-lab3-lopez-bonilla-master.tar.xz
cst116-lab3-lopez-bonilla-master.zip
Diffstat (limited to 'Lab3Pseudocode.txt')
-rw-r--r--Lab3Pseudocode.txt39
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