- This event has passed.
3 PM – Intro To Java – Gamas
January 29, 2022 @ 3:00 pm - 4:00 pm
Today We Do
- We continued with Jan22RestaurantSystem.
- We learned how to add Restaurant object into the restaurantList.
- We learned how to loop through each Restaurant object using for loop and print its name.
Homework:
- Inside Restaurant.java, create 2 more methods. getBuiltYear() and getPhone(). Inside each of these methods, return the builtYear and phone. This is very similar to getName().
- Inside Jan22RestaurantSystem.java, inside listAllRestaurants() method, for each restaurant, print the name, the year it was built and the phone like below
-
Din Tai Fung - 1997 - 888-888-8888 Full House - 1995 - 626-626-1234