title | description | spelling_exceptions | outdated | |||||
---|---|---|---|---|---|---|---|---|
Objects I |
Objects are an important programming concept in Java as well as other programming languages. Today, we begin a multi-week introduction to objects. |
|
|
Today we begin introducing you to objects. Objects are an important concept in many programming languages, and particularly in Java. They provide an intuitive way of organizing state and behavior, the two main components of any computer program.
As usual, we begin with a written lab component. This one is particularly important, however, so please slow down and complete the 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.
Like any other programming concept, the way to get familiar with objects is to use them. In the second half of the lab we’ll provide you with some practice at manipulating object state and using object methods.
And we’ll try to make it as interesting as possible by having you work with a special type of objects: Pokémon objects!
We’ve set up an Lab 4 GitHub repository containing an IntelliJ Project that’s correctly configured for Lab 4. 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.
Your job is to complete the provided program so that you can take input from the user and configure each battling Pokémon appropriately.
You’ll need to use your newly-acquired knowledge about objects and object syntax. You’ll also probably want to look into how to use the Java Scanner Class. The course staff will circulate to help out and provide useful advice. You may also find the online documentation helpful.
Use any remaining time in your lab section to get help with MP3.