//------------------------------------------------------------------- // File :main.C // Author :Alicia Thorsen // Course :CS1129 // // Program reads student names and numeric grades from an input file, // calculates their letter grades and writes it all to an output file. //------------------------------------------------------------------- #include "application.h" #include #include using namespace std; int main(int argc, char* argv[]) { string inputFileName; Application grader; // Check if the input file was specified on the command line. if (argc != 2) { cerr << "Usage: " << argv[0] << " filename" << endl; exit(1); } // Get file name. inputFileName = argv[1]; cout << "Reading courses." << endl; grader.readInputFile(inputFileName); cout << "Calculating grades." << endl; grader.calcLetterGrades(); cout << "Writing to output file." << endl; grader.writeOutputFile(); return 0; }