Question: Develop the Java Application by completing the following tasks. Refer to the provided sample run below for guidance. Tasks: Creating Arrays: Create three arrays, each
Develop the Java Application by completing the following tasks. Refer to the provided sample run below for guidance.
Tasks:
Creating Arrays:
Create three arrays, each of size of to store the details of up to patients as follows:
An array of size to store patient IDs, such as
An array of size to store patient names, such as "Asma Ali".
An array of size to store patient age, such as:
Displaying Menu Options:
Develop code to display a menu of options for the user:
Option : Add a new patient.
Option : Search for patient by his ID
Option : Exit the application.
Adding New Patient:
Develop code to add new patient:
Prompt the user to enter the patient's ID and store it in the ID array.
Prompt the user to enter the patient's name and store it in the name array.
Prompt the user to enter the patient's age and store it in the age array.
Display a message indicating that the patient has been added.
Searching for patients:
Develop code to search for a specific patient using the patient ID:
Prompt the user to enter the patient ID
Search for the patient ID in the array and display the patient's name and age if the ID is found.
O Display an error message if the patient ID is not found.
Repeating Tasks:
Develop code that uses a loop to repeatedly display the menu of options and perform. the requested operation until the user chooses option to exit the application.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
