Created
April 25, 2016 07:52
-
-
Save dante-byte/ccbf0f3be7902bc1d68ce106cd67851e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package tiy.banking; | |
import sun.util.locale.provider.HostLocaleProviderAdapter; | |
import java.util.HashMap; | |
import java.util.Scanner; | |
import static tiy.banking.HostipalRunner.emoryHostipal; | |
/** | |
* Created by Donta White on 4/15/2016. | |
*/ | |
public class Hostipal { | |
HashMap<String, Patient> patientList = new HashMap<String, Patient>(); | |
HashMap<String, Nurse> nurseList = new HashMap<String, Nurse>(); | |
HashMap<String, Doctor> doctorsByFirstName = new HashMap<String, Doctor>(); | |
public void printInfoDr() { | |
HashMap<String, Doctor> doctorsByFirstName = new HashMap<String, Doctor>(); | |
} | |
public void printInfoNurse(){ | |
} | |
public void printInfoPatient(){ | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package tiy.banking; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.Scanner; | |
import java.util.StringJoiner; | |
/** | |
* Created by Donta White on 4/15/2016. | |
*/ | |
public class HostipalRunner { | |
static Hostipal emoryHostipal = new Hostipal(); | |
static ArrayList<Doctor> hospitalDoctors; | |
public static void main(String[] args) { | |
System.out.println("Admistrative Access Point"); | |
System.out.println("(1) Look up spefiic persons"); | |
System.out.println("(2) Look up list of persons"); | |
Scanner emoryScanner = new Scanner(System.in); | |
String hiEmory = emoryScanner.nextLine(); | |
if (hiEmory.equals("1")) { | |
System.out.println("one moment please"); | |
} | |
if (hiEmory.equals("2")) | |
System.out.println(); | |
myEye(); | |
//myEye(); | |
// Nurse myNurse = new Nurse(); | |
// Doctor myDoctor = new Doctor(); | |
//Patient ourPatient = new Patient(); | |
//hospitalDoctors = new ArrayList<Doctor>(); | |
Person myPerson = new Person(); | |
Patient myPatient = new Patient(); | |
//Nurse myNurse = new Nurse(); | |
//Doctor myDoctor = new Doctor(); | |
//myDoctor.fName = "KF"; | |
//myDoctor.walk(); | |
//hospitalDoctors.add(myDoctor); | |
Doctor firstDoctor = new Doctor(); | |
firstDoctor.fName = " Donta"; | |
firstDoctor.lName = " White"; | |
//firstDoctor.isCertified = true; | |
hospitalDoctors.add(firstDoctor); | |
Doctor secondDoctor = new Doctor(); | |
secondDoctor.fName = " Yeshahya"; | |
secondDoctor.lName = " Smith"; | |
//secondDoctor.isCertified = true; | |
hospitalDoctors.add(secondDoctor); | |
Doctor thirdDoctor = new Doctor(); | |
thirdDoctor.fName = " Tamia"; | |
thirdDoctor.lName = " Story"; | |
//thirdDoctor.isCertified = true; | |
hospitalDoctors.add(thirdDoctor); | |
for (int docIndex = 0; docIndex < hospitalDoctors.size(); docIndex++) { | |
Doctor currentDoctor = hospitalDoctors.get(docIndex); | |
//System.out.println(currentDoctor.fName + " is certified"); | |
//if (currentDoctor.isCertified == true) { | |
//System.out.println(currentDoctor.fName + " is certified"); this the line for true or not 4 cert | |
//} else { | |
//System.out.println(currentDoctor.fName + " is **not** certified"); | |
//} | |
} | |
//for (Doctor currentDoctor: hospitalDoctors) { | |
//System.out.println(currentDoctor.fName + " certification status is " + currentDoctor.isCertified); | |
//} | |
HashMap<String, Doctor> doctorsByFirstName = new HashMap<String, Doctor>(); | |
doctorsByFirstName.put("Dr " + firstDoctor.fName + firstDoctor.lName, firstDoctor); | |
doctorsByFirstName.put("Dr " + secondDoctor.fName + secondDoctor.lName, firstDoctor); | |
doctorsByFirstName.put("Dr " + thirdDoctor.fName + thirdDoctor.lName, thirdDoctor); | |
System.out.println("========================"); | |
for (String currentFirstName : doctorsByFirstName.keySet()){ | |
System.out.println(currentFirstName); | |
} | |
// for (Doctor currentDoctor : doctorsByFirstName.values()) { | |
// System.out.println(currentDoctor.isCertified); | |
// } | |
//Doctor theDoctorIWant = doctorsByFirstName.get("Donta"); | |
//System.out.println("Here is the doc i want is Dr" + theDoctorIWant.fName); | |
//Patient myPatient = new Patient(); | |
//HashMap<String, Patient> patientList = new HashMap<String, Patient>(); | |
//Nurse myNurse = new Nurse(); | |
//HashMap<String, Nurse> nurseList = new HashMap<String, Nurse>(); | |
// Nurse currentNurse = hospitalNurse.get(nurseIndex); | |
Nurse firstNurse = new Nurse(); | |
firstNurse.fName = " Ashley"; | |
firstNurse.lName = " Smith"; | |
//hospitalNurse.add(firstNurse); | |
Nurse secondNurse = new Nurse(); | |
secondNurse.fName = " Amber"; | |
secondNurse.lName = " Brown"; | |
Nurse thirdNurse = new Nurse(); | |
thirdNurse.fName = " Kevin"; | |
thirdNurse.lName = " Stacks"; | |
Nurse forthNurse = new Nurse(); | |
forthNurse.fName = " Faith"; | |
forthNurse.lName = " Love"; | |
Nurse fifthNurse = new Nurse(); | |
fifthNurse.fName = " Hope"; | |
fifthNurse.lName = " Stubs"; | |
Nurse sixNurse = new Nurse(); | |
sixNurse.fName = " Shayla"; | |
sixNurse.lName = " Arms"; | |
//("Dr " + firstDoctor.fName + firstDoctor.lName, firstDoctor); | |
//HashMap<String, Nurse> nurseList = new HashMap<String, Nurse>(); | |
emoryHostipal.nurseList.put("RN" + firstNurse.fName + " " + firstNurse.lName, firstNurse); | |
emoryHostipal.nurseList.put("RN" + secondNurse.fName + secondNurse.lName, secondNurse); | |
emoryHostipal.nurseList.put("RN" + thirdNurse.fName + thirdDoctor.lName, secondNurse); | |
emoryHostipal.nurseList.put("RN" + forthNurse.fName + forthNurse.lName, forthNurse); | |
emoryHostipal.nurseList.put("RN" + fifthNurse.fName + fifthNurse.lName, fifthNurse); | |
emoryHostipal.nurseList.put("RN" + sixNurse.fName + sixNurse.lName, sixNurse); | |
System.out.println("========================"); | |
for (String currentFirstName : emoryHostipal.nurseList.keySet()) { | |
System.out.println(currentFirstName); | |
} | |
System.out.println("========================"); | |
//Doctor currentDoctor = hospitalDoctors.get(docIndex); | |
//System.out.println(currentDoctor.fName + " certification status is " + currentDoctor.isCertified); | |
Patient firstPatient = new Patient(); | |
firstPatient.fName = "Alex"; | |
firstPatient.lName = "Ands"; | |
Patient secondPatient = new Patient(); | |
secondPatient.fName = "Brad"; | |
secondPatient.lName = "Brans"; | |
Patient thirdPatient = new Patient(); | |
thirdPatient.fName = "Charley"; | |
thirdPatient.lName = "Charls"; | |
Patient forthPatient = new Patient(); | |
forthPatient.fName = "David"; | |
forthPatient.lName = "Doug"; | |
Patient fifthPatient = new Patient(); | |
fifthPatient.fName = "Eddy"; | |
fifthPatient.lName = "Eggface"; | |
Patient sixPatient = new Patient(); | |
sixPatient.fName = "Fry"; | |
sixPatient.lName = "Frypan"; | |
Patient seventhPatient = new Patient(); | |
seventhPatient.fName = "George"; | |
seventhPatient.lName = "Georgiaboy"; | |
Patient eighthPatient = new Patient(); | |
eighthPatient.fName = "Howard"; | |
eighthPatient.lName = "Hardy"; | |
Patient ninthPatient = new Patient(); | |
ninthPatient.fName = "Ish"; | |
ninthPatient.lName = "Island"; | |
Patient tenthPatient = new Patient(); | |
tenthPatient.fName = "James"; | |
tenthPatient.lName = "Jordan"; | |
emoryHostipal.patientList.put("Patient " + firstPatient.fName + " " + firstPatient.lName, firstPatient); | |
emoryHostipal.patientList.put("Patient " + secondPatient.fName + " "+ secondPatient.lName,secondPatient); | |
emoryHostipal.patientList.put("Patient " + thirdPatient.fName + " " + thirdPatient.lName, thirdPatient); | |
emoryHostipal.patientList.put("Patient " + forthPatient.fName + " " + forthPatient.lName, forthPatient); | |
emoryHostipal.patientList.put("Patient " + fifthPatient.fName + " " + fifthPatient.lName, fifthPatient); | |
emoryHostipal.patientList.put("Patient " + sixPatient.fName + " " + sixPatient.lName, sixPatient); | |
emoryHostipal.patientList.put("Patient " + seventhPatient.fName + " " + seventhPatient.lName, seventhPatient); | |
emoryHostipal.patientList.put("Patient " + eighthPatient.fName + " " + eighthPatient.lName, eighthPatient); | |
emoryHostipal.patientList.put("Patient " + ninthPatient.fName + " " + ninthPatient.lName, ninthPatient); | |
emoryHostipal.patientList.put("Patient " + tenthPatient.fName + " " + tenthPatient.lName, tenthPatient); | |
System.out.println("========================"); | |
for (String currentFirstName : emoryHostipal.patientList.keySet()) { | |
System.out.println(currentFirstName); | |
} | |
} | |
public static void myNose(){ | |
HashMap<String, Doctor> doctorsByFirstName = new HashMap<String, Doctor>(); | |
} | |
public static void myEye(){ | |
for (int start = 0; start < 100; start++) { | |
Nurse myNurse = new Nurse(); | |
Doctor myDoctor = new Doctor(); | |
Patient ourPatient = new Patient(); | |
System.out.println("(0) Please make your selection"); | |
System.out.println("(1) Access Hostipal Information"); | |
System.out.println("(2) Access Patient Information"); | |
System.out.println("(3) Access Doctor Information"); | |
System.out.println("(4) Access Nurse Information"); | |
System.out.println("(5) Exit Terminal"); | |
Scanner lineScanner = new Scanner(System.in); | |
String askEmory = lineScanner.nextLine(); | |
//System.out.println("askEmory = " + askEmory); | |
if (askEmory.equals("1")) { | |
System.out.println("Access Hostipal Information"); | |
System.out.println("550 Peachtree St NE Atlanta GA 30308"); | |
System.out.println("Revenue Total 4th qty 2,999,090"); | |
} | |
if (askEmory.equals("2")) { | |
System.out.println("Access Patient Information"); | |
ourPatient.printInfoPatient(); | |
//Doctor theDoctorIWant = emoryHostipal.doctorsByFirstName.get("Yeshahya"); | |
//System.out.println("Here is the doctor I want is Dr. " + theDoctorIWant.lName); | |
} | |
if (askEmory.equals("3")) { | |
System.out.println("Access Doctor Information"); | |
myDoctor.printInfoDrs(); | |
} | |
if (askEmory.equals("4")) { | |
System.out.println("Access Nurse Information"); | |
myNurse.printInfoNurse(); | |
} | |
if (askEmory.equals("5")) { | |
System.out.println("Exiting Terminal"); | |
break; | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package tiy.banking; | |
import java.util.HashMap; | |
import java.util.Map; | |
import static tiy.banking.HostipalRunner.emoryHostipal; | |
/** | |
* Created by Donta White on 4/15/2016. | |
*/ | |
public class Nurse extends Person { | |
//Nurse myNurse = new Nurse(); | |
public Nurse(){ | |
String fName; | |
String lName; | |
String stethoscope; | |
String gloves; | |
String Thermometer; | |
String reflexhammer; | |
Boolean isRegisteredNurse; | |
} | |
public void printInfoNurse(){ | |
HashMap<String, Nurse> nurseList = new HashMap<String, Nurse>(); | |
Nurse firstNurse = new Nurse(); | |
firstNurse.fName = " Ashley"; | |
firstNurse.lName = " Smith"; | |
Nurse secondNurse = new Nurse(); | |
secondNurse.fName = " Amber"; | |
secondNurse.lName = " Brown"; | |
Nurse thirdNurse = new Nurse(); | |
thirdNurse.fName = " Kevin"; | |
thirdNurse.lName = " Stacks"; | |
Nurse forthNurse = new Nurse(); | |
forthNurse.fName = " Faith"; | |
forthNurse.lName = " Love"; | |
Nurse fifthNurse = new Nurse(); | |
fifthNurse.fName = " Hope"; | |
fifthNurse.lName = " Stubs"; | |
Nurse sixNurse = new Nurse(); | |
sixNurse.fName = " Shayla"; | |
sixNurse.lName = " Arms"; | |
emoryHostipal.nurseList.put("RN" + firstNurse.fName + " " + firstNurse.lName, firstNurse); | |
emoryHostipal.nurseList.put("RN" + secondNurse.fName + secondNurse.lName, secondNurse); | |
emoryHostipal.nurseList.put("RN" + thirdNurse.fName + thirdNurse.lName, secondNurse); | |
emoryHostipal.nurseList.put("RN" + forthNurse.fName + forthNurse.lName, forthNurse); | |
emoryHostipal.nurseList.put("RN" + fifthNurse.fName + fifthNurse.lName, fifthNurse); | |
emoryHostipal.nurseList.put("RN" + sixNurse.fName + sixNurse.lName, sixNurse); | |
for (String currentFirstName : emoryHostipal.nurseList.keySet()) { | |
System.out.println(currentFirstName); | |
} | |
System.out.println(nurseList); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package tiy.banking; | |
import java.util.HashMap; | |
import static tiy.banking.HostipalRunner.emoryHostipal; | |
/** | |
* Created by Donta White on 4/15/2016. | |
*/ | |
public class Patient extends Person{ | |
public Patient(){ | |
String fName; | |
String lName; | |
int yearOfBirth; | |
int age; | |
int weight; | |
String gender; | |
} | |
public void printInfoPatient(){ | |
HashMap<String, Patient> patientList = new HashMap<String, Patient>(); | |
Patient firstPatient = new Patient(); | |
firstPatient.fName = "Alex"; | |
firstPatient.lName = "Ands"; | |
Patient secondPatient = new Patient(); | |
secondPatient.fName = "Brad"; | |
secondPatient.lName = "Brans"; | |
Patient thirdPatient = new Patient(); | |
thirdPatient.fName = "Charley"; | |
thirdPatient.lName = "Charls"; | |
Patient forthPatient = new Patient(); | |
forthPatient.fName = "David"; | |
forthPatient.lName = "Doug"; | |
Patient fifthPatient = new Patient(); | |
fifthPatient.fName = "Eddy"; | |
fifthPatient.lName = "Eggface"; | |
Patient sixPatient = new Patient(); | |
sixPatient.fName = "Fry"; | |
sixPatient.lName = "Frypan"; | |
Patient seventhPatient = new Patient(); | |
seventhPatient.fName = "George"; | |
seventhPatient.lName = "Georgiaboy"; | |
Patient eighthPatient = new Patient(); | |
eighthPatient.fName = "Howard"; | |
eighthPatient.lName = "Hardy"; | |
Patient ninthPatient = new Patient(); | |
ninthPatient.fName = "Ish"; | |
ninthPatient.lName = "Island"; | |
Patient tenthPatient = new Patient(); | |
tenthPatient.fName = "James"; | |
tenthPatient.lName = "Jordan"; | |
emoryHostipal.patientList.put("Patient " + firstPatient.fName + " " + firstPatient.lName, firstPatient); | |
emoryHostipal.patientList.put("Patient " + secondPatient.fName + " "+ secondPatient.lName,secondPatient); | |
emoryHostipal.patientList.put("Patient " + thirdPatient.fName + " " + thirdPatient.lName, thirdPatient); | |
emoryHostipal.patientList.put("Patient " + forthPatient.fName + " " + forthPatient.lName, forthPatient); | |
emoryHostipal.patientList.put("Patient " + fifthPatient.fName + " " + fifthPatient.lName, fifthPatient); | |
emoryHostipal.patientList.put("Patient " + sixPatient.fName + " " + sixPatient.lName, sixPatient); | |
emoryHostipal.patientList.put("Patient " + seventhPatient.fName + " " + seventhPatient.lName, seventhPatient); | |
emoryHostipal.patientList.put("Patient " + eighthPatient.fName + " " + eighthPatient.lName, eighthPatient); | |
emoryHostipal.patientList.put("Patient " + ninthPatient.fName + " " + ninthPatient.lName, ninthPatient); | |
emoryHostipal.patientList.put("Patient " + tenthPatient.fName + " " + tenthPatient.lName, tenthPatient); | |
for (String currentFirstName : emoryHostipal.patientList.keySet()) { | |
System.out.println(currentFirstName); | |
} | |
System.out.println(patientList); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package tiy.banking; | |
/** | |
* Created by Donta White on 4/15/2016. | |
*/ | |
public class Person { | |
String fName; | |
String lName; | |
int yearOfBirth; | |
int age; | |
String gender; | |
String jobTitle; | |
public void walk() { | |
System.out.println("reg person wak"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment