Working with BlueJ
CS 160 In-Lab2
September 11, 2007
First turn in your Outlabs
- Your TA will let you know what he/she expects for the outlab due
today.
What to do today:
Today's lab you will get familiar with using the Alice environment and
building your own scenes.
- Open Alice
- First go through the tutorials if you don't feel comfortable with Alice. There are four short tutorials under help that will get your comfortable with Alice.
- Start a new project
- Use a water template for your stage.
- Use the following storyline to create your program:
Build and undersea world containing a goldfish. Build a swim() method for the goldfish that makes it swim forward one meter in a realistic fashion. Add a shark to your world, and build a similar swim() method for it. Build a program containing a scene in which the shark chases the goldfish and the goldfish swims to its giant cousin goldfish that chases the shark away. (hint: Make the giant goldfish by Saving and Importing your modified goldfish)
- Be creative, you should use the whole time, put in plants and artifacts that move with the current. Make it look real. Add more characters, add more to your storyline. Get used to creating objects, methods and sending messages to them.
What to Submit
Your TA and the consultants will come by to check off your assignments.
Next week's lab
Next week's lab will work with chapter 2 and chapter 3 in the book. You
will need to create methods and pass variables to the method. You will
need to create objects by writing the actual code.