Q3: Design An abstract superclass called Person, It contains: Two private instance variables: name (String), and address (String). One constructor to initialize the name and address with the given...

NoneQ3: Design<br>An abstract superclass called Person, It contains:<br>Two private instance variables: name (String), and address (String).<br>One constructor to initialize the name and address with the given values.<br>A toString() method that returns name and address as single String.<br>An abstract method displayInfo() method.<br>subclasses Student class contains:<br>four instance variables: numCourses (int), courses (array of string to store name<br>of 3 courses) greads(array of int to store grade of 3 courses) and<br>MAX_COURSES (int constant represent the maximum number of courses).<br>One constructor to initialize the name and address with the given values.<br>A toString() method that returns

Extracted text: Q3: Design An abstract superclass called Person, It contains: Two private instance variables: name (String), and address (String). One constructor to initialize the name and address with the given values. A toString() method that returns name and address as single String. An abstract method displayInfo() method. subclasses Student class contains: four instance variables: numCourses (int), courses (array of string to store name of 3 courses) greads(array of int to store grade of 3 courses) and MAX_COURSES (int constant represent the maximum number of courses). One constructor to initialize the name and address with the given values. A toString() method that returns "student: name address" addCoursesGrade(course, grade) method, if possible , to add a course with grade. • printGrades() method : to print all courses taken and the average grade. • getAverageGrade() method : to compute the average grade and return it. Override displayInfo() method to display name and address and average.

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here