Assignment 1

This assignment is in two independent parts. The first part involves creating a small command line utility that does one simple task. The second part is to analyze and design a substantial part of a hospital information system (no coding involved).

Part A: Quote of the Day

Create a class diagram and Java code for the following system and scenario, taking into account the possibility of future extensions. Pretend that this is a complicated system that you don't want to rewrite if you don't have to.

Informal Description

"The system is a command line utility that prints a short 'quote of the day' on the user's terminal when run. To begin with the quote is selected randomly from a set of hard-coded strings within the program itself, but that might change later on -- the quotes might be based on the user's history, the time of day, the date, etc.. We might want to have an applet version later on, too."

Scenario

  1. User types "java QuoteOfTheDay" on the command line.
  2. System prints out a quote of the day, with an attribution.

Examples:

> javac QuoteOfTheDay

I'm astounded by people who want to 'know' the universe when it's hard enough to find your way around Chinatown. -- Woody Allen

> javac QuoteOfTheDay

Time is nature's way of keeping everything from happening all at once. -- Anonymous

> javac QuoteOfTheDay

Future. That period of time in which our affairs prosper, our friends are true and our happinesss is assured. -- Ambrose Bierce

Deliverables

Class diagram, Java code, and output of a few test runs.


Part B: Hospital Information System Design

Create a single typical scenario, a system diagram, and a class diagram for the following system.

Informal Description

"The system is a hospital information system. A hospital has doctors and patients. Each patient is assigned to one doctor, but a doctor can have any number of patients. Patients check in to the hospital and assigned a doctor if they don't already have one. While in the hospital, doctors record various observations about each patient at various times. Examples of observations are blood pressure and temperature. The hospital keeps track of all the observations for a given patient until they check out of the hospital."

Scenario

Here's a starting point for the scenario. Keep it simple, less than 10 steps, but make sure to include the main points from the description above.

  1. Patient checks in to hospital.
  2. Hospital assigns a doctor to the patient.
  3. ...

System Diagram

See the online bookstore example. Be sure to include all the users of the system.

Class Diagram

See the online bookstore example. Include important attributes and relationships. Keep it to one page. Make sure it includes all the classes needed to implement the scenario.

The deliverables for this assignment are the scenario, the system diagram, and the class diagram. You can draw these by hand if you wish. There is no code deliverable for this assignment.