diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7320768 --- /dev/null +++ b/.gitignore @@ -0,0 +1,122 @@ +# Created by https://www.toptal.com/developers/gitignore/api/java,intellij+iml +# Edit at https://www.toptal.com/developers/gitignore?templates=java,intellij+iml + +### Intellij+iml ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# Idea folder +.idea/ + +.fleet/ + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### Intellij+iml Patch ### +# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023 + +*.iml +modules.xml +.idea/misc.xml +*.ipr + +### Java ### +# Compiled class file +*.class + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* +replay_pid* + +# End of https://www.toptal.com/developers/gitignore/api/java,intellij+iml \ No newline at end of file diff --git a/reto1/src/Main.java b/reto1/src/Main.java new file mode 100644 index 0000000..69829d9 --- /dev/null +++ b/reto1/src/Main.java @@ -0,0 +1,176 @@ +import java.util.HashMap; +import java.util.Scanner; + +public class Main { + private static final HashMap players = new HashMap<>(); + private static final Scanner scanner = new Scanner(System.in); + + public static void main(String[] args) throws InterruptedException { + initializePlayers(); + + while (true){ + switch (mainMenu()){ + case 1 -> { + playerReview(); + Thread.sleep(2000); + } + case 2 -> { + playerCompare(); + Thread.sleep(2000); + } + case 3 -> { + fastestPlayer(); + Thread.sleep(2000); + } + case 4 -> { + topGoalPlayer(); + Thread.sleep(2000); + } + case 5 -> { + mostAssistsPlayer(); + Thread.sleep(2000); + } + case 6 -> { + highestPassingPlayer(); + Thread.sleep(2000); + } + case 7 -> { + mostDefensivePlayer(); + Thread.sleep(2000); + } + case 8 -> System.exit(0); + default -> System.out.println("Wrong Option!"); + } + } + } + + private static void mostDefensivePlayer() { + Player topDefensivePlayer = null; + int defence = -1; + + for(Player player: players.values()){ + if (player.getDefence() > defence){ + topDefensivePlayer = player; + defence = topDefensivePlayer.getDefence(); + } + } + + System.out.println("The top Defensive Involvements is: "+ topDefensivePlayer.getNAME() + " and his/her attribute value is: "+ topDefensivePlayer.getDefence()); + } + + private static void highestPassingPlayer() { + Player topPassingAccuracyPlayer = null; + int passingAccuracy = -1; + + for(Player player: players.values()){ + if (player.getAccuracy() > passingAccuracy){ + topPassingAccuracyPlayer = player; + passingAccuracy = topPassingAccuracyPlayer.getAccuracy(); + } + } + + System.out.println("The top Passing Accuracy is: "+ topPassingAccuracyPlayer.getNAME() + " and his/her attribute value is: "+ topPassingAccuracyPlayer.getAccuracy()); + } + + private static void mostAssistsPlayer() { + Player topPlayerAssistant = null; + int assists = -1; + + for(Player player: players.values()){ + if (player.getAssists() > assists){ + topPlayerAssistant = player; + assists = topPlayerAssistant.getAssists(); + } + } + + System.out.println("The top Assistant is: "+ topPlayerAssistant.getNAME() + " and his/her attribute value is: " + topPlayerAssistant.getAssists()); + } + + private static void topGoalPlayer() { + + Player topScorerPlayer = null; + int scorer = -1; + + for(Player player: players.values()){ + if (player.getGoals() > scorer){ + topScorerPlayer = player; + scorer = topScorerPlayer.getGoals(); + } + } + + System.out.println("The top Scorer is: "+ topScorerPlayer.getNAME() + " and his/her attribute value is: "+ topScorerPlayer.getGoals()); + + } + + private static void fastestPlayer() { + Player playerFastest = null; + int fastest = -1; + + for(Player player: players.values()){ + if (player.getSpeed() > fastest){ + playerFastest = player; + fastest = playerFastest.getSpeed(); + } + } + + System.out.println("The Fastest player is: "+ playerFastest.getNAME() + " and his/her attribute value is: "+ playerFastest.getSpeed()); + + } + + private static void playerCompare() { + System.out.print("Introduce the first Jersey Number: "); + int jerseyNumber1 = scanner.nextInt(); + System.out.print("Introduce the second Jersey Number: "); + int jerseyNumber2 = scanner.nextInt(); + + Player player1 = players.get(jerseyNumber1); + Player player2 = players.get(jerseyNumber2); + + if(player1 != null && player2 != null){ + System.out.println("*------------Player Compare------------*"); + System.out.println("The Player with the Jersey number: " + jerseyNumber1 + " has the following statistics:"); + System.out.println(players.get(jerseyNumber1)); + System.out.println("The Player with the Jersey number: " + jerseyNumber2 + " has the following statistics:"); + System.out.println(players.get(jerseyNumber2)); + }else { + System.out.println("Players not Found. Try again!"); + } + } + + private static void playerReview() { + System.out.print("Introduce the Jersey Number: "); + int jerseyNumber = scanner.nextInt(); + + if (players.get(jerseyNumber) != null){ + System.out.println("The Player with the Jersey number: " + jerseyNumber + " has the following statistics:"); + System.out.println(players.get(jerseyNumber)); + } else { + System.out.println("Player not Found. Try again!"); + } + } + + private static int mainMenu(){ + + System.out.println("*------------Welcome to the statistic tool, chose your option------------*"); + System.out.println("1 - Player Review"); + System.out.println("2 - Players Comparation"); + System.out.println("3 - Fastest Player"); + System.out.println("4 - TopGoal Player"); + System.out.println("5 - TopAssistant Player"); + System.out.println("6 - TopPassing Player"); + System.out.println("7 - TopDefensive Player"); + System.out.println("8 - Exit"); + System.out.print("Select your option: "); + + return scanner.nextInt(); + } + private static void initializePlayers(){ + players.put(8,new Player("Bruno Fernandes", 5, 6, 9,10,3)); + players.put(11,new Player("Rasmus Hojlund",12,8,2,6,2)); + players.put(5,new Player("Harry Maguire",1,5,1,7,9)); + players.put(17,new Player("Alejandro Garnacho",8,7,8,6,0)); + players.put(7,new Player("Mason Mount",2,6,4,8,1)); + } + + +} \ No newline at end of file diff --git a/reto1/src/Player.java b/reto1/src/Player.java new file mode 100644 index 0000000..a3c932a --- /dev/null +++ b/reto1/src/Player.java @@ -0,0 +1,74 @@ +public class Player { + + private final String NAME; + private Integer goals; + private Integer speed; + private Integer assists; + private Integer accuracy; + private Integer defence; + + public Player(String NAME, Integer goals, Integer speed, Integer assists, Integer accuracy, Integer defence) { + this.NAME = NAME; + this.goals = goals; + this.speed = speed; + this.assists = assists; + this.accuracy = accuracy; + this.defence = defence; + } + + public String getNAME() { + return NAME; + } + + public Integer getGoals() { + return goals; + } + + public void setGoals(Integer goals) { + this.goals = goals; + } + + public Integer getSpeed() { + return speed; + } + + public void setSpeed(Integer speed) { + this.speed = speed; + } + + public Integer getAssists() { + return assists; + } + + public void setAssists(Integer assists) { + this.assists = assists; + } + + public Integer getAccuracy() { + return accuracy; + } + + public void setAccuracy(Integer accuracy) { + this.accuracy = accuracy; + } + + public Integer getDefence() { + return defence; + } + + public void setDefence(Integer defence) { + this.defence = defence; + } + + @Override + public String toString() { + return + "Name = " + NAME + + "\nGoals = " + goals + + "\nSpeed = " + speed + + "\nAssists = " + assists + + "\nAccuracy = " + accuracy + + "\nDefensive Involvements = " + defence + ; + } +} diff --git a/reto2/src/RetoDos.java b/reto2/src/RetoDos.java new file mode 100644 index 0000000..2cf6fa4 --- /dev/null +++ b/reto2/src/RetoDos.java @@ -0,0 +1,137 @@ +import java.util.Scanner; + +public class RetoDos { + static Scanner scanner = new Scanner(System.in); + + public static void main(String[] args) { + + String season; + + while (true) { + switch (findBucket()) { + case 1 -> { + System.out.println("According to your budget, your only option is to travel during Winter"); + defineDestination("winter"); + System.exit(0); + } + case 2 -> { + System.out.println("In which season do you prefer to travel?"); + System.out.println("-> Winter"); + System.out.println("-> Autumn"); + System.out.print("Introduce the season: "); + season = scanner.next(); + defineDestination(season.toLowerCase()); + System.exit(0); + } + case 3 -> { + System.out.println("In which season do you prefer to travel?"); + System.out.println("-> Winter"); + System.out.println("-> Autumn"); + System.out.println("-> Spring"); + System.out.print("Introduce the season: "); + season = scanner.next(); + defineDestination(season.toLowerCase()); + System.exit(0); + } + case 4 -> { + System.out.println("In which season do you prefer to travel?"); + System.out.println("-> Winter"); + System.out.println("-> Autumn"); + System.out.println("-> Spring"); + System.out.println("-> Summer"); + System.out.print("Introduce the season: "); + season = scanner.next(); + defineDestination(season.toLowerCase()); + System.exit(0); + } + default -> System.out.println("YOU DID SOMETHING WRONG! TRY AGAIN!"); + } + } + + } + + private static void defineDestination(String season) { + int option = 0; + switch (season) { + case "winter" -> { + System.out.println("1- Do you prefer skiing activities"); + System.out.println("2- or mountain hiking"); + System.out.print("Select your option: "); + option = scanner.nextInt(); + + if (option == 1) { + System.out.println("According to your budget and preferences, your best option is: Andorra"); + } else if (option == 2) { + System.out.println("According to your budget and preferences, your best option is: Switzerland"); + } else { + System.out.println("Wrong option!"); + defineDestination(season); + } + } + case "summer" -> { + System.out.println("1- Do you prefer to do hiking and practice extreme sport activities"); + System.out.println("2- or do activities on the beach?"); + System.out.print("Select your option: "); + option = scanner.nextInt(); + + if (option == 1) { + System.out.println("According to your budget and preferences, your best option is: Spain"); + } else if (option == 2) { + System.out.println("According to your budget and preferences, your best option is: Portugal"); + } else { + System.out.println("Wrong option!"); + defineDestination(season); + } + } + case "spring" -> { + System.out.println("1- Do you prefer to do extreme sport activities"); + System.out.println("2- or do cultural and historical tours?"); + System.out.print("Select your option: "); + option = scanner.nextInt(); + + if (option == 1) { + System.out.println("According to your budget and preferences, your best option is: France"); + } else if (option == 2) { + System.out.println("According to your budget and preferences, your best option is: Italy"); + } else { + System.out.println("Wrong option!"); + defineDestination(season); + } + } + case "autumn" -> { + System.out.println("1- Do you prefer skiing activities"); + System.out.println("2- or cultural and historical activities"); + System.out.print("Select your option: "); + option = scanner.nextInt(); + + if (option == 1) { + System.out.println("According to your budget and preferences, your best option is: Belgium"); + } else if (option == 2) { + System.out.println("According to your budget and preferences, your best option is: Austria"); + } else { + System.out.println("Wrong option!"); + defineDestination(season); + } + } + } + } + + private static int findBucket() { + System.out.println("Welcome to our holidays planning application!"); + System.out.print("How much money are you willing to spend (remember, minimum amount is 100$): "); + int optionBucket = scanner.nextInt(); + + if (optionBucket >= 100 && optionBucket <= 199) { + optionBucket = 1; + } else if (optionBucket >= 199 && optionBucket <= 299) { + optionBucket = 2; + } else if (optionBucket >= 299 && optionBucket <= 399) { + optionBucket = 3; + } else if (optionBucket >= 399) { + optionBucket = 4; + } + + return optionBucket; + } +} + diff --git a/reto3/src/Appointment.java b/reto3/src/Appointment.java new file mode 100644 index 0000000..d059e72 --- /dev/null +++ b/reto3/src/Appointment.java @@ -0,0 +1,49 @@ + +public class Appointment { + private String name; + private String speciality; + private Integer date; + + + public Appointment(String name, String speciality, Integer date) { + this.name = name; + this.speciality = speciality; + this.date = date; + } + + public Appointment() { + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getSpeciality() { + return speciality; + } + + public void setSpeciality(String speciality) { + this.speciality = speciality; + } + + public Integer getdate() { + return date; + } + + public void setdate(Integer date) { + this.date = date; + } + + @Override + public String toString() { + return "Appointment{" + + "name='" + name + '\'' + + ", speciality='" + speciality + '\'' + + ", date=" + date + + '}'; + } +} diff --git a/reto3/src/RetoTres.java b/reto3/src/RetoTres.java new file mode 100644 index 0000000..b44bf4f --- /dev/null +++ b/reto3/src/RetoTres.java @@ -0,0 +1,409 @@ +import java.util.*; + +public class RetoTres { + + private static HashMap generalMedicine = new HashMap<>(); + private static HashMap emergencyCare = new HashMap<>(); + private static HashMap clinicalAnalysis = new HashMap<>(); + private static HashMap cardiology = new HashMap<>(); + private static HashMap neurology = new HashMap<>(); + private static HashMap nutrition = new HashMap<>(); + private static HashMap physiotherapy = new HashMap<>(); + private static HashMap traumatology = new HashMap<>(); + private static HashMap internalMedicine = new HashMap<>(); + private static ArrayList appointmentsArray = new ArrayList<>(); + private static ArrayList appointmentsCompare = new ArrayList<>(); + private static Scanner scanner = new Scanner(System.in).useDelimiter("\n"); + private static Random random = new Random(System.currentTimeMillis()); + + public static void main(String[] args) throws InterruptedException { + + boolean isValid = false; + String savedUsername = "user1"; + String savedPass = "ripeadmin"; + + boolean isLogged = login(savedUsername, savedPass, isValid, scanner); + + String specialtyName; + + if(isLogged) { + while (true) { + specialtyName = mainMenu(); + switch (specialtyName) { + case "general medicine" -> { + initializeGeneralMedicine(); + String name = selectDoctorGM(); + int date = selectHours(); + + if (date <= 0 && date >= 3) break; + + if (date != 3) summary(name, date, specialtyName); + + Thread.sleep(2000); + + } + case "emergency care" -> { + initializeEmergencyCare(); + String name = selectDoctorEC(); + int date = selectHours(); + + if (date <= 0 && date >= 3) break; + + if (date != 3) summary(name, date, specialtyName); + + Thread.sleep(2000); + } + case "clinical analysis" -> { + initializeClinicalAnalysis(); + String name = selectDoctorCA(); + int date = selectHours(); + + if (date <= 0 && date >= 3) break; + + if (date != 3) summary(name, date, specialtyName); + + Thread.sleep(2000); + } + case "cardiology" -> { + initializeCardiology(); + String name = selectDoctorCD(); + int date = selectHours(); + + if (date <= 0 && date >= 3) break; + + if (date != 3) summary(name, date, specialtyName); + + Thread.sleep(2000); + } + case "neurology" -> { + initializeNeurology(); + String name = selectDoctorNE(); + int date = selectHours(); + + if (date <= 0 && date >= 3) break; + + if (date != 3) summary(name, date, specialtyName); + + Thread.sleep(2000); + } + case "nutrition" -> { + initializeNutrition(); + String name = selectDoctorNU(); + int date = selectHours(); + + if (date <= 0 && date >= 3) break; + + if (date != 3) summary(name, date, specialtyName); + + Thread.sleep(2000); + } + case "physiotherapy" -> { + initializePhysiotherapy(); + String name = selectDoctorPH(); + int date = selectHours(); + + if (date <= 0 && date >= 3) break; + + if (date != 3) summary(name, date, specialtyName); + ; + + Thread.sleep(2000); + } + case "traumatology" -> { + initializeTraumatology(); + String name = selectDoctorTR(); + int date = selectHours(); + + if (date <= 0 && date >= 3) break; + + if (date != 3) summary(name, date, specialtyName); + + Thread.sleep(2000); + } + case "internal medicine" -> { + initializeInternalMedicine(); + String name = selectDoctorIM(); + int date = selectHours(); + + if (date <= 0 && date >= 3) break; + + if (date != 3) summary(name, date, specialtyName); + + Thread.sleep(2000); + } + case "exit" -> { + appointmentsArray.forEach(System.out::println); + System.out.println("Have a nice day!"); + System.exit(0); + } + default -> System.out.println("Error, not an specialty, try again"); + } + } + } + } + + static boolean login(String savedUsername, String savedPass, boolean isValid, Scanner scanner) { + int count = 0; + System.out.println("Welcome to your Orange Parcel Service \n" + + "Please sign in"); + + while (count < 3) { + System.out.print("Username: "); + String username = scanner.next(); + System.out.print("Password: "); + String password = scanner.next(); + if (username.equals(savedUsername) && password.equals(savedPass)) { + return isValid = true; + } else { + count = count + 1; + System.out.println("Pass or user is incorrect"); + } + } + + return isValid; + } + + private static void summary(String name, int date, String specialtyName) { + + if(name != null && appointmentsArray.isEmpty()){ + appointmentsArray.add(new Appointment(name, specialtyName, date)); + System.out.println("Appointment Confirmed!"); + } else if (appointmentsArray.size() > 0 && appointmentsArray.size()<=3) { + appointmentsCompare.add(new Appointment(name, specialtyName, date)); + if(isValid()){ + appointmentsCompare.clear(); + System.out.println("There's a duplicate name or Specialty, please check and start over"); + } + else { + appointmentsArray.addAll(appointmentsCompare); + appointmentsCompare.clear(); + System.out.println("Appointment Confirmed!"); + if(appointmentsArray.size()==3){ + System.out.println("You've reached the maximum amount of dates allowed:"); + appointmentsArray.forEach(System.out::println); + System.out.println("This will be emailed to you, have a nice day!"); + System.exit(0); + } + } + } + + if(specialtyName.equals("exit") && (appointmentsArray.isEmpty() || appointmentsArray.size()==1 || appointmentsArray.size() == 2)){ + appointmentsArray.forEach(System.out::println); + System.out.println("This will be emailed to you, have a nice day!"); + } + } + + private static boolean isValid() { + for (int i = 0; i < appointmentsArray.size(); i++) { + for (int j = 0; j < appointmentsCompare.size(); j++) { + if (appointmentsArray.get(i).getName().equals(appointmentsCompare.get(j).getName()) + || appointmentsArray.get(i).getSpeciality().equals(appointmentsCompare.get(j).getSpeciality())){ + return true; + } + } + } + return false; + } + + private static String mainMenu() { + System.out.println("Choose the specialty you want to create an appointment: "); + System.out.println("- General Medicine"); + System.out.println("- Emergency Care"); + System.out.println("- Clinical Analysis"); + System.out.println("- Cardiology"); + System.out.println("- Neurology"); + System.out.println("- Nutrition"); + System.out.println("- Physiotherapy"); + System.out.println("- Traumatology"); + System.out.println("- Internal Medicine"); + System.out.println("- Exit"); + System.out.println("Remember, you can maximum set 3 appoints, one per specialty and is not possible "); + System.out.println("To be attended by the same doctor twice, even if it is in different specialties"); + System.out.print("Type your option: "); + + return scanner.next().toLowerCase(); + } + + private static int selectHours() { + int min = 8; + int max = 12; + int min2 = 13; + int max2 = 20; + int randomNumber = random.nextInt(max + 1 - min) + min; + int randomNumber2 = random.nextInt(max2 + 1 - min2) + min2; + + System.out.println("Select the appointment time you prefer: "); + System.out.println("1. " + randomNumber+"h"); + System.out.println("2. " + randomNumber2+"h"); + System.out.println("3. This options does not work for me, bring me back to main menu"); + System.out.print("Type your option: "); + int option = scanner.nextInt(); + + if(option == 1){ + option = randomNumber; + } else if(option == 2){ + option = randomNumber2; + } + + random.setSeed(System.currentTimeMillis()); + + return option; + } + + private static String selectDoctorIM() { + System.out.println("Select your Doctor!"); + for (int i = 1; i <= internalMedicine.size(); i++) { + System.out.println((i) + " " + internalMedicine.get(i)); + } + System.out.print("Type your option: "); + int option = scanner.nextInt(); + + return internalMedicine.get(option); + } + + private static String selectDoctorTR() { + System.out.println("Select your Doctor!"); + for (int i = 1; i <= traumatology.size(); i++) { + System.out.println((i) + " " + traumatology.get(i)); + } + System.out.print("Type your option: "); + int option = scanner.nextInt(); + + return traumatology.get(option); + } + + private static String selectDoctorPH() { + System.out.println("Select your Doctor!"); + for (int i = 1; i <= physiotherapy.size(); i++) { + System.out.println((i) + " " + physiotherapy.get(i)); + } + System.out.print("Type your option: "); + int option = scanner.nextInt(); + + return physiotherapy.get(option); + } + + private static String selectDoctorNU() { + System.out.println("Select your Doctor!"); + for (int i = 1; i <= nutrition.size(); i++) { + System.out.println((i) + " " + nutrition.get(i)); + } + System.out.print("Type your option: "); + int option = scanner.nextInt(); + + return nutrition.get(option); + } + + private static String selectDoctorNE() { + System.out.println("Select your Doctor!"); + for (int i = 1; i <= neurology.size(); i++) { + System.out.println((i) + " " + neurology.get(i)); + } + System.out.print("Type your option: "); + int option = scanner.nextInt(); + + return neurology.get(option); + } + + private static String selectDoctorCD() { + System.out.println("Select your Doctor!"); + for (int i = 1; i <= cardiology.size(); i++) { + System.out.println((i) + " " + cardiology.get(i)); + } + System.out.print("Type your option: "); + int option = scanner.nextInt(); + + return cardiology.get(option); + } + + private static String selectDoctorCA() { + System.out.println("Select your Doctor!"); + for (int i = 1; i <= clinicalAnalysis.size(); i++) { + System.out.println((i) + " " + clinicalAnalysis.get(i)); + } + System.out.print("Type your option: "); + int option = scanner.nextInt(); + + return clinicalAnalysis.get(option); + } + + + + private static String selectDoctorEC() { + System.out.println("Select your Doctor!"); + for (int i = 1; i <= emergencyCare.size(); i++) { + System.out.println((i) + " " + emergencyCare.get(i)); + } + System.out.print("Type your option: "); + int option = scanner.nextInt(); + + return emergencyCare.get(option); + } + + private static String selectDoctorGM() { + System.out.println("Select your Doctor!"); + for (int i = 1; i <= generalMedicine.size(); i++) { + System.out.println((i) + " " + generalMedicine.get(i)); + } + System.out.print("Type your option: "); + int option = scanner.nextInt(); + + return generalMedicine.get(option); + } + + private static void initializeInternalMedicine() { + internalMedicine.put(1, "Torres"); + internalMedicine.put(2, "Neville"); + internalMedicine.put(3, "Potter"); + } + + private static void initializeTraumatology() { + traumatology.put(1, "Venture"); + traumatology.put(2, "Kelsier"); + traumatology.put(3, "Vin"); + } + + private static void initializePhysiotherapy() { + physiotherapy.put(1, "Potter"); + physiotherapy.put(2, "Weasley"); + physiotherapy.put(3, "Malfoy"); + } + + private static void initializeNutrition() { + nutrition.put(1, "Neville"); + nutrition.put(2, "Baroch"); + nutrition.put(3, "Torres"); + } + + private static void initializeNeurology() { + neurology.put(1, "Ryal"); + neurology.put(2, "Baroch"); + neurology.put(3, "Kenen"); + } + + private static void initializeCardiology() { + cardiology.put(1, "Ryal"); + cardiology.put(2, "Lorenzo"); + cardiology.put(3, "Holmes"); + } + + private static void initializeClinicalAnalysis() { + clinicalAnalysis.put(1, "Ryal"); + clinicalAnalysis.put(2, "Matisse"); + clinicalAnalysis.put(3, "Holmes"); + } + + private static void initializeEmergencyCare() { + emergencyCare.put(1, "Kennen"); + emergencyCare.put(2, "Gonzalez"); + emergencyCare.put(3, "Smith"); + } + + private static void initializeGeneralMedicine() { + generalMedicine.put(1, "Miller"); + generalMedicine.put(2, "Gonzalez"); + generalMedicine.put(3, "Smith"); + } +} + +