Write an application with the following constraints.
For students - maintain the subjects taken and their respective grades; add a course with grade, print all subjects taken and the average grade.
A student takes no more than 30 subjects for the entire program.
For teachers - maintain the subjects taught currently, and able to add or remove a course taught. A teacher teaches not more than 5 subjects concurrently and can take maximum of 10 subjects.
Also have the attributes as name, age, gender and address for both students and teachers
Use inheritance effectively to write the above application and see if you can use polymorphism along with inheritance.
For students - maintain the subjects taken and their respective grades; add a course with grade, print all subjects taken and the average grade.
A student takes no more than 30 subjects for the entire program.
For teachers - maintain the subjects taught currently, and able to add or remove a course taught. A teacher teaches not more than 5 subjects concurrently and can take maximum of 10 subjects.
Also have the attributes as name, age, gender and address for both students and teachers
Use inheritance effectively to write the above application and see if you can use polymorphism along with inheritance.