Question: I need a java code for the listed program below. it must be modular. Problems specification: create a set of parallel arrays The same diabetic

I need a java code for the listed program below.

it must be modular.

Problems specification:

create a set of parallel arrays

The same diabetic research center wants you to develop an application that, not only keeps track of glucose reading for all patients, but be able to process all data stored in arrays. The application should display a report about all or given selected employee via a menu. Input consists of social security, first name, last name, age, weight, and glucose reading (if allowed because of fasting). Your output consists of all input for all patients and if needed for a selected patient. All processes are based on the following menu:

next for the menu and remaining specs

-1-Register a patient

-2-Display all patients

-3-Search for a patient

-4-Quit program

Your input consists of:

First: You are required to store all patients data in a set of 6 parallels arrays of 100 max entries each. You need an additional 7th array for the state of the patient glucose level:

-patient social security number (declared as an array of strings)

-patient first name (declared as an array of strings)

-patient last name (declared as an array of strings)

-patient age (int)

-patient weight (int)

-patient glucose reading (dont enter glucose reading if patient is not fasting for more than 12 hours: need to check with patient first). (int)

An extra array storing the state of all patients and parallel with the six first arrays:

-patient state (did not fast, low glucose, normal glucose, high glucose: can be coded as int). Hint: you may define this array as an int and then store the following:

-store -1 if the patient was not fasting (you may want to store -1 for the glucose level as even if patient is rejected for the study, we want to keep a record)

-store 1 for low

-store 2 for normal

-store 3 for high

These codes will be used in the display method to print a message to this effect.

What to do?

---if user select -1- from the menu, call the input method, store all data in their related array, evaluate the patient store the related state in the corresponding array.

---if user select -2- from the menu, display all existing patients.

---if user select -3- search for a patient and if found display it.

Needed major methods:

-Code the menu listed above as a separate method.

-Code a single method for all of the input. If patient is not fasting, no glucose reading should occur and you should store a suitable value that indicates no reading ( a value of zero is not acceptable: think about this!) (in this case, you may want to declare all variables as global except for selected one dealing with the menu and the search...etc)

-Code a method that evaluates the state of the glucose level (80-130 normal, less than 80 too low, over 130 too high, or not fasting)

-Code a method that displays all data about a given patient. The state must be displayed as a statement and not just a number. (refer to HW2 solution).

-Code a method that searches for a patient by ssn and if found call the display function, otherwise display a statement to this effect.

-Code a method that calculates and displays the average glucose level of all existing patients.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!