- This event has passed.
1 PM Intro to Java – Alex
May 7, 2022 @ 1:00 pm - 2:00 pm
Homework:
- Change your Magic8Ball project to using the methods like how we did it for TellMeYourAgeOOP.
- a. The main method should only have two lines of code, creating the class and then running it.
- For the School Application, “1. Add Student” feature, change the code by creating a new method: createStudent(). This is very similar to what you did in TellMeYourAgeOOP where we have a method for each of the features.
- Also, add in the second option for adding in a teacher. “2. Add Teacher”.
- a. Create Teacher class just like you created the Student class last Saturday. The following are the Teacher attributes: firstName, lastName, age, email, subjectOfExpertise.
- b. When the user chose this feature, they should be prompted with the teacher’s information. If you did it properly, it should look like this
-
Please select one of the items below 1. Add Student 2. Add Teacher 3. Find Student 4. Find Teacher 5. List all students 6. List all teachers Make your selection 1-6 (enter "exit" to quit):2 ADD TEACHER Enter teacher's first name: Alex Enter teacher's last name: Lee Enter teacher's age: 19 Enter teacher's email: alexlee@ayclogic.com Enter teacher's subject of expertise: Math You have successfully added Alex teacher on your system Please select one of the items below 1. Add Student 2. Add Teacher 3. Find Student 4. Find Teacher 5. List all students 6. List all teachers Make your selection 1-6 (enter "exit" to quit):