Problem: Cruise Ship Evacuation
Titanic Cruise Lines (TCL) has decided that due to an unfortunate incident, it needs to streamline the evacuation of occupants from a sinking cruise ship. The old stand-by of women and children first was found to not be sufficiently clear for the prioritization of evacuees, which led to people falling off the ship and hitting propeller blades and such. To help reduce the chaos under these stressful circumstances, TCL has commissioned you along with a team of software engineers to develop a program to determine the order in which people should be let on to lifeboats.
Priority and Ordering of Evacuees
Children have the highest priority in being evacuated from the ship, where a child is defined as a person aged less than 18 years. Among children, the younger they are, the higher their priority. Children of the same integer age should be prioritized based on their last names (String comparison). If two children have the same age and last name, they should then be prioritized based on first name. Amongst adults (people age 18 and older), women have priority over men. The executives of TCL, being very wealthy individuals, insist that adults of the same sex be prioritized based on annual income (wealthier have higher priority). Finally, adults of the same sex with equal income should be prioritized by name in the same way as children. There will not be two people with the same name on one ship.
Program Design and Classes
There are a total of five classes in this program. Two of the classes are already developed and you have to write the other three.
Attached is more information on the program, as well as two of the 5 classes that need to be created, and the sample input file and output files