辅导案例-4IOO

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
CSE1/4IOO Assignment – Part 1 1
CSE1IOO/CSE4IOO Semester 2, 2020
Programming Assignment – Part 1 (20%)
Assessment: This assignment is worth 20% of the final mark for this subject.Please read the entire specification carefully, before you start writing the code.
Due Date: Friday, 4 September 2020, at 10 am.
Delays caused by computer downtime cannot be accepted as a valid reason for a latesubmission without penalty. Students must plan their work to allow for bothscheduled and unscheduled downtime.
This is an individual Assignment. You are not permitted to work as a group whenwriting this assignment.
Copying, Plagiarism: Plagiarism is the submission of somebody else’s work in amanner that gives the impression that the work is your own. The Department ofComputer Science and Information Technology treats academic misconductseriously. When it is detected, penalties are strictly imposed. Refer to the unit guidefor further information and strategies you can use to avoid a charge of academic
misconduct. All submissions will be electronically checked for plagiarism
using latcs8 server program. If you are new at La Trobe, please complete
academic integrity module on LMS to understand what is regarded as an
academic misconduct.
Objectives: The general aims of this assignment are:
 To analyse a problem in an object-oriented manner, and then design andimplement an object-oriented solution that conforms to given specifications
 To practise using inheritance in Java
 To practise file input and output in Java
 To make implementations more robust through mechanisms such asexception handling.
Submission Details and Marking Scheme: Instructions on how to submitelectronic copies of your source code files from your latcs8 account and a marking
scheme overview are given at the end. If you have not been able to complete aprogram that compiles and executes containing all functionality, then you shouldsubmit a program that compiles and executes with as much functionality as you
have completed. (You may comment out code that does not compile.)
NOTE: While you are free to develop the code for this assignment on any operatingsystem, your solution must run on the latcs8 system.
CSE1/4IOO Assignment – Part 1 2
NOTE: You can use Arrays or ArrayList or LinkedList of the Java API. If you usearrays, assume that we never have more than 50 patients in the system.
Problem Description
In this assignment, which consists of two parts, you will develop a prototype of apatient record system.
A medical clinic needs a system to keep information about their patients andmedical observations about the patients. The information about a patient andconcepts of medical observation is explained below.
 Each patient has a unique patient ID and a name. For each patient, variouskinds of medical observations are recorded.
 A medical observation can be quantitative measurements such as height,weight, blood pressure, etc. These measurements are referred to as“measurement observations”.
 In addition, there are observations that are of non-quantitative nature, forexample, the patient’s blood type. These observations are referred to as“category observations”.
 Each observation type has a name (e.g. “Height”, “Blood type”) and a uniquecode.
 Additionally, each measurement observation type has a unit associated withit. For example, the unit for the ‘Blood Pressure’ measurement observationtype can have the value ‘PSI’. Similarly, ‘Weight’ measurement observation
type can have unit value ‘kg’, etc.
 Each category observation type has a number of valid categories associatedwith. Each category of a category observation type is specified by a name. Forexample, the categories for ‘Blood Type’ category observation type can havevalues such as, ‘Group O’, ‘Group A’, etc.
The nurses and doctors who use the system should be able to:
 Add a measurement observation type
 Add a category observation type
 Add a patient
 Add a measurement observation (for a patient)
 Add a category observation (for a patient)
 Retrieve details of an observation type (given its code)
 Retrieve a patient record by the patient id (including the patient’sobservations)
There will be additional features, which we will add to our application in part 2 of
the assignment.
CSE1/4IOO Assignment – Part 1 3
Description of classes:
Each class described below, should have appropriate constructors, get/set andtoString() methods (where applicable) to support different operations. Additionally,some of the necessary attributes and methods are listed below:
The Patient class:
 Attributes to store a patient’s ID and Name.
 An array to store observations about the patient. The elements in the arrayare references of type ‘Observation’.
 A method to add an observation for the patient. The method must validatethe functional correctness (described later) before adding an observation.
 A method to update the value of an observation for a patient.
The ObservationType abstract class:
 Attributes to store code and name.
TheMeasurementObservationType class, which extends the ObservationType class:
 Attribute to store Unit.
The CategoryObservationType class, which extends the ObservationType class:
 Attribute to store Categories.
The Observation abstract class:
 Attribute to store the type of observation, which will be of type‘ObservationType’.
TheMeasurementObservation class, which extends Observation class:
 Attribute to store the value of the observation.
The CategoryObservation class, which extends Observation class:
 Attribute to store the value of the observation.
CSE1/4IOO Assignment – Part 1 4
The PatientRecordSystem class:
 An array to store collection of observation types. The elements in the arrayare references of type ‘ObservationType’.
 An array to store collection of patients. The elements in the array arereferences of type ‘Patient’.
 Method to add a measurement observation type.
 Method to add a category observation type.
 Method to add a patient.
 Method to add a measurement observation for a patient.
 Method to add a category observation for a patient.
 Method to retrieve details of an observation type.
 Method to retrieve details of a patient.
To support testing, the PatientRecordSystem should also have a toString method todisplay all the objects stored in the system. The class should be implemented insuch a way, so that the test program (PatientRecordSystemTester) provided with the
assignment, runs without any changes. The Class should NOT take any input fromthe user via the keyboard.
Array Sizes:
Assume that we can have a maximum of 50 Observation types and a maximum of
50 patients in our system. Also, the number of observations that you can record fora patient cannot exceed 50.
Functional Correctness:
Your classes are required to ensure that the following conditions are met:
1. No two observation types can have the same code2. No two patients can have the same IDs3. A patient can have at most one observation of a particular type
4. Observations and their associated observation types must be compatible. Forexample, a category observation of a patient must be associated with acategory observation type and the observation value must be one of thecategories of that associated observation type.
Whenever these conditions are violated, an exception of type Exception must bethrown with an appropriate error message.
CSE1/4IOO Assignment – Part 1 5
Your tasks:
To help you along the way, the initial skeletons of the classes have been providedwith your assignment. Start working with these classes and add appropriate codes
to complete the assignment.
Task 1:
Implement the classes: Patient, ObservationType, MeasurementObservationType,
CategoryObservationType, Observation, MeasurementObservation, and
CategoryObservation.
Task 2:
Implement the PatientRecordSystem class, that manages the data of the patients
and their records and support the specified operations. Test your code using the testprogram (PatientRecordSystemTester.java) provided with the assignment files.
Task 3:
Make your classes robust so that when a functional correctness is violated, anexception is thrown with an appropriate error message.
Electronic Submission of Your Source Code
Submit a zip file including all Java files on LMS.
Marking Scheme Overview
The assignment has the total of 100 marks, which are distributed as follows:
 Implementation (Execution of code) 90 marks (Do all parts of the programsexecute correctly? Note your programs must compile and run to carry out thisimplementation marking. So, comment out the non-working code in yoursubmission.)
 Code Design, Layout and Documentation 10 marks (Does the programconform to specifications? Does the program solve the problem in a well-designed manner? Does the program follow good programming practices?
Does the indentation and code layout follow a good, consistent standard? Arethe identifiers meaningful? Are comments useful in explaining what and howthe program works? (Javadoc comments are optional.)
 A detail marking rubric will be published on LMS soon.
CSE1/4IOO Assignment – Part 1 6
END
51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468