[SOLVED] CSC220 Lab10

19.99 $

Category:

Description

5/5 - (1 vote)

Objective

In this lab, you are going to play with class hierarchy and exercise on inheritance in Java.

Java programs:

Suppose that we are required to model students and teachers in our application. We can define a superclass called Person to store common properties such as name and address, and subclasses Student and Teacher for their specific properties. An object of the type CourseTaken is used to store a course a student takes and the grade the student gets for this course. For students, we need to maintain the courses taken and their respective grades using the class CourseTaken; add a course with grade, print all courses taken and the average grade. A student takes at least 5 courses. For teachers, we need to maintain 2 courses taught currently.