Xây dựng class candidate

Candidate.h

#ifndef Candidate_hpp
#define Candidate_hpp
#include < iostream >
using namespace std;
class Candidate{
private:
    string ten;
    string ngaysinh;
    float toan;
    float van;
    float anh;
public:
    void nhap();
    void xuat()const;
    float laytongdiem()const;
};
#endif /* Candidate_hpp */

Candidate.cpp


#include "Candidate.hpp"
#include < string >
using namespace std;
void Candidate::nhap(){
    //nhap cac thong tin co ban
    cout << "Nhap ten:";
    getline(cin,ten);
    cout << "Nhap ngaysinh";
    getline(cin,ngaysinh);
    cout << "Nhap diem toan:";
    cin >> toan;
    cout << "Nhap diem van:";
    cin >> van;
    cout << "Nhap diem anh:";
    cin >> anh;
    cin.ignore();
}
void Candidate::xuat()const{
    //xuat thong tin ca nhan cua 1 thi sinh
    cout << ten << " " << ngaysinh << " " << toan << " " << van << " " << anh << endl;
}
float Candidate::laytongdiem()const{
    return toan + van + anh;
}

TestCandidate.hpp

#ifndef TestCandidate_hpp
#define TestCandidate_hpp

#include "Candidate.hpp"
class TestCandidate{
private:
    Candidate* dsts;
    int sl;
public:
    void nhap();
    void xuat() const;
    void xuatdsdatchuan() const;
    ~TestCandidate();
};

#endif /* TestCandidate_hpp */

TestCandidate.cpp


#include "TestCandidate.hpp"
void TestCandidate::nhap(){
    cout << "Nhap so luong thi sinh:";
    cin >> sl;
    cin.ignore();
    dsts = new Candidate[sl];
    for(int i=0;i < sl;i++){
        dsts[i].nhap();
    }
}
void TestCandidate::xuat()const{
    for (int i=0; i < sl; i++) {
        dsts[i].xuat();
    }
}
void TestCandidate::xuatdsdatchuan()const{
    for (int i=0; i < sl; i++) {
       //kiem tong diem cua tung thi sinh
        if(dsts[i].laytongdiem()>15){
            dsts[i].xuat();
        }
    }
}
TestCandidate::~TestCandidate(){
    delete [] dsts;
}