This assignment was a great learning experience for me. One of the biggest takeaways was working with files in Java—learning how to read from a .csv file, handle exceptions properly, and ensure the program doesn’t crash if the file isn’t found. At first, it was tricky figuring out how to parse each line correctly, but once I got the hang of using Scanner, it made a lot more sense.
I also got a lot of practice with object-oriented programming. Creating the Person class helped me understand why encapsulation is essential and how getter and setter methods make code more organized and reusable. Instead of dealing with separate arrays for each piece of data, using objects made the program more structured and easier to manage. Overriding toString() to format output neatly was a small but helpful detail that made debugging much more manageable.
Another thing I learned was how sorting works with objects. I had used sorting algorithms before, but implementing compareTo() in the Person class to sort by last name gave me a better understanding of how custom sorting works in Java.