Program Assignments

 

Unit III : Object Interaction and More Decision Structures

Assignments:

Name

Description

Due Date

ElevatorSystem1

Modify the elevator system so that it moves the elevator (black rectangle) to the location where you have clicked.

Thursday 3/15

ElevatorSystem1

Modify the elevator system so that it has a small image or drawing and moves the entire image to the location where you clicked (without distorting the image)

Monday 3/16

AOL

Download the AOL program from the share folder and fill in the methods specified in the buddy class.  Use the aim program to run applet to test it.  You will be responsible for writing simple return methods as well as one boolean method.

Wednesday 3/21

AOL

Add one additional piece to the buddy class and provide a way to access it

Thursday 3/22

Bank Account

Download the bankaccount program from the share folder and fill in the code for the methods specified.

Tuesday 3/27

Bank Account

Add one extra private data member to bank account and a set/get method that will make it able to be used. 

Wednesday 3/28

AOL

Add the private integer variable numBuddies that keeps track of how many buddies a person has.  it should be initialized to a random number between 1 and 20 when the screen name is created.  Also include the methods addBuddy, removeBuddy (as long as you have one or more buddies) and getNumBuddies.

Friday 3/30

AOL

Add three more methods to the AOL program – setAway, returnFromAway, and isAway.  You will need a private boolean variable – away – for your status.  You should not be away when your first log on, and you should not be able to set to away unless you are on line.  Similarly, you should only be able to return from away if your current status is away.

Friday 3/30

Elevator Buttons

For your elevator version two program - add two elevator buttons.  If one button is clicked the elevator goes up, if the other is clicked the elevator goes down.

Tuesday 4/10

Elevator Buttons

Create a separate class for the buttons. (public class button extends FilledOval...)  and create methods that will make the code for your buttons read.. if(upButton.isPressed()) elevator.goUp();

Wednesday 4/11