- This event has passed.
5 PM – Intro To Java – Gamas
January 15, 2022 @ 5:00 pm - 6:00 pm
Today We Do
- We continued with SchoolApplication.
- We added add teacher and add student.
- We added getter methods for Student’s attributes.
- We added List All Students feature to list all students that is in the system.
Homework
- Add List All Teachers feature. This should be very similar to List All Students. Look at example below
-
School System: 1. Add a student 2. Add a teacher 3. Find student 4. Find teacher 5. List all students 6. List all teachers 99. Exit Enter your selection :2 What is the teacher's first name? John What is the teacher's last name? Cheng What is the teacher's age? 101 What is the teacher's subject of expertise? Java A new teacher has been 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 99. Exit Enter your selection :2 What is the teacher's first name? Mike What is the teacher's last name? Fadden What is the teacher's age? 50 What is the teacher's subject of expertise? Python A new teacher has been created: Mike School System: 1. Add a student 2. Add a teacher 3. Find student 4. Find teacher 5. List all students 6. List all teachers 99. Exit Enter your selection :6 John Cheng is 101 years old and taught Java subject. Mike Fadden is 50 years old and taught Python subject.
-
- Add code to do Find Student. In find student, the program will ask for the first name of the student that the user is trying to find. And then you should use for loop to go through each student in the list and when you find a match of the firstName, you should print the student info. Look at example below
-
School System: 1. Add a student 2. Add a teacher 3. Find student 4. Find teacher 5. List all students 6. List all teachers 99. Exit Enter your selection :1 What is your first name?Gamas What is your last name?Chang What is your age?100 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 99. Exit Enter your selection :1 What is your first name?Aidan What is your last name?Chau What is your age?13 Aidan School System: 1. Add a student 2. Add a teacher 3. Find student 4. Find teacher 5. List all students 6. List all teachers 99. Exit Enter your selection :3 Enter the first name of the student you are trying to find: Gamas We found Gamas. Gamas Chang is 100 years old. School System: 1. Add a student 2. Add a teacher 3. Find student 4. Find teacher 5. List all students 6. List all teachers 99. Exit Enter your selection :3 Enter the first name of the student you are trying to find: Aidan We found Aidan. Aidan Chau is 99 years old.
-