[Solved] CSC 220 Lab 10-Model students and teachers in application

$25

File Name: CSC_220_Lab_10-Model_students_and_teachers_in_application.zip
File Size: 536.94 KB

SKU: [Solved] CSC 220 Lab 10-Model students and teachers in application Category: Tag:
5/5 - (1 vote)

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

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.

The UML diagram for Person and its subclasses is as follows:

According to the requirement, implement these three classes. Write a Test driver class that does the following:

  1. Create a student object s with your name and your address.
  2. Print out the information of object s.
  3. Add 6 courses with grades for each of the courses for student s.
  4. Print out the grades and the average grade of student s.
  5. Create a teacher t with one of your teachers name and an address.
  6. Print out the information of object t.
  7. Set two courses that teacher t teaches.
  8. Print out the courses that teacher t teaches.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CSC 220 Lab 10-Model students and teachers in application
$25