Dale - Computer Science Illuminated 199

Dale - Computer Science Illuminated 199 - counterpart...

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

View Full Document Right Arrow Icon
172 Chapter 6 Problem Solving and Algorithm Design The first pass at a list of classes would include the following: Three of these classes are the same: the two references to list and one refer- ence to address list . The two references to address are not the same. There is an address class with street, city, and so forth, and an e-mail address. Order is a noun, but what is an order class ? This is actually describing how the list class should print its items. Therefore, we discard it as a class. Name and names should be combined into one class. Scraps , paper , and cards describe objects that contain the data in the real world. They have no
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: counterpart within the design. Our filtered list is shown below. The verbs in the problem statement give us a head start on the responsibili-ties: create , print , and include . Like scraps , paper , and cards , include is an instruction to someone preparing the data and has no counterpart within the design. However, this does indicate that we must have an object that inputs the information to be put on the list. Exactly what is this informa-tion? It is the name, address, telephone, and e-mail address of each person...
View Full Document

Ask a homework question - tutors are online