summaryrefslogtreecommitdiff
path: root/CST116-Ch11-Debugging-Ahmed/CST116-Ch11-Pseudocode-Ahmed.txt
blob: 7cd75477b81e89b628f86258c6b2587153a7d421 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Iniitialize a constant Int EMPLOYEES to be equal to 20
Initialize a constant int MAX to be equal to 21

Initialize a chaaracter 2D-array name to have rows of EMPLOYEES and columns of MAX
Initialize an integer array name to have a lenght of EMPLOYEES

set the desired output file using ofstream outFile to be C:\\TEMP\\CST116-Ch11-Report-Ahmed.txt
Open the fire to read from at C:\\TEMP\\CST116-Ch11-data-Ahmed.txt

If the file is open
	store the data from the file 
	close the input file
	if the output file is open
		write the data we just stored to this file
		close the output file

	otherwise
		tell the user there was trouble opening the file
otherwise
	tell the user there was trouble opening the file

definition for readData
	Initialize a counter to be 0
	prime the read from the file by inputting data to the 0th place of both age and name

	while we are not at the end of the file
		print out the names and ages at the index of counter
		increment counter
		again input new data into the naem and age array at the new index of counter

definition of writeoutputfile
	write " Here is the Output File" to the output file
	enter a for loop which iterates until r is no longer less than coutner, starting from 0
		output the data of name and age at the index of r


definition of printotalsummary
	print out the total amount of records that we have, both to the output file and to the screen