« All Events
1 PM Intro to Java – Alex
June 18, 2022 @ 1:00 pm - 2:00 pm
Today We Did:
- We continued and were able to finish up the RestaurantMap project which used HashMap.
- We learned more about how to add things into a HashMap as well as how to get things back from the HashMap.
For Homework:
- Go back to your School System project and create a new file called SchoolSystemUsingHashMap.java
- In that file, create a String variable for the menu (which you can find in the SchoolSystem.java class) and also create a HashMap to store the Students in.
- Create two methods for adding in a student and also listing all the students that you have added in. Of course in these 2 methods, you need to add new student to the Map that you created in #2 and listing all students means looping through all elements in the Map.
- The key can be the Student’s name.