This repository implements a fully working grade management system that allows allocating and managing student information by using a file.
You may:
- Add a student
- Remove a student
- Change a student's grade
- Get the class average
- Get the highest grade
- Get the count of students
- Sort students by their grade
- Have a written report of student information that includes the average, highest grade and count of students.
make
./mainmake testmake clean-
Week 1 Program Basics
- Code location:
- main.cpp:
main(); - project.hpp:
A_MINIMUM,B_MINIMUM,C_MINIMUM,D_MINIMUM(constants),int/double/std::string(data types), project.cpp —getAverage()(arithmetic).
- main.cpp:
- Test location: test_project.cpp —
testStudentConstruction()
- Code location:
-
Week 2 Decisions and Loops
- Code location:
- main.cpp:
main()(menu-looping with do-while, switch statement on choice) - project.cpp:
Student::determineLetterGrade()(conditional),Student::isValidId(),Student::isValidGrade(),isValidMenuChoice()(input validation)
- main.cpp:
- Test location: test_project.cpp —
testMenuValidation(),testLetterGrades()
- Code location:
-
Week 3 Functions and Program Design
- Code location:
- project.hpp / project.cpp: functions across
StudentandStudentList:getStudentCount(),getAverage(),getHighestGrade(),findStudentIndex(),addStudent(),removeStudent(),changeStudentGrade(),sortByGrade(),readStudentFile(),writeStudentReport()
- project.hpp / project.cpp: functions across
- Test location: test_project.cpp —
testValidation(),testStudentConstruction()
- Code location:
-
Week 4 Arrays, Searching, and Sorting
- Code location:
- project.cpp:
findStudentIndex()(linear search overstudentList);getHighestGrade()(linear scan for max);sortByGrade()(selection sort, descending by grade)
- project.cpp:
- Test location: test_project.cpp —
testFindStudentIndex(),testAverageAndHighest(),testSortByGrade()
- Code location:
-
Week 5 Strings and Structures
- Code location:
- project.hpp:
Studentstruct (id,nameasstd::stringmembers); — project.cpp:Student::Student()constructors,Student::getId(),Student::getName()
- project.hpp:
- Test location: test_project.cpp —
testStudentConstruction(),testValidation()
- Code location:
-
Week 6 Pointers, Dynamic Memory, and Linked Lists
- Code location:
- project.hpp:
StudentNodeclass (info,nextpointer) - project.cpp:
StudentNode::StudentNode(),StudentList::addStudent()(new StudentNode, pointer traversal vianext),StudentList::removeStudent()(delete, relinkingprevious->next)
- project.hpp:
- Test location: test_project.cpp —
testAddStudent(),testRemoveStudent()
- Code location:
-
Week 7 File I/O and Integration
- Code location:
- project.cpp:
StudentList::readStudentFile()(ifstream),StudentList::writeStudentReport()(ofstream) - main.cpp:
main()(menu ties allStudentListoperations together into one program)
- project.cpp:
- Test location: test_project.cpp —
testReadStudentFile(),testWriteStudentReport()
- Code location:
- The student report is not sorted unless user selects "Sort students by grade"/choice 7 before generating the student report/choice 8.
writeStudentReport()does not sort automatically, so getting the report first will result in a report of students in whichever order students were inserted first. - Student names must be a single word.
sortByGrades()doesn't sort the linked list, leaving it in its original insertion order. However, the rest of the program doesn't use it unlessaddStudent()/choice 1 orremoveStudent()/choice 2 is called.
- My project compiles with
make. - My project runs with
./main. - My tests run with
make test. - I deleted or replaced the sample project code.
- My project uses class names that are nouns from my own project.
- My project integrates all 7 course topics in reachable code.
- My project includes at least one unit test per course topic.
- My README explains where each topic appears.
- My README explains which test verifies each topic.
- My code is committed and pushed to GitHub Classroom.