Cmpt 270 assignment - three layer architecture in this


Assignment - Three Layer Architecture

Description - In this assignment you are to design your 3-layer architecture. The top layer will consist of:

  • The console user interface which you already have.
  • A graphical user interface (GUI) which you will need to build.

The middle layer is the control layer where your business rules are placed. There will be little for you in this layer because we don't have a number of business rules. So most of the requirements for the control layer will be simply to ensure the command from the UI layer is valid under the current application state and pass the work on to the appropriate model (data) layer.

The third layer is the model (data) layer. This layer contains the code that is specifically designed for data manipulation. For example, you may write out the data for a surgeon as the "Person" portion in a personrec.txt file while the Doctor portion of the properties get written to a doctorrec.txt file. Finally the specific surgeon properties may get written to a surgeonrec.txt file. When a surgeon is selected for display on the user interface, the control layer may request the surgeon data from the model layer, but the model layer will need to reassemble the data from three different files. That is the responsibility of the model layer.

Deliverables -

GUI Layouts - The most dramatic design will be the GUI.

State Change Models (SCM) - Each GUI window or function group should have a SCM associated with it. These models will be very simple. What I want to see is the major events that require response.

GUI Behavior Descriptions - Each GUI window should have a text-based description (scenario) of how a typical use would look like. For example, in the above window, it might be:

  • Enter patient name in name field; health number in health number field
  • If patient doesn't exist, a panel will display "That patient not found" and fields will be cleared
  • Select doctor from the drop-down list
  • Press cancel to not save and exit screen
  • Press save to commit data and exit screen

Of course you need to provide your own specification.

Control Layer Class: The control layer behavior have no visual component. The control layer is responsible for how the model objects interact. For example, the model layer contains the classes which define the ward, bed, patient, doctor, etc. However it is the control layer that interacts with these model layer objects to get thing done. So the control layer contains the references to all wards, patients and doctors.

Model Layer Classes: The Model layer behavior have no visual component. The model layer is responsible for actual definition and creation of objects in the model. For example, the model layer contains the classes which define the ward, bed, patient, doctor, etc. The control layer will manipulate the model layer for purposes of creating a patient, obtaining an empty bed in a ward and assigning a doctor to the patient. The model layer contains the object classes but do not drive the application. The model layer is responsible for things like writing the persistent data of each model object to permanent storage and reading it back again when the app is restarted at some later time. NOTE: Except for the persistent data component, your class models from the previous assignment should work without any changes. If you find you are making major changes to the model classes, you may be incorrectly dividing the responsibilities of the layers.

Specifications for the Application -

We aren't going to change the behavior of the application at this point. So here is the basic menu from the previous assignment:

1. quit

2. add a new patient to the system

3. add a new doctor to the system

4. assign a doctor to a patient

5. display the empty beds of the ward as a list of bed labels with purpose

6. assign a patient a bed of a particular

7. release a patient

8. drop doctor-patient association

In your control and model layers, you will provide the functionality necessary for the application to perform correctly. We will quickly go through each option.

Attachment:- Assignment File.rar

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Cmpt 270 assignment - three layer architecture in this
Reference No:- TGS02816650

Expected delivery within 24 Hours