Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 ( 3 2 points ) : The objective of this question is to become familiar with objects, and modelling with object types (

Question 1(32 points):
The objective of this question is to become familiar with objects, and modelling with object types
(classes). You will not write any code for this questions, rather you will analyze several hypothetical
applications to determine which object types and containers are needed, which attributes/fields are
needed for each object, and the methods are needed to interact with each objects data.
Your Tasks
For each of the following hypotheticals software systems, you are to provide:
The object types/classes involved, with the main fields/attributes for each class.
The containers needed, with the type of the items stored in the container, and how the items are
accessed from the container, e.g., in order first to last, by index, by field value, etc. You do not
need to include how the items are stored (array, linked list, stack, etc).
Any important methods, including accessors and mutators when needed. Make sure method
names are descriptive
For each field/attribute and method, indicate the visibility (i.e., public, private, or protected)
For this question, since you are not writing any code, submitted files describing the classes must be
in plain text .txt files. If other file types are used, you will receive a grade of zero for this question.
You should submit one file for each of the three scenarios (see submission criteria below).
An acceptable format could look like this:
Application : Hotel Management system
Class Hotel
----------
Attributes :
- name : String
- address : String
- phone number : String
- Container of Guests
accessed by roomNumber
----------
Methods :
+ getGuest () : Guest
+ addGuest ( g : Guest ) : void
+ removeGuest ( roomNum : int) : void
end of class Hotel
... etc ...
System 1: Hospital Application
Consider a Hospital with a fixed number of rooms for patients. The application needs to keep track
of patients, their emergency contact person, and rooms. Patients need to be admitted when brought
to the clinic for care and discharged afterwards. Each room can be empty, or there can be a patient
assigned to it. New patients can only be admitted if there is an available room, and can only be

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Informix Database Administrators Survival Guide

Authors: Joe Lumbley

1st Edition

0131243144, 978-0131243149

More Books

Students also viewed these Databases questions