public class Person { String name; int age; void display() { //method body; } } public class Student extends Person { String major; } public class Instructor extends Person { String title; } public class Course { String name; int credits; Instructor teacher; Student roaster[]; void addStudent (Student name) { } // method body void display() { // method body } public class Online Course extends Course { String meetingId; Person helper;

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter3: Using Methods, Classes, And Objects
Section: Chapter Questions
Problem 11RQ
icon
Related questions
Question

Draw the class diagram for the Java code represented by the following classes

public class Person {
String name;
int age;
void display() {
//method body;
}
}
public class Student extends Person {
String major;
}
public class Instructor extends Person {
String title;
}
public class Course {
String name;
int credits;
Instructor teacher;
Student roaster[];
void addStudent (Student name) {
}
// method body
void display() {
// method body
}
public class Online Course extends Course {
String meetingId;
Person helper;
Transcribed Image Text:public class Person { String name; int age; void display() { //method body; } } public class Student extends Person { String major; } public class Instructor extends Person { String title; } public class Course { String name; int credits; Instructor teacher; Student roaster[]; void addStudent (Student name) { } // method body void display() { // method body } public class Online Course extends Course { String meetingId; Person helper;
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning