hw11_sol

hw11_sol - CS 302 Homework 11 - Solution 1. (a) Ship s =...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS 302 Homework 11 - Solution 1. (a) Ship s = new CruiseShip(); (b) Yacht y = (Yacht) new Ship(); 2. public class Dog extends Pet { private String breed; public Dog(int theAge, String theName, String theBreed) { super(theAge, theName); breed = theBreed; } } 3. Class Diagram Employee getName() getSalary() t: tt tt tt tt eKK KK KK KK KK KK Baker bakeBread() decorateCake() Secretary takeBreak() O SecurityGuard secureBuilding() ...
View Full Document

This note was uploaded on 08/08/2008 for the course CS 302 taught by Professor Willbenton during the Spring '07 term at Wisconsin.

Ask a homework question - tutors are online