Objects II
Today we continue introducing you to objects. Objects are an important concept in many programming languages, and particularly in Java. Today’s focus is on several components of object-oriented programming: visibility modifiers, encapsulation, constructors, and overloading.
1. Written Exercises (45 Minutes)
As usual, we begin with a written lab component. Please complete these exercises carefully. Your course staff will review and discuss your answers along with the rest of your section.
Complete this part of the lab in pairs using Google Docs. Create a copy of our document template and then edit it to record you and your partner’s answers. Note that you must open this document using your @illinois.edu Google Apps account. We will not grant access to non-Illinois users.
Have a course staff member check your answers as you go. When you are done, move on to the next section.
2. Object Practice (50 Minutes)
In the second half of the lab we’ll provide you with some practice with the concepts discussed in the first half.
To try and make it interesting, we continue the bank account example used in the previous week’s written exercises. Everyone likes money, right?
2.1. Forking and Cloning the Lab5 IntelliJ Project
We’ve set up an Lab 5 GitHub repository containing an IntelliJ Project that’s correctly configured for Lab 5. Getting access to it is similar to how you imported MP0. But you have to fork our repository first. If it’s not obvious how to do that, try following these instructions.