定义一个学生类CStudent实现简单的学籍管理功能,要求该类至少实现以下功能: (1) 录入学生的基本信息(包括姓名,学号,性别,年龄,专业,入学时间,各门功课成绩) (2) 输出学生的基本信息 (3) 选课(输入时间和所选的课程) (4) 统计每门课的学分绩点 (5) 统计每学期的平均学分绩点 (6) 统计重考科目 (7) 统计重修科目 注意: (1)新设计的类中所需要的数据成员需要根据所要实现的功能自行设计; (2)用一个演示程序完成对所设计的新类的功能测试,并给出测试数据和实验结果; (3)为增加程序可读性,请在程序中对类成员进行适当注释说明
时间: 2023-07-15 07:10:34 浏览: 142
CStudent class is designed to manage student status and it must have functions that can implement the following operations:
1. Record student's basic information, including name, student ID, gender, age, major, enrollment time, grades for each subject.
2. Output student's basic information.
3. Select courses (input time and selected courses).
4. Calculate the grade point for each course.
5. Calculate the average grade point for each semester.
6. Count the number of subjects that require a makeup exam.
7. Count the number of subjects that require a retake.
Note:
(1) The data members required in the new design class must be designed according to the functions to be implemented.
(2) Use a demo program to test the functions of the new designed class and provide test data and experimental results.
(3) To improve the readability of the program, please provide appropriate comments for the class members.
阅读全文