Reference no: EM134003680
Object-Oriented Development Practical Assessment
Objectives
This assessment item relates to the unit learning outcomes as stated in the Unit Profile, as follows.
Explain the principles of object-oriented programming and Implement and test object-oriented programs using a modern programming language.
Overview
For this assignment, you are required to develop a Java Console Application (with NetBeans Maven) to demonstrate your understanding of object-oriented fundamentals.
You will need to implement Java classes including instance fields, constructors and methods. You will implement input/output via console, selection, looping statements, and method overriding for your application. You will need to apply ArrayList data structure to hold object instances. A tutorial for the ArrayList topic is provided in Week 5's learning materials to support this assessment.
You also have to prepare a report describing how long it took to create the application, the problems that you encountered, and screenshots of the output produced with each manipulation by the application.
Assignment Specification
Cardiovascular disease is a common health condition that poses a significant threat to human health worldwide. As a result, the medical industry has conducted extensive research to monitor and treat this type of disease.
In this assignment, you are required to develop a Java console application using NetBeans IDE to record and display a patient's risk factors related to cardiovascular disease. The program is based on a simplified model for calculating a patient's cardiovascular disease risk score and assessing their corresponding risk level.
The simplified model assumes that the total risk score can be calculated by summing four key risk factors (represented as variables in programming terms):
Age
Systolic blood pressure
Cholesterol level
Smoking history
Based on the total score, the criteria for assessing risk are defined as follows:
Total score < 10: Low risk
10 ≤ Total score < 20: Medium risk
Total score ≥ 20: High risk
Your Java program should define at least two classes:
Patient
RiskAssessment
A typical Patient record should include the following data attributes:
Full name
Contact phone number
Age
Systolic blood pressure
Cholesterol level
Smoking status (whether the patient is a smoker or not)
The Patient class should include these variables, a constructor, setter/getter methods, provide a method
to calculate the total risk score, and a method to determine the corresponding risk level (low, medium, or high).
The RiskAssessment class should maintain a collection of Patient objects using an ArrayList. The program should allow the user to interact with the system through a set of menu options, enabling the recording, calculation, and display of patient risk information
Design guidelines
In your application, you can use a menu of your choices, and you can create the abovementioned-required objects and store them in a list.
The console menu should consist of five options:
Enter patient details
Search a patient record by phone
View all patient records
Find the patient details with max risk score
9. Exit the application (sentinel)
Each of the above options will take the user to the corresponding function for the cardiovascular disease management system. The following series figures show the manipulation of the above menu options as well as the sample data. For the menu option 1, you can enter the patient data many times as you want.
Class structure
We wish to emphasize that you should have at least two Java classes for the application - a Patient class to create Patient objects, and another class (such as RiskAssessment) that holds patient objects and provides a console menu and function manipulations, as well as the main method. Alternatively, you can use three classes, Patient, RiskAssessment, MyApp (that only contains the main method, where a RiskAssessment object is created and relevant method is called). Placing all code in one class is a poor design, which may lead to deduction of your assignment No AI shortcuts — Get genuine assignment help from experienced, real tutors.
The software design
doesn't adopt the approach with monolithic block code. Instead, it decomposes relevant functionalities into different classes or methods.
You may override the toString() method in the Patient class.
Input data validation
Your program should validate the user's inputs. The validation requirements are:
Age must be an integer between 0 and 116
The systolic blood pressure must be numeric values and cannot be negative
Cholesterol must be a numeric value and cannot be negative
Additional requirements:
Your application should show your name and student ID in the welcome message and an appropriate exit message. Your program should follow good practices, such as using constants, camel notation, proper variable names, indentation, comments, ‘no repeated codes', etc. Make sure you have completed all the requirements by going through the marking criteria before your submission of this assignment.