[r]
Trang 1Yêu cầu: cài đặt các class Person, Student, Employee
Student, Employee kế thừa từ Person
Person
-name age : char*
: int +
+ + + + + +
<<Constructor>>
getName () setName(int n) () getAge () setAge(int a) () Person () Person(char *n, int a) () Person(const Person $p) ()
: char * : void : int : void
Student
- score : float
+
+
+
+
setScore(float d) ()
getScore() ()
Student(char *n, int a, float s):Person ()
show ()
: void : float : void
Employee
- salary : double +
+ + +
setSalary(double l) () getSalary() () Employee(char *n, int a, double s):Person () show ()
: void : double : void