Lab Specifications

Complete the Chapter 3 exercises in CodeLab. These are review exercises and you have all the information needed to complete them. If you have questions, please contact the instructor for help.

Scan the textbook chapter 4 to get an overview of the material.

Complete the in-chapter exercises 4.1 through 4.26 that are listed throughout chapter 4. Exercise 4.27 is optional.

Continue with your little-crab from Lab 2. Follow the exercise steps exactly and read the textbook as you progress through the chapter to enhance your understanding. If you have a problem completing a step and need to check your work, look at the files from Ch. 2-4 of the Book scenarios.

Exercises 4.1 through 4.9 do not directly apply to the scenario. For those exercises, create an Actor subclass named Exercises and add the variable declarations to the Exercises class to ensure your variable declarations compile.

If you declare the variables as object variables (outside a method), put the word private in front of the variables.

Exercise 4.5 will not compile because there is no Control class or Button class. Comment out this declaration.

Exercise 4.6 needs a written text answer; see specification 6 below.

Exercise 4.9 is a little tricky. You will need a third variable to complete the swap. Feel free to Google java swap values. Use the following print statement to verify the swap:

System.out.println("x=" + x + " y=" + y);

For those exercises steps that have a text answer, open the Scenario Information (Scenario > Scenario Information) and type the exercise number and answer at the end of the file. For example, here are my answers to the first few exercises:

CodeLab Exercises

Deliverables

CodeLab is submitted automatically, but other lab work must be submitted as described below.

On your computer, create a folder for the lesson exercises named "lesson" (no extra characters) and place all the exercise files from Lesson 3 into this folder. Include only one "bugs" scenario, which is the culmination of all the lesson exercises completed during class.

Create a second folder named "tutorial" (no extra characters) and place the entire "little crab" folder from chapter 4 of the textbook into this folder. Include only one scenario that contains your completed work. Do not include files from previous labs.

Create a zip file with both folders named lab3.zip, or one zip file for each folder with the name of the folder, and submit the zip file(s) to the Lab 3 slot of Canvas.

Please do not add any extra characters to the above folder names. Also, do not put any spaces or special characters like #, : or $ in zip file or folder names. Your crafted code must work as submitted. Remember to test and double check your files before and after submitting them. If you make a mistake, you can resubmit up to the deadline but must resubmit all your quest files.