CSCI 180/181 Spring 2008, Lab 2
Objectives
- Practice adding methods and fields to classes
- Understand use
of strings
- Understand conditional statements
- Practice defining
a class from scratch
The following is due by Monday, 1/28 at 11:59 pm. You should be able to make good progress, and hopefully complete, during lab today.
Chapter 2 is available here
- Do exercises 2.74-2.81. These work
with Book.java.
- Do exercises 2.82-2.83. This involves creating a
new project.
Be sure to use the names
specified for projects, classes, fields, methods, including
capitalization. Also change the default comments to reflect your code and, at minimum, include a description of any fields as well as a description of each method. These can be short -- we'll talk later about style.
When you transfer them to cerebro, create a directory
under csci180 called lab2 and transfer the projects there. To handin,
transfer both projects to cerebro and do:
handin 180 lab2 ~/csci180/lab2/book-exercise/*
handin 180 lab2 ~/csci180/lab2/heater-exercise/*