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.

2.2. Your Goal

Your job is to complete the provided classes so that they work properly and employ object-oriented principles correctly. You’ll need to use your newly-acquired knowledge about objects and object syntax. The course staff will circulate to help out and provide useful advice.

3. Help with MP3 (15 Minutes)

Use any remaining time in your lab section to get help with MP3.

CS 125 is now CS 124

This site is no longer maintained, may contain incorrect information, and may not function properly.


Created 10/24/2021
Updated 10/24/2021
Commit a44ff35 // History // View
Built 10/24/2021 @ 21:29 EDT