$30
CMPT 270
Assignment 1:
Finding object types and their features
Description
The objective of this assignment is to become familiar with objects, and modeling
with object types (classes).
You will not write any code for this assignment, rather you will analyze two applications to determine what object types and containers are needed (saying what the
containers store, but no need for saying specific data structures), what fields are
needed for each class, and what operations are needed in each class (no return types
or parameters needed, but make operation names descriptive). No need to be too
detailed.
Application 1: Flight reservation system
Consider a flight reservation system that is to keep track of passengers and their
flights. A passenger can have several flights booked at a time, and a flight will have
several passengers. The booking of a flight by a passenger can include seat selection.
Application 2: A Hospital’s Patient Management System
Consider a ward in a hospital with a fixed number of beds. The objective is to keep
track of which patient is in each bed of the ward, and the doctor or doctors for the
patient. Also, it should be easy to determine which beds are empty so that a new
patient can be given an empty bed. Finally, a doctor should know which patients
are her/his patients.
1
Submission
*** All submissions must be saved as either a plain text file or a PDF
document, and uploaded to Moodle ***
There are lots of ways to save a text file or Word doc to a PDF if needed.
After the name of a class, list its fields (and then its methods). This is not programming, so you do not need to use precise syntax. Note that it is often the case
that an object of type A contains another object of some type B. In this situation,
A will be shown as having a field of type B as one of its fields, and type B will be
listed and described separately. Do not mix the descriptions for A and for B.
If the purpose of a type/field is not obvious from its name, include a brief English
description of the type/field.
Note that it is anticipated that every solution will be somewhat different.
Marking
1 (50%) Object types/classes, fields and methods for Application 1
2 (50%) Object types/classes, fields and methods for Application 2
This is an individual assignment. You are encouraged to discuss the general concepts of classes, types, containers, etc. with you classmates, but the specifics for the
applications in this assignment should be done completely individually. Students
that copy / share work will be penalized.
2