Ask Java Expert


Home >> 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.

Java, Programming

  • Category:- Java
  • Reference No.:- M92657853
  • Price:- $70

Priced at Now at $70, Verified Solution

Have any Question?


Related Questions in Java

Chatbotscreate a small networked chat application that is

Chatbots Create a small, networked chat application that is populated by bots. Introduction On an old server park, filled with applications from the early days of the internet, a few servers still run one of the earliest ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Assignment game prototypeoverviewfor this assessment task

Assignment: Game Prototype Overview For this assessment task you are expected to construct a prototype level/area as a "proof of concept" for the game that you have designed in Assignment 1. The prototype should function ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

In relation to javaa what is constructor the purpose of

(In relation to Java) A. What is constructor? the purpose of default constructor? B. How do you get a copy of the object but not the reference of the object? C. What are static variables and instance variables? D. Compar ...

Project descriptionwrite a java program to traverse a

Project Description: Write a java program to traverse a directory structure (DirWalker.java) of csv files that contain csv files with customer info. A simple sample in provided in with the sample code but you MUST will r ...

Fundamentals of operating systems and java

Fundamentals of Operating Systems and Java Programming Purpose of the assessment (with ULO Mapping) This assignment assesses the following Unit Learning Outcomes; students should be able to demonstrate their achievements ...

Assessment -java program using array of Assessment -JAVA Program using array of objects

Assessment -JAVA Program using array of objects Objectives This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details For this assignment, you are required to develop a Windowed G ...

Applied software engineering assignment 1 -learning

Applied Software Engineering Assignment 1 - Learning outcomes - 1. Understand the notion of software engineering and why it is important. 2. Analyse the risk factors associated with phases of the software development lif ...

Retail price calculatorwrite a java program that asks the

Retail Price Calculator Write a JAVA program that asks the user to enter an item's wholesale cost and its markup percentage. It should then display the item's retail price. For example: (If an item's wholesale cost is 5. ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As