aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CST116F2021-Lab8/CONSOLE_OUTPUT_Harris-Toovy.txt160
-rw-r--r--CST116F2021-Lab8/CST116F2021-Lab8.cpp324
-rw-r--r--CST116F2021-Lab8/CST116F2021-Lab8.vcxproj14
-rw-r--r--CST116F2021-Lab8/CST116F2021-Lab8.vcxproj.filters18
-rw-r--r--CST116F2021-Lab8/Data(backup).txt9
-rw-r--r--CST116F2021-Lab8/Data.txt9
-rw-r--r--CST116F2021-Lab8/Data2(backup).txt.txt11
-rw-r--r--CST116F2021-Lab8/Data2.txt11
-rw-r--r--CST116F2021-Lab8/Lab8_Textual_work_Harris-Toovy.txt2
-rw-r--r--CST116F2021-Lab8/Report.txt14
-rw-r--r--CST116F2021-Lab8/Report2.txt0
11 files changed, 566 insertions, 6 deletions
diff --git a/CST116F2021-Lab8/CONSOLE_OUTPUT_Harris-Toovy.txt b/CST116F2021-Lab8/CONSOLE_OUTPUT_Harris-Toovy.txt
new file mode 100644
index 0000000..81623fe
--- /dev/null
+++ b/CST116F2021-Lab8/CONSOLE_OUTPUT_Harris-Toovy.txt
@@ -0,0 +1,160 @@
+This file contains the test information within this lab.
+
+---[13b - 11.9 Learn by Doing Exercises # 1]---
+
+Run 1 (N = 15, True median = 2.16):
+
+From the array: 6.9 3.34 1.99 2.16 6.88 0.64 7.93 -9.24 -9.88 7.08 -0.9 4.78 -7.91 -0.56 5.17
+The median is: 2.16
+
+C:\Users\jorda\Source\Repos\cst115-lab8-JordanHT-OIT\x64\Debug\CST116F2021-Lab8.exe (process 13700) exited with code 0.
+To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
+Press any key to close this window . . .
+
+
+Run 2 (N = 12, True median = 0.4650):
+
+From the array: 6.59 0.45 -8.58 6.29 -2.74 -5.4 6.09 0.48 0.9 2.93 -4.27 0.32
+The median is: 0.465
+
+C:\Users\jorda\Source\Repos\cst115-lab8-JordanHT-OIT\x64\Debug\CST116F2021-Lab8.exe (process 13924) exited with code 0.
+To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
+Press any key to close this window . . .
+
+
+Run 3 (N = 50, True median = 47.8550):
+
+From the array: -152.06 -19.92 170.03 -104.81 97.52 267.19 -37.05 -143.47 142.87 232.23 226.05 294.49 -27.89 267.89 -218.86 170.72 -187.75 134.71 15.77 -148.02 -117.11 135.07 -216.43 -141.42 -124.97 -150.14 -4.95 37.08 197.45 -61.41 157.59 -160.93 126.88 272.09 153.5 -59.33 90.24 208.76 213.18 -211.08 134.9 69.82 282.62 54.24 250.24 -1.33 252.65 24.38 10.73 41.47
+The median is: 47.855
+
+C:\Users\jorda\Source\Repos\cst115-lab8-JordanHT-OIT\x64\Debug\CST116F2021-Lab8.exe (process 14012) exited with code 0.
+To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
+Press any key to close this window . . .
+
+
+
+---[13c - 11.13 Debugging Exercise]----
+
+Instruction 1-4:
+
+Trouble Opening File
+
+ ** About to EXIT NOW! **
+C:\Users\jorda\Source\Repos\cst115-lab8-JordanHT-OIT\x64\Debug\CST116F2021-Lab8.exe (process 8592) exited with code 0.
+To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
+Press any key to close this window . . .
+
+
+Instruction 1-6:
+
+Catrina 30
+Yasin 29
+Ariyan 31
+Alaya 48
+Emanue 57
+Matas 59
+Zachary 19
+Quentin 83
+
+
+ ** Total Records: 8 **
+ The End
+
+C:\Users\jorda\Source\Repos\cst115-lab8-JordanHT-OIT\x64\Debug\CST116F2021-Lab8.exe (process 4800) exited with code 0.
+To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
+Press any key to close this window . . .
+
+
+Instruction 1-11:
+
+Catrina 30
+Yasin 29
+Ariyan 31
+Alaya 48
+Emanue 57
+Matas 59
+Zachary 19
+Quentin 83
+Cian 43
+
+
+ ** Total Records: 9 **
+ The End
+
+C:\Users\jorda\Source\Repos\cst115-lab8-JordanHT-OIT\x64\Debug\CST116F2021-Lab8.exe (process 6536) exited with code 0.
+To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
+Press any key to close this window . . .
+
+
+Instruction 2-2:
+
+Catrina 30
+Yasin 29
+Ariyan 31
+Alaya 48
+Emanue 57
+Matas 59
+Zachary 19
+Quentin 83
+Cian 43
+Trouble Opening File
+
+ ** About to EXIT NOW! **
+C:\Users\jorda\Source\Repos\cst115-lab8-JordanHT-OIT\x64\Debug\CST116F2021-Lab8.exe (process 2928) exited with code 0.
+To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
+Press any key to close this window . . .
+
+
+Instruction 2-6:
+
+Cannot open Data.txt
+
+ ** Exiting **
+C:\Users\jorda\Source\Repos\cst115-lab8-JordanHT-OIT\x64\Debug\CST116F2021-Lab8.exe (process 16316) exited with code 0.
+To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
+Press any key to close this window . . .
+
+
+Instruction 2-8 (NOTE: See Report.txt as well):
+
+Catrina 30
+Yasin 29
+Ariyan 31
+Alaya 48
+Emanue 57
+Matas 59
+Zachary 19
+Quentin 83
+Cian 43
+
+
+ ** Total Records: 9 **
+ The End
+
+C:\Users\jorda\Source\Repos\cst115-lab8-JordanHT-OIT\x64\Debug\CST116F2021-Lab8.exe (process 10636) exited with code 0.
+To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
+Press any key to close this window . . .
+
+
+
+---[13c - 11.14 Programming Exercises #1]----
+
+Payment overviewer MK1
+
+First name Last name SSN Wage Hours Straight-time pay Overtime Pay Status Total pay
+══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
+John Smith 123-09-8765 9.00 46 360.00 81.00 Fulltime 436.00
+Molly Brown 432-89-7654 9.50 40 380.00 0.00 Fulltime 375.00
+Tim Wheeler 239-34-3458 11.25 83 450.00 725.62 Fulltime 1170.62
+Keil Wader 762-84-6543 6.50 35 227.50 0.00 Parttime 227.50
+Trish Dish 798-65-9844 7.52 40 300.80 0.00 Parttime 300.80
+Anthony Lei 934-43-9843 9.50 56 380.00 228.00 Fulltime 603.00
+Kenin Ashes 765-94-7343 4.50 30 135.00 0.00 Parttime 135.00
+Cheryl Prince 983-54-9000 4.65 45 186.00 34.88 Fulltime 215.88
+Kim Cares 343-11-2222 10.00 52 400.00 180.00 Fulltime 575.00
+Dave Cockroach 356-98-1236 5.75 48 230.00 69.00 Fulltime 294.00
+Will Kusick 232-45-2322 15.00 45 600.00 112.50 Parttime 712.50
+
+C:\Users\jorda\Source\Repos\cst115-lab8-JordanHT-OIT\x64\Debug\CST116F2021-Lab8.exe (process 18336) exited with code 0.
+To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
+Press any key to close this window . . . \ No newline at end of file
diff --git a/CST116F2021-Lab8/CST116F2021-Lab8.cpp b/CST116F2021-Lab8/CST116F2021-Lab8.cpp
index ece7ad8..933ba61 100644
--- a/CST116F2021-Lab8/CST116F2021-Lab8.cpp
+++ b/CST116F2021-Lab8/CST116F2021-Lab8.cpp
@@ -1,9 +1,331 @@
//Code by Jordan Harris-Toovy for OIT's CST116 lab 8, November 2021
+
+//13b - 11.9 Learn by Doing Exercises # 1:
+/*
#include <iostream>
using namespace std;
+#define MAX_VAL 15
+
+void bubSort(float[MAX_VAL], int);
+float findMedian(float[MAX_VAL], int);
int main()
{
- //WIP - Do not grade unitl this line is replaced
+ float testArray[MAX_VAL] = { 6.9, 3.34, 1.99, 2.16, 6.88, 0.64, 7.93, -9.24, -9.88, 7.08, -0.9, 4.78, -7.91, -0.56, 5.17 };
+
+ cout << "From the array: ";
+ for (int idx = 0; idx < MAX_VAL; idx++)
+ {
+ cout << testArray[idx] << " ";
+ }
+
+ cout << "\nThe median is: ";
+
+ cout << findMedian(testArray, MAX_VAL) << endl;
+
+ return (0);
+}
+
+void bubSort(float arr[MAX_VAL], int len)
+{
+ int pass = 0;
+ float hold = 0.0F;
+
+ while (pass <= len)
+ {
+ for (int idx = 0; idx < (len - 1); idx++)
+ {
+ if (arr[idx] > arr[idx + 1])
+ {
+ hold = arr[idx + 1];
+ arr[idx + 1] = arr[idx];
+ arr[idx] = hold;
+
+ pass = 0;
+ }
+ else
+ {
+ pass++;
+ }
+ }
+ }
+}
+
+float findMedian(float arr[MAX_VAL], int len)
+{
+ bubSort(arr, len);
+ int center = int(floor((len / 2)));
+
+ if ((len % 2) != 0)
+ {
+ return arr[center];
+ }
+ else
+ {
+ return ((arr[center] + arr[center - 1]) / 2);
+ }
+}
+*/
+
+//13c - 11.13 Debugging Exercise:
+/********************************************************************
+* File: Chapter 11 Debug.cpp
+*
+* General Instructions: Complete each step before proceeding to the
+* next.
+*
+* Debugging Exercise 1
+*
+* 1) Make your own data file like Troy 12, with the next person on the
+* next line and save it to a directory you create on your drive.
+* 2) Under the Project menu, select Add Existing Item and
+* add the input file you just placed on your drive to your
+* current project. Make sure your Solution Explorer window
+* is visible. If not, you can display it by selecting Solution
+* Explorer (or Ctrl+Alt+L).
+* 3) Open the input file by simply double clicking the name of the
+* file in your Solution Explorer.
+* 4) Build and execute the program.
+* 5) Update the file paths below to correctly represent the path you
+* created.
+* 6) Rebuild and execute the program.
+* 7) Examine the code and the output and notice the use of
+* parallel arrays.
+* 8) Add the output file created via the execution of
+* your program to your Project. Execute your program again
+* and notice how Visual Studio has rewritten your output file
+* and asks if you would like to reload the file (select Yes).
+* 9) Examine the contents of both the input and the output file.
+* 10) Fix all the problems in your code that exist in relation to
+* the output. Verify that your output is appropriate for your
+ input file.
+* 11) Build and execute your code until you have all errors
+* removed and all the output is correct.
+*
+* Debugging Exercise 2
+*
+* 1) Replace the double slashes (\\) in the input file open statement
+* with only a single slash
+* (i.e., inFile.open("C:\TEMP\Chap_11_data.txt").
+* 2) Build your code, noticing the impact of the invalid path you
+* created in the previous step.
+* 3) Replace the backslashes as they were.
+* 4) Change both the input and output filenames so they are
+* invalid.
+* 5) Update the file related error messages within the code
+* to also provide the specific name of the file that is having a
+* problem.
+* 6) Rebuild and execute your program to verify that your messages
+* are correct.
+* 7) Correct the path names.
+* 8) Build and execute your code and carefully check your
+* output on both the console and in the output file.
+*
+********************************************************************/
+/*
+#include <iostream>
+#include <fstream> // For the files!!!!
+#include <iomanip> // For manipulators & formatting options
+using std::cin;
+using std::cout;
+using std::endl;
+using std::setw;
+using std::ios;
+
+using std::ifstream;
+using std::ofstream;
+
+const int EMPLOYEES = 20;
+const int MAX = 21;
+
+int ReadData(ifstream& inFile, ofstream& outFile, char name[][MAX], int age[]);
+void WriteOutputFile(ofstream& outFile, char name[][MAX], int age[],
+ int counter);
+void PrintTotalsAndSummary(ofstream& out, int totalRecords);
+
+int main()
+{
+ char name[EMPLOYEES][MAX];
+ int age[EMPLOYEES];
+ int record_counter(0);
+
+ ifstream inFile;
+
+ // Notice how this automatically opens the file
+ ofstream outFile("C:\\Users\\jorda\\source\\repos\\cst115-lab8-JordanHT-OIT\\CST116F2021-Lab8\\Report.txt");
+
+ inFile.open("C:\\Users\\jorda\\source\\repos\\cst115-lab8-JordanHT-OIT\\CST116F2021-Lab8\\Data.txt");
+
+ if (inFile.is_open())
+ {
+ record_counter = ReadData(inFile, outFile, name, age);
+ inFile.close();
+
+ if (outFile.is_open())
+ {
+ WriteOutputFile(outFile, name, age, record_counter);
+ PrintTotalsAndSummary(outFile, record_counter);
+ outFile.close();
+ }
+ else
+ {
+ cout << "Cannot open Report.txt";
+ cout << "\n\n\t\t ** Exiting ** ";
+ }
+ }
+ else
+ {
+ cout << "Cannot open Data.txt";
+ cout << "\n\n\t\t ** Exiting ** ";
+ }
+ return 0;
+}
+int ReadData(ifstream& inFile, ofstream& outFile, char name[][MAX], int age[])
+{
+ int counter = 0;
+ inFile >> name[counter] >> age[counter]; // Priming Read
+
+ while (!inFile.eof())
+ {
+ cout << setiosflags(ios::left) << setw(25)
+ << name[counter] << resetiosflags(ios::left)
+ << setw(4) << age[counter] << endl;
+ counter++;
+ inFile >> name[counter] >> age[counter];
+ }
+
+ return counter;
}
+void WriteOutputFile(ofstream& outFile, char name[][MAX], int age[], int counter)
+{
+ outFile << " Here is the Output File" << endl;
+ for (int r = 0; r < counter; r++)
+ {
+ outFile << setiosflags(ios::left) << setw(25)
+ << name[r] << setw(4)
+ << resetiosflags(ios::left) << age[r]
+ << endl;
+ }
+}
+void PrintTotalsAndSummary(ofstream& outFile, int totalRecords)
+{
+ // To screen
+ cout << "\n\n\t** Total Records: " << totalRecords << " **\n"
+ << "\t\t The End \n";
+
+ // To file
+ outFile << "\n\n\t** Total Records: " << totalRecords << " **\n"
+ << "\t\t The End \n";
+}
+*/
+
+//13c - 11.14 Programming Exercises #1:
+
+#include <iostream>
+#include <fstream>
+#include <iomanip>
+using namespace std;
+#define MAX_LENGTH 20
+#define MAX_ENTRIES 15
+
+int getInput(ifstream&, char[MAX_ENTRIES][MAX_LENGTH], char[MAX_ENTRIES][MAX_LENGTH], char[MAX_ENTRIES][12], float[MAX_ENTRIES], int[MAX_ENTRIES], char[MAX_ENTRIES]);
+void displayInfo(char[MAX_ENTRIES][MAX_LENGTH], char[MAX_ENTRIES][MAX_LENGTH], char[MAX_ENTRIES][12], float[MAX_ENTRIES], int[MAX_ENTRIES], float[MAX_ENTRIES], float[MAX_ENTRIES], char[MAX_ENTRIES], float[MAX_ENTRIES], int);
+
+int main(void)
+{
+ char firstName[MAX_ENTRIES][MAX_LENGTH], lastName[MAX_ENTRIES][MAX_LENGTH], wageType[MAX_ENTRIES], socials[MAX_ENTRIES][12];
+ float baseWage[MAX_ENTRIES]{ 0 }, normalPay[MAX_ENTRIES]{ 0 }, overtimePay[MAX_ENTRIES]{ 0 }, totalPay[MAX_ENTRIES]{ 0 };
+ int hours[MAX_ENTRIES]{ 0 }, entries = 0;
+
+ //Define and open all the I/O files
+ ifstream inputData;
+ inputData.open("C:\\Users\\jorda\\source\\repos\\cst115-lab8-JordanHT-OIT\\CST116F2021-Lab8\\Data2.txt");
+
+ if (!inputData.fail())
+ {
+ entries = getInput(inputData, firstName, lastName, socials, baseWage, hours, wageType);
+ inputData.close();
+ }
+ else //Exit if the file cannot be opened
+ {
+ cout << endl << "Failed to open data file" << endl;
+ return (1);
+ }
+
+ for (int idx = 0; idx < entries; idx++)
+ {
+ if (hours[idx] > 40)
+ {
+ normalPay[idx] = baseWage[idx] * 40.0F;
+ overtimePay[idx] = baseWage[idx] * 1.5F * (hours[idx] - 40);
+ }
+ else
+ {
+ normalPay[idx] = baseWage[idx] * hours[idx];
+ }
+
+ totalPay[idx] = overtimePay[idx] + normalPay[idx];
+
+ if (wageType[idx] == 'F') //Pay union fees
+ {
+ totalPay[idx] -= 5.0F;
+ }
+ }
+
+ displayInfo(firstName, lastName, socials, baseWage, hours, normalPay, overtimePay, wageType, totalPay, entries);
+
+ return (0);
+}
+
+//Reads the contents in an input file via a filestream. Returns the number of records read.
+int getInput(ifstream& dataFile, char fName[MAX_ENTRIES][MAX_LENGTH], char lName[MAX_ENTRIES][MAX_LENGTH], char SSN[MAX_ENTRIES][12], float baseWage[MAX_ENTRIES], int hours[MAX_ENTRIES], char status[MAX_ENTRIES])
+{
+ int linesRead = 0;
+
+ dataFile >> fName[0] >> lName[0] >> SSN[0] >> baseWage[0] >> hours[0] >> status[0];
+
+ while (!dataFile.eof())
+ {
+ linesRead++;
+ dataFile >> fName[linesRead] >> lName[linesRead] >> SSN[linesRead] >> baseWage[linesRead] >> hours[linesRead] >> status[linesRead];
+ }
+
+ return (linesRead);
+}
+
+//Displays all relevant employee payment information.
+void displayInfo(char fName[MAX_ENTRIES][MAX_LENGTH], char lName[MAX_ENTRIES][MAX_LENGTH], char SSN[MAX_ENTRIES][12], float baseWage[MAX_ENTRIES], int hours[MAX_ENTRIES], float normalPay[MAX_ENTRIES], float overtimePay[MAX_ENTRIES], char status[MAX_ENTRIES], float totalPay[MAX_ENTRIES], int entries)
+{
+ cout << left;
+ cout << "Payment overviewer MK1\n\n" << setw(MAX_LENGTH) << "First name" << setw(MAX_LENGTH) << "Last name" << setw(16) << "SSN" << setw(8) << "Wage" << setw(8) << "Hours" << setw(20) << "Straight-time pay" << setw(16) << "Overtime Pay" << setw(12) << "Status" << setw(16) << "Total pay" << endl;
+
+ for (int idx = 0; idx < (MAX_LENGTH * 2 + 90); idx++) //Adjust spacing as needed
+ {
+ cout << char(205);
+ }
+
+ cout << endl;
+
+ for (int idx = 0; idx < entries; idx++)
+ {
+ cout << setw(MAX_LENGTH) << fName[idx];
+ cout << setw(MAX_LENGTH) << lName[idx];
+ cout << setw(16) << SSN[idx]; //Adjust spacing as needed
+ cout << fixed << setprecision(2) << setw(8) << baseWage[idx];
+ cout << setw(8) << hours[idx];
+ cout << fixed << setprecision(2) << setw(20) << normalPay[idx];
+ cout << fixed << setprecision(2) << setw(16) << overtimePay[idx];
+
+ if (status[idx] == 'F')
+ {
+ cout << setw(12) << "Fulltime";
+ }
+ else
+ {
+ cout << setw(12) << "Parttime";
+ }
+
+ cout << fixed << setprecision(2) << setw(16) << totalPay[idx] << endl;
+ }
+} \ No newline at end of file
diff --git a/CST116F2021-Lab8/CST116F2021-Lab8.vcxproj b/CST116F2021-Lab8/CST116F2021-Lab8.vcxproj
index f68c1cb..cbaf73a 100644
--- a/CST116F2021-Lab8/CST116F2021-Lab8.vcxproj
+++ b/CST116F2021-Lab8/CST116F2021-Lab8.vcxproj
@@ -29,26 +29,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
@@ -143,6 +143,12 @@
</ItemGroup>
<ItemGroup>
<Text Include="Lab8_Textual_work_Harris-Toovy.txt" />
+ <Text Include="CONSOLE_OUTPUT_Harris-Toovy.txt" />
+ <Text Include="Data.txt" />
+ <Text Include="Data%28backup%29.txt" />
+ <Text Include="Report.txt" />
+ <Text Include="Data2.txt" />
+ <Text Include="Data2%28backup%29.txt.txt" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/CST116F2021-Lab8/CST116F2021-Lab8.vcxproj.filters b/CST116F2021-Lab8/CST116F2021-Lab8.vcxproj.filters
index d89281e..9afc0fa 100644
--- a/CST116F2021-Lab8/CST116F2021-Lab8.vcxproj.filters
+++ b/CST116F2021-Lab8/CST116F2021-Lab8.vcxproj.filters
@@ -23,5 +23,23 @@
<Text Include="Lab8_Textual_work_Harris-Toovy.txt">
<Filter>Source Files</Filter>
</Text>
+ <Text Include="CONSOLE_OUTPUT_Harris-Toovy.txt">
+ <Filter>Source Files</Filter>
+ </Text>
+ <Text Include="Data.txt">
+ <Filter>Source Files</Filter>
+ </Text>
+ <Text Include="Data%28backup%29.txt">
+ <Filter>Source Files</Filter>
+ </Text>
+ <Text Include="Report.txt">
+ <Filter>Source Files</Filter>
+ </Text>
+ <Text Include="Data2.txt">
+ <Filter>Source Files</Filter>
+ </Text>
+ <Text Include="Data2%28backup%29.txt.txt">
+ <Filter>Source Files</Filter>
+ </Text>
</ItemGroup>
</Project> \ No newline at end of file
diff --git a/CST116F2021-Lab8/Data(backup).txt b/CST116F2021-Lab8/Data(backup).txt
new file mode 100644
index 0000000..b2881c7
--- /dev/null
+++ b/CST116F2021-Lab8/Data(backup).txt
@@ -0,0 +1,9 @@
+Catrina 30
+Yasin 29
+Ariyan 31
+Alaya 48
+Emanue 57
+Matas 59
+Zachary 19
+Quentin 83
+Cian 43
diff --git a/CST116F2021-Lab8/Data.txt b/CST116F2021-Lab8/Data.txt
new file mode 100644
index 0000000..b2881c7
--- /dev/null
+++ b/CST116F2021-Lab8/Data.txt
@@ -0,0 +1,9 @@
+Catrina 30
+Yasin 29
+Ariyan 31
+Alaya 48
+Emanue 57
+Matas 59
+Zachary 19
+Quentin 83
+Cian 43
diff --git a/CST116F2021-Lab8/Data2(backup).txt.txt b/CST116F2021-Lab8/Data2(backup).txt.txt
new file mode 100644
index 0000000..1227fb5
--- /dev/null
+++ b/CST116F2021-Lab8/Data2(backup).txt.txt
@@ -0,0 +1,11 @@
+John Smith 123-09-8765 9.00 46 F
+Molly Brown 432-89-7654 9.50 40 F
+Tim Wheeler 239-34-3458 11.25 83 F
+Keil Wader 762-84-6543 6.50 35 P
+Trish Dish 798-65-9844 7.52 40 P
+Anthony Lei 934-43-9843 9.50 56 F
+Kenin Ashes 765-94-7343 4.50 30 P
+Cheryl Prince 983-54-9000 4.65 45 F
+Kim Cares 343-11-2222 10.00 52 F
+Dave Cockroach 356-98-1236 5.75 48 F
+Will Kusicj 232-45-2322 15.00 45 P
diff --git a/CST116F2021-Lab8/Data2.txt b/CST116F2021-Lab8/Data2.txt
new file mode 100644
index 0000000..b1bf165
--- /dev/null
+++ b/CST116F2021-Lab8/Data2.txt
@@ -0,0 +1,11 @@
+John Smith 123-09-8765 9.00 46 F
+Molly Brown 432-89-7654 9.50 40 F
+Tim Wheeler 239-34-3458 11.25 83 F
+Keil Wader 762-84-6543 6.50 35 P
+Trish Dish 798-65-9844 7.52 40 P
+Anthony Lei 934-43-9843 9.50 56 F
+Kenin Ashes 765-94-7343 4.50 30 P
+Cheryl Prince 983-54-9000 4.65 45 F
+Kim Cares 343-11-2222 10.00 52 F
+Dave Cockroach 356-98-1236 5.75 48 F
+Will Kusick 232-45-2322 15.00 45 P \ No newline at end of file
diff --git a/CST116F2021-Lab8/Lab8_Textual_work_Harris-Toovy.txt b/CST116F2021-Lab8/Lab8_Textual_work_Harris-Toovy.txt
index d173b1f..cd8c7ba 100644
--- a/CST116F2021-Lab8/Lab8_Textual_work_Harris-Toovy.txt
+++ b/CST116F2021-Lab8/Lab8_Textual_work_Harris-Toovy.txt
@@ -1,7 +1,7 @@
13a - CH11.7 Exercises:
#5:
-if(!testFile.fail) //Part a
+if(!testFile.fail()) //Part a
{
testFile >> lname[0] >> id[0] >> age[0]; //Part b
cout << lname[0] << " " << id[0] << " " << age[0] << " " << endl;
diff --git a/CST116F2021-Lab8/Report.txt b/CST116F2021-Lab8/Report.txt
new file mode 100644
index 0000000..93cc5a6
--- /dev/null
+++ b/CST116F2021-Lab8/Report.txt
@@ -0,0 +1,14 @@
+ Here is the Output File
+Catrina 30
+Yasin 29
+Ariyan 31
+Alaya 48
+Emanue 57
+Matas 59
+Zachary 19
+Quentin 83
+Cian 43
+
+
+ ** Total Records: 9 **
+ The End
diff --git a/CST116F2021-Lab8/Report2.txt b/CST116F2021-Lab8/Report2.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/CST116F2021-Lab8/Report2.txt