Question: To build a complete working Java program that offer practice with a more involved Java graphical user interface, object oriented programming with a data structure,
To build a complete working Java program that offer practice with a more involved Java graphical user interface, object oriented programming with a data structure, and a large data file.
Overview & Instruction
Your workplace maintains several distribution centers around the US for criticallyneeded vaccines. Users of your application will be health officials for one county or municipality throughout the the country. Write a JavaFX application to manage these distribution requests. You should include a frontend user interface that allows a user to select a county from within a state. You will be using the standad US Government FIPS codes that are unique numerical identifiers for county. It is a fivedigit number with the first two digits relating to the state and the remaining three defining the county with the sate. Your program should include a frontend interface that allows the user to enter county FIPS information for a target county. The desired mechanism for this dataentry is a bit unorthodox and should appear like the picture
The interface will include a dropdown list with all states. Selection of a
given state code will insert the state FIPS identifier into a label ie
selection of MI will set into the label The remaining digits will be selected using buttons that behave similarly to a combination lock. Pressing will increment the digit and will decrement it Be sure the digits wrap or as needed. Finally, the "Order Vaccine" button will process the indicated FIPS code and report a summary via a JavaFX Alert box with calculations and information as indicated below. In addition to these interface components shown above, be sure add the following:
Reset button to change state dropdown list to "unselected" and all subsequent digits to zero.
Check box indicating whether or not a supercold storage facility is available.
Radio button set to indicate the level of readiness the county is for vaccinations:
Phase : Health care and essential workers
Phase : Citizens served in Phase plus senior citizens
Phase : All citizens
When the user keys in a FIPS code and selects the readiness radio button and optional checkbox, your program should capture the FIPS code and then execute the following actions:
Validate the FIPS code. If invalid ie not found provide a JavaFX Alert box warning and perform no further actions.
If FIPS code is valid,
a Get the latitude and longitude for the county requested.
b Determine distances from vaccine distribution centers using provided class below
c Formulate the summary of the vaccine order as specified below
The following specifications are needed for the solution:
Vaccine distribution centers are located in
Kalamazoo, MI Latitude Longitude
Olive Branch, MS Latitude Longitude
Shipment center selection: The distribution center to use for the vaccine order is defined using these criteria:
If you facility does not have supercold refrigeration capacity, they must use the Mississippi center.
If the facility does have refrigeration capacity, then the distribution center that is closest to the county will be used.
Vaccine count: The count of vaccines will be of the population of the county if only health care workers are ready to be vaccinated, if health care worker and seniors are ready, and if the county is ready for all citizens. Regardless of these numbers, no shipment can be more than doses. Shipment time: If shipment is less than or equal to miles, then the shipping time is one day. If the istance is over miles but under miles, then it is two days. For all other US locations miles or more away from the distribution center, vaccine shipments will require three days.
Necessary data files include:
County data file: fipsCountyPopLatLon.txt The format for this file is:
stateFIPScodenamepopulationlatitudelongitude
And an example line of data includes:
MIBay,
State info file: stateFIPScodes.txt The format for this file is:
statenamestatecodeFIPSprefixcodeDistance calculation: To calculate the distances, you will need to integrate and likely alter the greatcircle distance formula. This formula is provided and demonstrated for you in the following example:DistanceCalc.java. Note: Western Hemisphere longitudes are negative
Output should be a basic JavaFX Alert box containing the following information:
County name
Distribution center to ship from
Number of doses to ship
Distance of shipment from distribution center to county
Anticipated date of shipment
Note that this item requires access to the current date and then increments must be added to it
Your application should be object oriented containing:
The main application GUI
A class to manage one "county".
At least one class that will act as a "data manager" for an array of county objects.
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
