Your task in this assessment is to analyse the given problem, model, and design the required data structures using UML class diagrams. You will be implementing the software solution, applying efficient algorithms, inheritance, polymorphism, and exception handling. Your Java Application should have an interactive Graphical User Interface (GUI) using JavaFX GUI components. You should also write a report, as specified in this document, demonstrating your conceptual knowledge.
This is an extension to the problem given in Assessment Item 1 as specified here. On Census night in 2016, more than 116,000 people were estimated to be homeless in Australia - 58% were male, 21% were aged 25 - 34 and 20% identified as Aboriginal and Torres Strait Islander Australians (ABS 2018). Specialist Homelessness Services (SHS) are charity and government funded organisations working to support homeless people. Home for ALL (HA) is a newly registered SHS who wants to use technology enabled tools to improve the efficiency in this area. The very basic requirement for addressing the issue is to have accurate information on each homeless person. Therefore, the directors have decided to have a Housing Service System (HSS) which is reliable, flexible, and expandable. You are invited to design and develop an initial prototype for the HSS. The prototype needs to have only limited functionality as described below. As a first step the HSS will be designed to collect data about people who are homeless or at the risk of becoming homeless.
Minimum data will be stored as an initial step to test the prototype. The details to be recorded are:
The users accessing the HSS should able to:
1. Display the existing data in the given file (same as Assignment 1)
2. Update the file by adding new persons with service need (same as Assignment 1)
3. Display the data as per a chosen category (All, AtRisk or Homeless) (Assignment 2). Note:Use instance of operator and downcast
4. Create a service queue so that the people who are AtRisk can be serviced based on their level of risk, prioritised 'severe to low'(Assignment 2).
5. Display the prioritised service queue of AtRisk people (Assignment 2).
6. Enable a staff to service the Homeless. Include a Service button which should allow servicing a chosen Homeless person. Clicking the Service button should add the person's details and service details to a new LinkedList (Assignment 2).
7. Search and display all the requests with a reason of "violence" (Assignment 2).
8. Display a report showing number of people serviced within different service provisions such as emergency accommodation, or mental health services (Assignment 2). Note: Use predicate and Lambdas and Streams to filter the required values You should use exception handling and display informative error messages when the user has not chosen or entered input in a required field. Note: You will be given a data file containing sample data of people in different categories and having different reasons for their service need.
You can use the following guidelines in your modelling and GUI design. Data Structures You may follow the class design given below. You should read the specification carefully and design the classes using UML class diagrams and include the attributes with correct data types and all the methods, clearly indicating public or private. Clarify your doubts during the design stage so that your implementation can be less error prone and faster to complete.
All classes should have a default constructor, parameterised constructor, copy constructor, accessor mutator (get, set) methods, and properly written toString() methods. Include other methods as needed. This does not apply to the JavaFX classes for the GUI.
i) Person class
This is a generic class and has a gender category, first name, and last name. This class will remain abstract as no objects will be required of type Person. Use an enum GENDER as described below.
ii) ServiceReceiver class
This class extends the Persons class by including: Year in which the service needs are identified Reason for needing assistance Validation: You should validate the reason entered by the user so that it contains only alpha numeric strings separated by space. Override the inherited methods as required.
iii) Homeless class
This class extends the ServiceReceiver class and is for recording people who are already experiencing homelessness. This class will have: Current sleeping arrangement which can be one of:
iv) AtRisk class
This class extends the ServiceReceiver class and is for recording people who are at the potential of becoming homeless. This class will have: RiskType attribute to indicate the urgency of the requirement. The risk type can be one of:
Use enum RISK_CATEGORY for the risk types.
v) ServiceProvision class
This class is to include attributes and methods to enable a staff to service a Homeless. This class has:
Reason | Situation | Service description |
Rough Sleeper | Emergency accommodation | |
Violence | Legal service | |
Mental health issue | Mental health service | |
Medical issue | Health services |
vi) DataFile class
This class is for implementing the file operations to open, read the values from the given file named 'Ass1data.csv', and store the values in a LinkedList which can be operated polymorphically. This file will be available from the Unit website. Use specific file handling exceptions for various checked exceptions related to file operations. This is a text file with values separated by comas. When you open it in Excel spreadsheet, the values will be displayed in columns. You can open using WordPad to view the values separated by comas.
vii) enum GENDER
Create an enum type GENDER to store male, female gender values as these remain constants.
viii) enum SLEEPING_TYPE
Create an enum type SLEEPING_TYPE to store the values of the current sleeping arrangement attribute given under the Homeless class. These values are constants.
ix) enum RISK_CATEGORY
Create an enum type RISK_CATEGORY to store the values of the riskType attribute given under the AtRisk class. These values are constants.
x) JavaFX classes
The standard classes required include the main class to create the Stage and launch, the controller to initialize GUI components, handle events, and validate user entries, the .fxml file for the layout design of GUI components, and the .css file for formatting. You can have:
The GUI should have the necessary components to enable the user to execute all the functions as provided in Section 2.1 above. You may use the guidelines provided below for your GUI design and implementation. Variations to the provided guidelines are acceptable if it meets the user requirements. Follow the User Interface design guidelines learnt in Week 4 and design the GUI to meet chosen aspects of an easy to use user interface that provides informative error messages, and clear instructions.
You can have a GUI with a MenuBar for enabling the user to add new service need by adding an At Risk or Homeless person and displaying the records in the file. The user should be supported with the GUI in each step as given below. You can use RadioButtons for enabling selection of gender, and the category of Homeless or At Risk. Use a TextField to enter the reason. Use ComboBoxes to display the Risk Categories and current sleeping situations. You can use a Button to add the new service need. You can use a ListView to display the list of Homeless and a Button to activate service. You can either enter the service description or choose from a ComboBox. You can use File Menu items for the file operations:
1. UML class diagrams for the classes Note: UML class diagrams generated using a software tool after completing the coding will not be accepted.
2. Test plan showing input data, expected results, and actual results. Show testing of erroneous entries also.
3. A table listing tasks completed by you, and the corresponding source file names and relevant part of the source code (if it is partial completion).
4. A brief description of difficulties found in designing, implementing or debugging and how did you solve these difficulties as a team.
5. Write a very brief description about teamwork issues such as communication problems, expressing ideas or coming to a consensus for a solution.