- This event has passed.
10 AM – Intro To Java
September 11, 2021 @ 10:00 am - 11:00 am
Today We Do
- We reviewed HashMap topic, how to use it. Key and Value datatype
- We added feature to find student using HashMap
Homework
- Inside SAT10AM_SchoolApplication, change initializeStudents() to also add all 4 students inside studentMap.
- Similar to “12. Find student using HashMap”, add new feature “13. Find teacher using HashMap”
- Inside SAT10AM_IntroToJava project, create a new Java file September11_HashMapExercise2.java. Add a new HashMap<String, String> nameToAddress. Create a small application to be able to add a new address and find an address according to its name continuously. Look at example below
-
Welcome to AYCLOGIC address finder What do you want to do: 1. Enter a new name and address 2. Find an address according to name Enter your selection or 'exit' to quit: 1 Enter a name: GAMas Enter an address: 9127 Ardendale Avenue, San Gabriel, CA 91775 You have entered GAMas address. What do you want to do: 1. Enter a new name and address 2. Find an address according to name Enter your selection or 'exit' to quit: 2 Enter a name: Gamas GAMas address is 9127 Ardendale Avenue, San Gabriel, CA 91775 What do you want to do: 1. Enter a new name and address 2. Find an address according to name Enter your selection or 'exit' to quit: exit Bye bye