In Week 5, we explored collections in Java and how they allow programs to store and organise multiple pieces of data.
Topics covered: • Introduction to collections • Lists and ArrayLists • Adding, retrieving, updating and removing elements • Understanding indexes and why they start at 0 • Iterating through collections using loops • Sets and HashSets • Understanding unique elements and preventing duplicates • HashMaps and key-value pairs • Adding and retrieving values using keys
By the end of the session, students were able to store multiple values, manipulate collections, identify duplicates and retrieve information using keys.
Practical exercises included building a Shopping List Manager, identifying unique attendees and creating a Mini Playlist Manager.