Write a Java class Course for dealing with courses. Your class must have the following features: Course - name: String - lineNumber: int - symbol: String - sections: ArrayList + Course() + Course(name: String, lineNumber: int, symbol: String) + getName(): String + getLineNumber(): int + getSymbol(): String + getSections(): ArrayList + addSection(section: Section): void + Override toString() method: you have to return needed data Fields values. addSection(section: Section) method add a section (number and the teacher for this section) to the array list of sections. Note: sectionNumber will be generated automatically. Write a Java class Section for dealing. Your class must have the following features: Section - number: int - teacher: Teacher - students: ArrayList + Section() + Section(number: int, techer: Teacher) + getNumber(): int + getTeacher(): Teacher + getStudents(): ArrayList + addStudent(student: Student): void + Override toString() method: you have to return needed data Fields values. addStudent(student: Student) method adds a student to the array list of students. Create a java Main Class file then do the following: A. Declare an array list AllStudents of Student class. B. Declare an array list AllCourses of Course class. C. Declare an array list AllTeachers of Teacher class. D. Print the following menu to give the user optionality: Choose 1 to insert a new course. Choose 2 to insert a new student. Choose 3 to insert a new teacher. Choose 4 to reg
Write a Java class Course for dealing with courses. Your class must have the following features: Course - name: String - lineNumber: int - symbol: String - sections: ArrayList + Course() + Course(name: String, lineNumber: int, symbol: String) + getName(): String + getLineNumber(): int + getSymbol(): String + getSections(): ArrayList + addSection(section: Section): void + Override toString() method: you have to return needed data Fields values. addSection(section: Section) method add a section (number and the teacher for this section) to the array list of sections. Note: sectionNumber will be generated automatically. Write a Java class Section for dealing. Your class must have the following features: Section - number: int - teacher: Teacher - students: ArrayList + Section() + Section(number: int, techer: Teacher) + getNumber(): int + getTeacher(): Teacher + getStudents(): ArrayList + addStudent(student: Student): void + Override toString() method: you have to return needed data Fields values. addStudent(student: Student) method adds a student to the array list of students. Create a java Main Class file then do the following: A. Declare an array list AllStudents of Student class. B. Declare an array list AllCourses of Course class. C. Declare an array list AllTeachers of Teacher class. D. Print the following menu to give the user optionality: Choose 1 to insert a new course. Choose 2 to insert a new student. Choose 3 to insert a new teacher. Choose 4 to reg
Chapter9: Using Classes And Objects
Section: Chapter Questions
Problem 19RQ
Related questions
Question
Write a Java class Course for dealing with courses. Your class must have the following features:
Course
- name: String
- lineNumber: int
- symbol: String
- sections: ArrayList
+ Course()
+ Course(name: String, lineNumber: int, symbol: String)
+ getName(): String
+ getLineNumber(): int
+ getSymbol(): String
+ getSections(): ArrayList
+ addSection(section: Section): void
+ Override toString() method: you have to return needed data Fields values.
addSection(section: Section) method add a section (number and the teacher for this section) to the array list of sections.
Note: sectionNumber will be generated automatically.
Write a Java class Section for dealing. Your class must have the following features:
Section
- number: int
- teacher: Teacher
- students: ArrayList
+ Section()
+ Section(number: int, techer: Teacher)
+ getNumber(): int
+ getTeacher(): Teacher
+ getStudents(): ArrayList
+ addStudent(student: Student): void
+ Override toString() method: you have to return needed data Fields values.
addStudent(student: Student) method adds a student to the array list of students.
Create a java Main Class file then do the following:
A. Declare an array list AllStudents of Student class.
B. Declare an array list AllCourses of Course class.
C. Declare an array list AllTeachers of Teacher class.
D. Print the following menu to give the user optionality:
Choose 1 to insert a new course.
Choose 2 to insert a new student.
Choose 3 to insert a new teacher.
Choose 4 to register a course for a student.
Choose 5 to retrieve the course schedule for a specific student.
Choose 0 to exit.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 2 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,