Chap04 EX Solutions

Chap04 EX Solutions - Java Software Solutions, 6h Edition...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Java Software Solutions, 6 h Edition Exercise Solutions, Ch. 4 Chapter 4 Exercise Solutions EX 4.1. For each of the following pairs, which represents a class and which represents an object of that class? a. Superhero, Superman Class: Superhero, Object: Superman b. Justin, Person Class: Person, Object: Justin c. Rover, Pet Class: Pet, Object: Rover d. Magazine, Time Class: Magazine, Object: Time e. Christmas, Holiday Class: Holiday, Object: Christmas EX 4.2. List some attributes and operations that might be defined for a class called PictureFrame that represents a picture frame. Attributes could include: height, width, empty (boolean) Operations could include: getHeight, setHeight, getWidth, setWidth, isEmpty, fill EX 4.3. List some attributes and operations that might be defined for a class called Meeting that represents a business meeting. Attributes could include: date, time, location, purpose, attendees (list of People) Operations could include: setters and getters for all attributes, announce, cancel
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/26/2011 for the course COP 2551 taught by Professor Roggio,r during the Summer '08 term at UNF.

Page1 / 3

Chap04 EX Solutions - Java Software Solutions, 6h Edition...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online