Coit20256 data structures and algorithms - develop a java


Objectives

- Analyse, develop, and implement software solutions

- Choose and compare appropriate data structures and algorithms in program design

- Apply classes, inheritance, polymorphism, and exception handling

- Test software implementations to ensure correctness and maintainability

Assignment Specification

Your task is to develop a Java windowed application for a nursing home management system. The program allows the user to read the resident name, age, and health condition description from a text file (ResidentData.txt), save data to the same file, display data in a text area, sort data by the resident name, search data by the resident name, add a record and delete an entry.

How the program works

There are four menus (File, Tools, Help and Exit). The File menu contains 2 items (Read and Save), the Tools menu has 5 items (List, Add, Delete, Sort and Search), the Help menu has 1 item (Details) and the Exit menu has 1 item (Exit). The menu items are described below.

File→Read: Reads the data from the file ResidentData.txt (see format of this file below) and stores the data in a Linked List or an ArrayList. The application must use appropriate exception handling to deal with problems during the file opening (e.g. what to do if file doesn't exist).

The file contains a series of records, each record with the resident name (String), age (integer) and health condition description (String). A sample file format for ResidentData.txt is as follows.

Harry Potter,90,Good health
David Packer,78,Poor health
James Lin,68,Chronic illness
Michael Li,79,Poor Health
John Smith,66,Good Health
Max William,89,Diabetes II

File→Save: Saves all the data from ArrayList/LinkedList to the same file name ResidentData.txt file. The saved file contains the resident name, age and health condition description, separating with comma. This file should be allowed to re-open and read data as the File->Read operation as above. The application must use the appropriate exception handling to deal with problems during the file saving.

Tools→List: Lists all resident records from ArrayList/LinkedList in the display area as shown below.

Tools→Add: Adds a resident entry to the Linked List via a series of input dialog box to enter the resident name, age and health condition description respectively. For example, the following input dialog box allows entering the resident name.

Tools→Delete: Deletes a resident entry by entering the resident name as the following input dialog box. Accordingly, the matched object of a resident stored in the Linked List is removed.

Tools→Sort: Sorts data by the resident name in ascending order using the best sorting algorithm covered in COIT20256 unit and displays sorted data in the display area as shown below. You are not allowed to use any built-in sorting algorithm. You must write your own code to implement sorting.

Tools→Search : Asks the user to enter a resident name via an input dialog box as shown below and uses the best searching algorithm covered in COIT20256 unit to search for the given resident name. It displays appropriate message found or not found in the display area.
You must write your code to implement searching.

Help→Details: Provides the user with some brief information on this application program.

Exit→Exit: Allows the user to exit the application.

Data Validation
Input data validation for the resident name entered to search is required. If no resident name is entered and OK button is pressed, then the application will pop out a message box with an appropriate message.

Assumptions
It can assume that the program is not concerned the issue of uniqueness of resident name. A record is a resident object. Two records having the same resident name is allowed for simplicity. To test sort and search algorithm efficiency with 1000 records in the data file, you can copy and paste repeating records in the data file. In addition, you can assume that the resident name is case sensitive.

Data Structures & Algorithms
You must use:
- LinkedList or ArrayList for storing resident object.
- Best searching algorithm (based on your analysis) covered in COIT20256 unit for searching.
- Best sorting algorithm (based on your analysis) covered in COIT20256 unit for sorting.
- Two classes to implement the application.

One class, named Resident which describes an individual Resident (fields such as resident name, age, and health condition description, and get and set methods) and another class named ResidentApplication which contains GUI with components and methods for sorting, searching and file processing etc. - Appropriate fields and methods to store/process resident data.

Evaluation and Analysis of Data Structures and Algorithms

- You must justify the reason for selecting the data structure (ArrayList or LinkedList). Why do you think that the data structure used by you is the best data structure for your application? Write maximum 2-3 lines to answer this question in Report.docx.

- You must justify the reason for selecting the sorting algorithm. Why do you think that the sorting algorithm used by you is the best sorting algorithm for your application? Write maximum 2-4 lines to answer this question in Report.docx. You can justify your answer with big O notation on the algorithms involved.

- You must justify the reason for selecting the searching algorithm. Why do you think that the searching algorithm used by you is the best searching algorithm for your application? Write maximum 2-4 lines to answer this question in Report.docx. You can justify your answer with big O notation on the algorithms studied.

- You must run your application 3 times by increasing the data each time (e.g. 10 records, 100 records, 1000 records) and compare time for sorting algorithm. Write in Report.docx, the time taken to sort in each case.

- You must run your application 3 times by increasing the data each time (e.g. 10 records, 100 records, 1000 records) and compare time for searching algorithm (use same search key each time). Write in Report.docx, the time taken to search in each case.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Coit20256 data structures and algorithms - develop a java
Reference No:- TGS02624997

Now Priced at $70 (50% Discount)

Recommended (95%)

Rated (4.7/5)