At the following figure, UML diagram of inheritance is given. According to the given diagram, write down the class declaration of each class:
UML Diagram of Inheritance:
Student
- StdID: long int
- name: string
- regDate: string
Student()
- Student(id: long int, n: string, rd: string)
- setID(id: long int)
- setName(n: string)
- getID(): long int
- getName(): string
UnderGrad
- Grad
- classNo
- NoofSems
UnderGrad()
- UnderGrad(cno: int)
- setClassNo(cno: int)
- getClassNo(): int
Grad()
- Grad(sno: int)
- setSemsCount(sno: int)
- getSemsCount(): int