Dale - Computer Science Illuminated 198

Dale - Computer Science Illuminated 198 - address,...

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

View Full Document Right Arrow Icon
6.3 Object-Oriented Design 171 Class Name: Guest Superclass: Person Subclasses: Responsibilities Collaborations Respond to invitation (date) Date, calendar rate with a calendar object, so we need a calendar class. Should every person have this responsibility? No, probably not. Let’s derive another class from person called guest. We leave this general example at this stage and go on to a more concrete example. Computer Example Once again, let’s repeat the problem-solving process for a previous example, except this time using an object-oriented approach. To refresh your memory: Problem: Create an address list that includes each person’s name,
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: address, telephone number, and e-mail address. This list should then be printed in alphabetical order. The names to be included in the list are on scraps of paper and business cards. Brainstorming and Filtering Lets try circling the nouns and underlining the verbs. Create an address list that includes each person's name, address, telephone number, and e-mail address. This list should then be printed in alphabetical order. The names to be included in the list are on scraps of paper and business cards....
View Full Document

This note was uploaded on 01/13/2011 for the course CSE 1550 taught by Professor Marianakant during the Fall '10 term at York University.

Ask a homework question - tutors are online