Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A Nurse data class (a subclass of Person) to contain these: floor shift (this will be in the data file as day and evening) highest
- A Nurse data class (a subclass of Person) to contain these:
- floor
- shift (this will be in the data file as "day" and "evening")
- highest degree earned (this will be an LPN, RN or a BSN)
- Add the Nurse objects to the ArrayList (the NursingStaff data file is here: NursingStaff Download NursingStaff (NOTE THE FILE NAME HERE)
- All ID's assigned to Nurse objects MUST contain an "N-" in front of the ID. Check the ID number of all Nurse objects - add an "N-" to the front of any ID that is missing this (you may need to shop around the Java API in the String package)
- For example, the first nurse is Yong Ferrell. In the data file the ID for Yong is C2Y8N2, it needs to be N-C2Y8N2.
- The calculateTotal() method for a Nurse object will calculate (TBD) - this will be added soon, since you need a method for calculateTotal() to get a clean compile, you may at this time an empty method (a stub) that has no functionality
- the following given the addition of the Nurse objects
- Every floor must have at least one Nurse assigned to it per shift - confirm this is true for your hospital.
- There is to be one Nurse assigned to every 3 patients on a floor - confirm this is true for your hospital.
- Determine if a floor is understaffed or overstaffed based on this fact
- By menu option (I would recommend a sub menu for querying the Nurse objects, but this is not required)
- Display all day nurses by floor
- Your code will display the floor and the nurses on the day shift on that floor
- Display all night nurses by floor (see 1.1 above)
- Display whether a floor is understaffed or overstaffed per shift given the rule in 4.2 above.
- Name ID number shift floor highest degree earned
Yong FerrellC2Y8N2 day 5 RN
Sara GuerreroN-L5K4H3 evening 9 BSN
Betsy SchwartzN-N4Q6L2 evening 7 LPN
Shawn BentleyN-R7E5B5 evening 6 RN
Jimmy OliverN-O8I1C2 day 10 RN
Jeannie GeorgeN-S4H4C4 day 5 RN
Fritz SullivanN-G5I1E8 day 8 RN
Stanton ObrienN-P3E1G2 day 5 RN
Sondra CollierN-R3R5Y8 evening 6 LPN
Rhonda MichaelN-U6I4Z5 evening 5 LPN
Maggie SimonN-H7E6N7 day 8 LPN
Eliseo GravesE5H2G5 evening 4 RN
Susanna MccannN-X0J8O8 day 6 LPN
Duane WilsonN-X2F4L9 day 9 LPN
Kerri Braun N-T5C4Q8 evening 9 RN
Owen MorrowN-U9U7F4 day 11 BSN
Luciano CordovaN-C6D8F5 evening 2 RN
Roseann MosleyS4M8X5 evening 10 LPN
Alyson HortonN-T5S1K3 day 11 BSN
Janice MarquezN-G8C4M5 evening 4 LPN
- Display all day nurses by floor
Step by Step Solution
★★★★★
3.33 Rating (156 Votes )
There are 3 Steps involved in it
Step: 1
import javaioFile import javaioFileNotFoundException import javautilArrayList import javautilHashMap import javautilScanner class Person protected Str...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started