Motivation: Topics covered by this project;
Vectors (C++ container for holding data)
File I/O and streams
cpp and h files
A little on pointers
You are given a file that has an unknown number of rows, and 3 columns of integers.
Assume there are no malformed rows (ie != 3 columns). Looks like the following.
This file can have any name, but I will call it testdata.txt for the purposes of this
document. The first column is process_number, second is start_time and third is
I have provided a header file which describes the API that you are to code to
1. Please create and complete utilities.cpp.
2. Please create and complete main.cpp. It should have your main() function. Its
purpose is to verify all the functions from utilities.cpp.
3. Use utilities.h to link main.cpp and utilities.cpp. DO NOT MODIFY
UTILITIES.H it’s a contract between you and my test harness
4. Please remove superfluous imports.
In the interest of a minimal API, notice I’ve exposed a minimal interface in utilities.h.
Clients of utilities.h do not need to see what kind of datastructure is holding
8, 1, 19
structures, so it isn’t referenced anywhere in utilities.h. This means the underlying
datastructure can be changed in future releases without affecting existing clients. Also
, if a function does not need to be called outside of utilities.cpp then it isn’t exposed in
Remember that header files should have ONLY enough includes so that any file that
includes them will compile cleanly with no errors. Other necessary includes should
go in the cpp file.
Documentation and Testing
Make sure you comment each function and the program as a whole. Test your
program extensively (this means writing test code for your utilities.cpp
implementation). I will use my own version of TestData.txt and Main.cpp and
utilities.h to test your project.
To Turn In
40% File input working, including tokenizing lines
60% Your .cpp file
APIs that may help
ifstream and ofstream