« All Events
7 PM – Intro To Java
January 6, 2022 @ 7:00 pm - 8:00 pm
Today We Do
- We continued with School Application.
- We added “2. Find student” feature.
Homework
- Inside School Application, add 3 more features: Add Teacher, Find teacher, List all teachers.
- You need to create a new class Teacher inside a new file Teacher.java. The Teacher class will have the following attributes: firstName, lastName, age and subjectExpertise.
- If you do it correctly it will look like this
-
School System:
1. Add a student
2. Add a teacher
3. Find student
4. Find teacher
5. List all students
6. List all teachers
Enter your selection (type "exit" to quit):2
Enter First Name: John
Enter Last Name: Cheng
How old are you: 100
Enter Subject of Expertise: Chemistry
New Teacher record is created: John
School System:
1. Add a student
2. Add a teacher
3. Find student
4. Find teacher
5. List all students
6. List all teachers
Enter your selection (type "exit" to quit):2
Enter First Name: Gamas
Enter Last Name: Chang
How old are you: 101
Enter Subject of Expertise: Computer
New Teacher record is created: Gamas
School System:
1. Add a student
2. Add a teacher
3. Find student
4. Find teacher
5. List all students
6. List all teachers
Enter your selection (type "exit" to quit):6
John Cheng is 100 years old and teacher of "Chemistry"
Gamas Chang is 101 years old and teacher of "Computer"
School System:
1. Add a student
2. Add a teacher
3. Find student
4. Find teacher
5. List all students
6. List all teachers
Enter your selection (type "exit" to quit):4
Enter first name of Teacher you want to find: Gamas
Gamas Chang is 101 years old and teacher of "Computer"
School System:
1. Add a student
2. Add a teacher
3. Find student
4. Find teacher
5. List all students
6. List all teachers
Enter your selection (type "exit" to quit):4
Enter first name of Teacher you want to find: Ian
I cannot find teacher with name Ian
School System:
1. Add a student
2. Add a teacher
3. Find student
4. Find teacher
5. List all students
6. List all teachers
Enter your selection (type "exit" to quit):exit