Exercise #3
This assignment is a continuation of the exercise 2. The requirements for this assignment are the same as exercise 2. You are to convert the student struct to a class and make the four functions, getStudentData(), checkStudentData(), calculateFinalGrade(), and printStudentData(), members of your student class.
Make sure you complete the following steps for this assignment:
- Convert student to a class. The data members should be private. The three functions, getStudentData(), calculateFinalGrade(), and printStudentData(), should be public members functions. checkStudentData() should be private.
- Add a fifth function to the class - void DeleteName(void). This function should handle the delete for the lastname member.
- printStudentData() should be a const member function.
- Make DeleteName() an implicit inline function.
- In main(), prompt the user for the number of students to process. Dynamically allocate the memory for the student objects.
- Run your code with at least 4 student objects that demonstrate adequate testing of your program.
沒有留言:
張貼留言