Course Home | Assignments | Class Photo | Computing Resources | Lab Hours/Tutoring | Python | Schedule

Saint Louis University

Computer Science 150
Introduction to Object-Oriented Programming

Michael Goldwasser

Spring 2011

Dept. of Math & Computer Science

Homework Assignment 01

Object-Oriented Design

Contents:


Overview

Topic: Object-Oriented Design
Related Reading: Ch. 1
Due: 9:00am, Tuesday 25 January 2011

Please make sure you adhere to the policies on academic integrity.


Practice Problems

From the text: 1.15, 1.23, 1.25.

You do not submit these; feel free to discuss them freely with others.


Problems to be Submitted (20 points)

  1. (4 points)

    What data is likely stored when representing the concept of an online shopping cart? Clearly describe both the type and purpose of each piece of data.

  2. (8 points)

    Consider object-oriented software for supporting a typical email system. Such a system would likely define a User class, with an instance for each user of their system, and a Message class, with an instance for each individual email message managed by the system.

    Describe an initial design for those two classes, suggesting at least three attributes and at least three methods for each. Give careful consideration to which members are appropriate for which class.

  3. (8 points)

    Consider the high-level design of two classes: BasicClock representing a basic digital clock, and AlarmClock representing a clock with an alarm. Describe a high-level design using inheritance to model an AlarmClock class as a child of BasicClock. List the attributes and behaviors that you would include in each class.


Extra Credit

  1. (2 points)

    Exericse 1.22


Michael Goldwasser
CSCI 150, Spring 2011
Last modified: Sunday, 16 January 2011
Course Home | Assignments | Class Photo | Computing Resources | Lab Hours/Tutoring | Python | Schedule