Php e、 第一类对象如samtresler所述 $course->getCourseProficiencies(); $student->getCompletedProficiencies($courseId); $student->com

Php e、 第一类对象如samtresler所述 $course->getCourseProficiencies(); $student->getCompletedProficiencies($courseId); $student->com,php,oop,Php,Oop,e、 第一类对象如samtresler所述 $course->getCourseProficiencies(); $student->getCompletedProficiencies($courseId); $student->completeProficiency($proficiencyId, $courseId); class Student { // To uniquely identify each student. This is not the sa

e、 第一类对象如samtresler所述
$course->getCourseProficiencies();
$student->getCompletedProficiencies($courseId);
$student->completeProficiency($proficiencyId, $courseId);
class Student
{
    // To uniquely identify each student. This is not the same as the id
    // that you use in your Student table. 
    public string RegistrationId {get; set;}
    public string FirstName {get; set;}
    public string LastName {get; set;}
    public Course Course {get; set;}
    public Proficiency {get; set;}

    // Get the list of courses completed by this student
    public IEnumerable<Course> GetCompletedProficiencies()
    {
        // ...
    }

    // Add a completed course
    public bool AddCompletedProficiency(Course completedCourse)
    {
        // ...
    }
}

class Course
{
    public string Id {get; set;}
    public string Name {get; set;}
    public string Location {get; set;}
    public string Type {get; set;}
}