C++--学生信息管理系统

//成绩类,学生类,学生管理系统类,控制台界面
#include "iostream"
#include "vector"
using namespace std;
class Score{
    string courseName;
    int score;
public:
    Score(string a,int b){
        this->courseName=std::move(a);
        this->score=b;
    }
    string getCourseName(){
        return courseName;
    }
    int getScore(){
        return score;
    }
    void setCourseName(string t){
        this->courseName=std::move(t);
    }
    void setScore(int t){
        this->score=t;
    }
};

class Student{
    string name;
    string gender;
    string sno;
    string Class;
    string Grade;
    vector<Score> scores;
public:
    Student(string name,string gender,string sno,string Class,string Grade){
        this->gender=std::move(gender);
        this->name=std::move(name);
        this->sno=std::move(sno);
        this->Class=std::move(Class);
        this->Grade=std::move(Grade);
    }
    string getName(){
        return name;
    }
    string getGender(){
        return gender;
    }
    string getSno(){
        return sno;
    }
    string getClass(){
        return Class;
    }
    string getGrade(){
        return Grade;
    }
    void setName(string t){
        this->name=std::move(t);
    }
    void setGender(string t){
        this->gender=std::move(t);
    }
    void setSno(string t){
        this->sno=std::move(t);
    }
    void setClass(string t){
        this->Class=std::move(t);
    }
    void setGrade(string t){
        this->Grade=std::move(t);
    }
    void setAll(string name,string gender,string sno,string Class,string Grade){
        this->gender=std::move(gender);
        this->name=std::move(name);
        this->sno=std::move(sno);
        this->Class=std::move(Class);
        this->Grade=std::move(Grade);
    }
    void add(string n,int t){
        Score s(n,t);
        scores.push_back(s);
    }
    void del(string n){
      
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值