MAKS_Enjoyer

I will kermit skewer slide

Sep 20th, 2022 (edited)
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 102.52 KB | Source Code | 0 0
  1. import java.io.*;
  2. import java.time.*;
  3. import java.util.*;
  4. import java.nio.file.*;
  5. import org.apache.poi.xwpf.usermodel.*;
  6. import java.time.format.DateTimeFormatter;
  7.  
  8. public class i_will_shoot_yourself {
  9.     public static void main(String[] args) throws IOException {
  10.         File org = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles");
  11.         org.mkdir();
  12.         // -------------------------------------
  13.         File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/ofb_rex.docx");
  14.         if (!(new File(String.valueOf(pathn1)).exists())) {
  15.             XWPFDocument docx1 = new XWPFDocument();
  16.             XWPFParagraph par1 = docx1.createParagraph();
  17.             par1.setAlignment(ParagraphAlignment.CENTER);
  18.             XWPFRun run1 = par1.createRun();
  19.             run1.setText("Rocket Engine Generator");
  20.             run1.setFontFamily("Arial");
  21.             run1.setBold(true);
  22.             run1.setFontSize(33);
  23.             run1.setTextPosition(60);
  24.             // -----------------------------------------------------------------------------
  25.             XWPFParagraph par2 = docx1.createParagraph();
  26.             par2.setAlignment(ParagraphAlignment.RIGHT);
  27.             XWPFRun run2 = par2.createRun();
  28.             LocalDateTime date = LocalDateTime.now();
  29.             DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd MMM yyyy, HH:mm:ss");
  30.             String dt = date.format(formatter);
  31.             run2.setText("Created on: " + dt);
  32.             run2.setFontFamily("Arial");
  33.             run2.setBold(true);
  34.             run2.setFontSize(10);
  35.             run2.setTextPosition(75);
  36.             // ----------------------------------------------------------------------------------------------------
  37.             try (FileOutputStream out1 = new FileOutputStream(String.valueOf(pathn1))) {
  38.                 docx1.write(out1);
  39.                 out1.close();
  40.                 docx1.close();
  41.             }
  42.         }
  43.         System.out.println("Welcome to the Advanced Rocket Engine Generator!" + '\n');
  44.         Scanner scanner = new Scanner(System.in);
  45.         String repeatCommand = "";
  46.         while (!repeatCommand.equals("N")) {
  47.             System.out.println("Do you want to generate a new engine? [Y/N]");
  48.             System.out.print("> ");
  49.             repeatCommand = scanner.next();
  50.             Path onlyfans = Path.of(String.valueOf(pathn1));
  51.             if (repeatCommand.equalsIgnoreCase("N") || repeatCommand.equalsIgnoreCase("NO")) {
  52.                 System.out.println("App exit was successful");
  53.                 System.exit(0);
  54.             } else if (repeatCommand.equalsIgnoreCase("Y") || repeatCommand.equalsIgnoreCase("YES")) {
  55.                 double sizeInbytes = pathn1.length();
  56.                 double sizeInKilobytes = (sizeInbytes / 1024);
  57.                 if (sizeInKilobytes >= 25) {
  58.                     File logM = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/Data");
  59.                     logM.mkdir();
  60.                     // -------------------------------------------------------------------------------------------------
  61.                     if ((new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/Data/ofb_rex[Full].docx")).exists()) {
  62.                         int i;
  63.                         int x = 2;
  64.                         for (i = 1; i < x; i++) {
  65.                             if ((new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/Data/ofb_rex[Full]" + i + ".docx")).exists()) {
  66.                                 x++;
  67.                             } else {
  68.                                 Files.copy(onlyfans, Paths.get("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/Data/ofb_rex[Full]" + i + ".docx"));
  69.                             }
  70.                         }
  71.                     } else {
  72.                         Path logPF = Paths.get("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/Data/ofb_rex[Full].docx");
  73.                         Files.copy(onlyfans, logPF);
  74.                     }
  75.                     XWPFDocument docx1 = new XWPFDocument();
  76.                     XWPFParagraph par1 = docx1.createParagraph();
  77.                     par1.setAlignment(ParagraphAlignment.CENTER);
  78.                     XWPFRun run1 = par1.createRun();
  79.                     run1.setText("Rocket Engine Generator");
  80.                     run1.setFontFamily("Arial");
  81.                     run1.setBold(true);
  82.                     run1.setFontSize(33);
  83.                     run1.setTextPosition(60);
  84.                     // -----------------------------------------------------------------------------
  85.                     XWPFParagraph par2 = docx1.createParagraph();
  86.                     par2.setAlignment(ParagraphAlignment.RIGHT);
  87.                     XWPFRun run2 = par2.createRun();
  88.                     LocalDateTime date = LocalDateTime.now();
  89.                     DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd MMM yyyy, HH:mm:ss");
  90.                     String dt = date.format(formatter);
  91.                     run2.setText("Created on: " + dt);
  92.                     run2.setFontFamily("Arial");
  93.                     run2.setBold(true);
  94.                     run2.setFontSize(10);
  95.                     run2.setTextPosition(60);
  96.                     // ----------------------------------------------------------------------------------------------------
  97.                     FileOutputStream out1 = new FileOutputStream(String.valueOf(pathn1));
  98.                     docx1.write(out1);
  99.                     out1.close();
  100.                     docx1.close();
  101.                 }
  102.  
  103.                 String[] engine_Name1 = {"\"Argosy\"", "\"Galileo\"", "\"Callisto\"", "\"Nauka\"", "\"Insider\"", "\"Granis\"",
  104.                         "\"Rassvet\"", "\"Zvezda\"", "\"Zarya\"", "\"Orion\"", "\"Ares\"", "\"Delta\"", "\"Atlas\"", "\"Dreadnought\"",
  105.                         "\"Daedalus\"", "\"Baltia\"", "\"Dizhou\"", "\"Hermes\"", "\"Icarus\"", "\"Connestoga\"", "\"Yupiter\"",
  106.                         "\"Emphasis\"", "\"Olympus\"", "\"Kronos\"", "\"Helios\"", "\"Alabaster\"", "\"Falcon\"", "\"Saturn\"",
  107.                         "\"Eagle\"", "\"Endeavour\"", "\"Atlantis\"", "\"Cygnus\"", "\"Apollo\"", "\"Horizon\"", "\"Bulava\"",
  108.                         "\"Pioneer\"", "\"Voyager\"", "\"Exploration\"", "\"Expedition\"", "\"Vulcan\"", "\"Vysota\"",
  109.                         "\"Federation\"", "\"Sojourner\"", "\"Nautilus\"", "\"Jubilance\"", "\"Lagrange\"",  "\"Volna\"",
  110.                         "\"Prometheus\"", "\"Tellus\"", "\"Alpha\"", "\"Delta\"", "\"Proton\"", "\"Neutron\"", "\"Topol\"",
  111.                         "\"Electron\"", "\"Pluton\"", "\"Poodle\"", "\"Skipper\"", "\"Convair\"", "\"Nexus\"", "\"Oko\"",
  112.                         "\"Vector\"", "\"Terrier\"", "\"Rhino\"", "\"Panther\"", "\"Goliath\"", "\"Juno\"", "\"Shrimp\"",
  113.                         "\"Thumper\"", "\"Mainsail\"", "\"Dart\"", "\"Twitch\"", "\"Stratus\"", "\"Oscar\"", "\"Kosmos\"",
  114.                         "\"Sentinel\"", "\"Pegasus\"", "\"Kelus\"", "\"Starshot\"", "\"Vernor\"", "\"Mammoth\"", "\"Liberty\"",
  115.                         "\"Douglas\"", "\"Heimdall\"", "\"Dynetics\"", "\"Pathfinder\"", "\"Horizon\"", "\"Poisk\"",
  116.                         "\"Pirs\"", "\"Philae\"", "\"Mariner\"", "\"Centaur\"", "\"Orel\"", "\"Pratt\"", "\"Hyperion\"",
  117.                         "\"Sagittarius\"", "\"Apollo\"", "\"Bryton\"", "\"Volga\"", "\"Harmony\"", "\"Cassini\"", "\"Contour\"",
  118.                         "\"Altair\"", "\"Dream\"", "\"Baikal\"", "\"Zenith\"", "\"Urpinod\"", "\"Bernal\"", "\"Condor\"",
  119.                         "\"Athena\"", "\"Astra\"", "\"Aerolus\"", "\"Rombus\"", "\"Lunokhod\"", "\"Fregat\"", "\"Glonass\"",
  120.                         "\"Dragon\"", "\"Salyut\"", "\"Starliner\"", "\"Skylab\"", "\"Briz\"", "\"Colombus\"", "\"Rosetta\"",
  121.                         "\"Redstone\"", "\"Antares\"", "\"Philae\"", "\"Prospero\"", "\"Leonardo\"", "\"Parker\"", "\"Dyson\"",
  122.                         "\"Oberon\"", "\"DragonFly\"", "\"Energia\"", "\"Buran\"", "\"Urgan\"", "\"Angara\"", "\"Vostok\"",
  123.                         "\"Voskhod\"", "\"Shenzhou\"", "\"Ingenuity\"", "\"Oberon\"", "\"Discovery\"", "\"Horizon\"", "\"Visionalis\"",
  124.                         "\"Cerasus\"", "\"Progress\"", "\"Unity\"", "\"Surveyor\"", "\"Prospector\"", "\"Ikar\"", "\"Redstone\"",
  125.                         "\"Lapis\"", "\"Caesius\"", "\"Iridium\"", "\"Daedlus\"", "\"Aelita\"", "\"Beta\"", "\"Gamma\"",
  126.                         "\"Alpha\"", "\"Epsilon\"", "\"Omega\"", "\"Discoverer\"", "\"Explorer\"", "\"Hornet\"", "\"Serenity\"",
  127.                         "\"Ariane\"", "\"Hornet\"", "\"Asimov\"", "\"Pegasus\"", "\"Venture\"", "\"Antares\"", "\"Star\"",
  128.                         "\"Archimedes\"", "\"Hera\"", "\"Iris\"", "\"Titan\"", "\"Artemis\"", "\"Phoenix\"", "\"Ross\"",
  129.                         "\"Sarychev\"", "\"Nemesis\"", "\"Heimdall\"", "\"Sturt\"", "\"Odin\"", "\"Aethelred\"", "\"Vesper\"",
  130.                         "\"Aces\"", "\"Argon\"", "\"Olympia\"", "\"Perseus\"", "\"Chyron\"", "\"Proxima\"", "\"Arminus\"",
  131.                         "\"Destiny\"", "\"Valient\"", "\"FireFly\"", "\"Obsidian\"", "\"Leviathan\"", "\"Magellan\"", "\"Voyager\"",
  132.                         "\"Mariner\"", "\"Joist\"", "\"Crimson\"", "\"Fortune\"", "\"Vanguard\"", "\"Aurora\"", "\"Ulysses\"",
  133.                         "\"Crusader\"", "\"Python\"", "\"Kuiper\"", "\"Insurgent\"", "\"Pathfinder\"", "\"Kvant\"", "\"Spektr\"",
  134.                         "\"Cassini\"", "\"Zemlya\"", "\"Dawn\"", "\"Kepler\"", "\"Parom\"", "\"Elektron\"", "\"Aeonian\"",
  135.                         "\"Node\"", "\"Burya\"", "\"Voyager\"", "\"Ceres\"", "\"Bayern\"", "\"Chasovoy\"", "\"Copernicus\"",
  136.                         "\"Quaoar\"", "\"Minotaur\"", "\"Agena\"", "\"Thor\"", "\"Vega\"", "\"Scout\"", "\"Coeus\"", "\"Minerva\"",
  137.                         "\"Kratos\"", "\"Neith\"", "\"Omoikane\"", "\"Gayamun\"", "\"Odin\"", "\"Kronos\"", "\"Hope\"", "\"Polet\"",
  138.                         "\"Polyot\"", "\"Sputnik\"", "\"Clementine\"", "\"Sojourner\"", "\"Ingenuity\"", "\"Perseverence\"",
  139.                         "\"Onatchesko\"", "\"Atlantis\"", "\"Tsyklon\"", "\"Zenit\"", "\"Almaz\"", "\"Soyuz\"", "\"Molniya\"",
  140.                         "\"Oreol\"", "\"Yantar\"", "\"Foton\"", "\"Meteor\"", "\"Ekran\"", "\"Strela\"", "\"Bion\"", "\"Piroda\"",
  141.                         "\"Salyut\"", "\"Strela\"", "\"Luch\"", "\"Potok\"", "\"Prognoz\"", "\"Orlets\"", "\"Etalon\"", "\"Astron\"",
  142.                         "\"Efir\"", "\"Kometa\"", "\"Fram\"", "\"Zemlya\"", "\"Gorizont\"", "\"Arkon\"", "\"Gamma\"", "\"Ekspress\"",
  143.                         "\"Gonets\"", "\"Taifun\"", "\"Okean\"", "\"Reflektor\"", "\"Kolibr\"", "\"Sever\"", "\"Comet\"",
  144.                         "\"Roton\"", "\"Solaris\"", "\"Altaris\"", "\"Ithacus\"", "\"Dekto\"", "\"Dream\"", "\"Impuls\"",
  145.                         "\"Vremya\"", "\"Portal\"", "\"Zodiak\"", "\"Slava\"", "\"Inertsiya\"", "\"Stimuls\"", "\"Ambross\"",
  146.                         "\"Amal\"", "\"Thea\"", "\"Orphelia\"", "\"Polyot\"", "\"Mudrost\"", "\"Carrack\"", "\"Artak\"",
  147.                         "\"Questar\"", "\"Artyom\"", "\"Tsyclon\"", "\"Ascension\"", "\"Tenacity\"", "\"Contour\"", "\"Zephyr\"",
  148.                         "\"Atlanta\"", "\"Polaris\"", "\"Aeolus\"", "\"Mayak\"", "\"Pamir\"", "\"Taimyr\"", "\"Cheget\"", "\"Sirius\"",
  149.                         "\"Uragan\"", "\"Agat\"", "\"Skiph\"", "\"Kristall\"", "\"Altair\"", "\"Uran\"", "\"Ingul\"", "\"Carat\"",
  150.                         "\"Pulsar\"", "\"Titan\"", "\"Eridanus\"", "\"Parus\"", "\"Cepheus\"", "\"Varagian\"", "\"Olympus\"",
  151.                         "\"Tarkhaniy\"", "\"Astraeus\"", "\"Antares\"", "\"Kazbek\"", "\"Burlak\"", "\"Borei\"", "\"Favor\"",
  152.                         "\"Rubin\"", "\"Almaz\"", "\"Granit\"", "\"Ruby\"", "\"Sokol\"", "\"Argon\"", "\"Kavkaz\"", "\"Ural\"",
  153.                         "\"Berkut\"", "\"Dunay\"", "\"Yastreb\"", "\"Terek\"", "\"Radon\"", "\"Taymyr\"", "\"Pamir\"", "\"Photon\"",
  154.                         "\"Elbrus\"", "\"Isayiev\"", "\"Shmel\"", "\"Kobra\"", "\"Shturn\"", "\"Metis\"", "\"Malyutka\"", "\"Fleyta\"",
  155.                         "\"Konkurs\"", "\"Bastion\"", "\"Svir\"", "\"Ataka\"", "\"Vodopad\"", "\"Veter\"", "\"Vyuga\"", "\"Vulga\"",
  156.                         "\"Tochka\"", "\"Oka\"", "\"Dvina\"", "\"Almaz\"", "\"Araks\"", "\"Kanopus\"", "\"Kliper\"", "\"Kobalt\"",
  157.                         "\"Siluet\"", "\"Kondor\"", "\"Lotos\"", "\"Luch\"", "\"Mir\"", "\"Neman\"", "\"Obzor\"", "\"Okean\"",
  158.                         "\"Oktan\"", "\"Orlets\"", "\"Poisk\"", "\"Potok\"", "\"Pirs\"", "\"Prognoz\"", "\"Resurs\"", "\"Rodnik\"",
  159.                         "\"Romb\"", "\"Kapustin\"", "\"Oplot\"", "\"Tsygan\"", "\"Teplokhod\"", "\"Sokosha\"", "\"Rubezh\"",
  160.                         "\"Zircon\"", "\"Moskva\"", "\"Tryol\"", "\"Ustinov\"", "\"Belyayev\"", "\"Novorod\"", "\"Argos\"",
  161.                         "\"Nerthus\"", "\"Janus\"", "\"Hephaestus\"", "\"Themis\"", "\"Chronos\"", "\"Tethys\"", "\"Minos\"",
  162.                         "\"Autumn\"", "\"Resilience\"", "\"Aelita\"", "\"Rheus\"", "\"Solntspek\"", "\"Spitzer\"", "\"Cartago\"",
  163.                         "\"Melibea\"", "\"Spartacus\"", "\"Pulsar\"", "\"Fusion\"", "\"Reliant\"", "\"Thunder\"", "\"Novo\"",
  164.                         "\"Panthera\"", "\"Nematoda\"", "\"Anelida\"", "\"Chordata\"", "\"Tetrapoda\"", "\"Cyclero\"", "\"Carrier\"",
  165.                         "\"Gaia\"", "\"Irtysh\"", "\"Wyvern\"", "\"Tarsier\"", "\"Alpina\"", "\"Espadon\"", "\"Parlos\"", "\"Nebula\"",
  166.                         "\"Lazarus\"", "\"Rufus\"", "\"Dornier\"", "\"Argus\"", "\"Kybau\"", "\"Kalau\"", "\"Chasvoy\"", "\"Zephyr\"",
  167.                         "\"Temny\"", "\"Gorizont\"", "\"Yars\"", "\"Krugazor\"", "\"Soprotivlenye\"", "\"Shtil\"", "\"Layner\""};
  168.  
  169.                 String[] engine_Cycle = {"Gas Generator", "Staged Combustion (Oxidizer Rich)", "Staged Combustion (Fuel Rich)",
  170.                         "Expander (Open/Bleed)", "Expander (Closed)", "Dual Expander (Open/Bleed)", "Dual Expander (Closed)",
  171.                         "Pressure-Fed", "Full Flow Staged", "Electric Pump Fed", "Combustion Tap Off", "Monopropellant (Cold Gas)",
  172.                         "Monopropellant (Decomposition)", "Gas Core", "Liquid Core", "Solid Core", "Pulsed Nuclear", "Pebble-Bed Core",
  173.                         "Nuclear SaltWater", "MagnetoPlasmaDynamic Thruster", "Hall Effect Thruster", "Gridded Ion Thruster",
  174.                         "Colloid Thruster", "Variable Specific Impulse Magnetoplasma Rocket (VASIMR)"};
  175.  
  176.                 String[] propellant_List1 = {"H2O2 (Hydrogen Peroxide)", "N2H4 (Hydrazine)", "NH2OH+NO3 (Hydroxylammonium nitrate)",
  177.                         "LMP-103S: 65% Ammonium Dinitramide (NH4N(NO2)2) + 35% Methanol"};
  178.  
  179.                 String[] propellant_List2 = {"Nitrogen (N2)", "Helium (He)", "Carbon Dioxide (CO2)", "Ammonia (NH3)", "Hydrogen (H2)",
  180.                         "Methane (CH4)"};
  181.  
  182.                 String[] propellant_List3 = {"Hydrogen (H2)", "Helium (He)", "Nitrogen (N2)", "Hydrogen (H)", "Ammonia (NH3)",
  183.                         "Water (H2O)", "Oxygen (O2)", "Carbon Dioxide (CO2)", "Carbon Monoxide (CO)", "Methane (CH4)"};
  184.  
  185.                 String[] altitude_Of_Operation = {"0-10 km (Sea Level)", "20-30 km (Medium Atmosphere)", "30-80 km (High Atmosphere)",
  186.                         "80 km+ (Vacuum)", "Any Altitude (0-80 km+)"};
  187.  
  188.                 String[] tank_Repressurisation = {"Autogenously", "using Inert gas (Nitrogen)"};
  189.  
  190.                 String[] nozzle_Type_List1 = {"De Laval Cone (Without Nozzle Extension)", "De Laval Bell (Without Nozzle Extension)"};
  191.  
  192.                 String[] firstPart = {"RD", "RS", "AJ", "XLR", "NK", "RL", "KDTU", "AR", "BE", "MV", "YF", "PKA", "J",
  193.                         "MJ", "XS", "LM10", "HM", "LE", "LRE", "CE", "DST", "DOK", "KDU", "KRD", "R", "RO", "LMS", "LMP",
  194.                         "F", "E", "A", "B", "S.10", "R", "JDK", "SPP", "TYS", "SOK", "RES", "FWR"};
  195.  
  196.                 String engine_Name = ass_crack(engine_Name1, firstPart);
  197.                 Collections.shuffle(Arrays.asList(engine_Cycle));
  198.                 Random engineCycleChosen = new Random();
  199.                 int engineTypeChosen_index = engineCycleChosen.nextInt(engine_Cycle.length);
  200.                 String engine_Cycle_Chosen = engine_Cycle[engineTypeChosen_index];
  201.  
  202.                 switch (engine_Cycle_Chosen) {
  203.                     case "Gas Core", "Liquid Core", "Solid Core", "Pulsed Nuclear", "Nuclear SaltWater", "Pebble-Bed Core" -> {
  204.                         String propellant_List_Chosen, nuclear_Cycle_Chosen, reactor_Fuel_Chosen, nozzle_Type_List_Chosen;
  205.                         switch (engine_Cycle_Chosen) {
  206.                             case "Gas Core" -> {
  207.                                 String[] remass_List = {"Hydrogen (H2)", "Nitrogen (N2)", "Monoatomic Hydrogen (H)", "Ammonia (NH3)",
  208.                                         "Water (H2O)", "Oxygen (O2)", "Carbon Dioxide (CO2)", "Carbon Monoxide (CO)",
  209.                                         "Methane (CH4)"};
  210.                                 Collections.shuffle(Arrays.asList(remass_List));
  211.                                 Random remassChosen = new Random();
  212.                                 int remassChosen_index = remassChosen.nextInt(remass_List.length);
  213.                                 String remass_List_Chosen = remass_List[remassChosen_index];
  214.                                 propellant_List_Chosen = "Uranium HexaFluoride Salt (UF6) and " + remass_List_Chosen + " as remass";
  215.                                 // Nuclear Cycle (Nuclear Thermal)
  216.                                 String[] nuclear_cycle1 = {"\"Expander Bleed\"", "\"Expander Closed\"", "\"Nuclear Lightbulb\"", "\"Vortex Confined\"",
  217.                                         "\"Wheel Flow\"", "\"Magnetohydrodynamic(MHD) vortex\"", "\"Expander Open\""};
  218.                                 Collections.shuffle(Arrays.asList(nuclear_cycle1));
  219.                                 Random nuclearCycleChosen = new Random();
  220.                                 int nuclearCycleChosen_index = nuclearCycleChosen.nextInt(nuclear_cycle1.length);
  221.                                 nuclear_Cycle_Chosen = nuclear_cycle1[nuclearCycleChosen_index];
  222.                                 // Reactor Fuel (Nuclear Thermal)
  223.                                 String[] reactor_fuel = {"100-90% Uranium-235", "50% Uranium-235", "25-8% Uranium-235", "1-2% Uranium-235"};
  224.                                 Collections.shuffle(Arrays.asList(reactor_fuel));
  225.                                 Random reactorfuelChosen = new Random();
  226.                                 int reactorfuelChosen_index = reactorfuelChosen.nextInt(reactor_fuel.length);
  227.                                 reactor_Fuel_Chosen = reactor_fuel[reactorfuelChosen_index];
  228.                                 // Nozzle Type (Nuclear Thermal)
  229.                                 nozzle_Type_List_Chosen = "De Laval Bell (With Nozzle Extension)";
  230.                             } case "Liquid Core", "Colloid-Core", "Pebble-Bed Core" -> {
  231.                                 // Remass (Nuclear Thermal)
  232.                                 String[] remass_List2 = {"Hydrogen (H2)", "Nitrogen (N2)", "Monoatomic Hydrogen (H)", "Ammonia (NH3)",
  233.                                         "Water (H2O)", "Oxygen (O2)", "Carbon Dioxide (CO2)", "Carbon Monoxide (CO)",
  234.                                         "Methane (CH4)", "Hydrogen (H2) + Hexane (C6H14)"};
  235.                                 Collections.shuffle(Arrays.asList(remass_List2));
  236.                                 Random remassChosen = new Random();
  237.                                 int remassChosen_index = remassChosen.nextInt(remass_List2.length);
  238.                                 String remass_List_Chosen = remass_List2[remassChosen_index];
  239.                                 propellant_List_Chosen = "Uranium HexaFluoride Salt (UF6) and " + remass_List_Chosen + " as a remass";
  240.                                 // Nuclear Cycle (Nuclear Thermal)
  241.                                 String[] nuclear_cycle1 = {"\"Expander Bleed\"", "\"Expander Closed\"", "\"Vortex Confined\"", "\"Expander Open\""};
  242.                                 Collections.shuffle(Arrays.asList(nuclear_cycle1));
  243.                                 Random nuclearCycleChosen = new Random();
  244.                                 int nuclearCycleChosen_index = nuclearCycleChosen.nextInt(nuclear_cycle1.length);
  245.                                 nuclear_Cycle_Chosen = nuclear_cycle1[nuclearCycleChosen_index];
  246.                                 // Reactor Fuel (Nuclear Thermal)
  247.                                 String[] reactor_fuel = {"100-90% Uranium-235", "50% Uranium-235", "25-8% Uranium-235", "1-2% Uranium-235"};
  248.                                 Collections.shuffle(Arrays.asList(reactor_fuel));
  249.                                 Random reactorfuelChosen = new Random();
  250.                                 int reactorfuelChosen_index = reactorfuelChosen.nextInt(reactor_fuel.length);
  251.                                 reactor_Fuel_Chosen = reactor_fuel[reactorfuelChosen_index];
  252.                                 // Nozzle Type (Nuclear Thermal)
  253.                                 nozzle_Type_List_Chosen = "De Laval Bell (With Nozzle Extension)";
  254.                             } case "Nuclear SaltWater" -> {
  255.                                 propellant_List_Chosen = "Uranium TetraBromide (UBr4) + Water (H2O)";
  256.                                 nuclear_Cycle_Chosen = "";
  257.                                 // Reactor Fuel (Nuclear Thermal)
  258.                                 String[] reactor_fuel = {"100-90% Uranium-235", "50% Uranium-235", "25-8% Uranium-235", "1-2% Uranium-235"};
  259.                                 Collections.shuffle(Arrays.asList(reactor_fuel));
  260.                                 Random reactorfuelChosen = new Random();
  261.                                 int reactorfuelChosen_index = reactorfuelChosen.nextInt(reactor_fuel.length);
  262.                                 reactor_Fuel_Chosen = reactor_fuel[reactorfuelChosen_index];
  263.                                 // Nozzle Type (Nuclear Thermal)
  264.                                 nozzle_Type_List_Chosen = "De Laval Bell (With Nozzle Extension)";
  265.                             } default -> {
  266.                                 // Propellant (Nuclear Thermal)
  267.                                 Collections.shuffle(Arrays.asList(propellant_List3));
  268.                                 Random propellantChosen = new Random();
  269.                                 int propellantChosen_index = propellantChosen.nextInt(propellant_List3.length);
  270.                                 propellant_List_Chosen = propellant_List3[propellantChosen_index];
  271.                                 // Nuclear Cycle (Nuclear Thermal)
  272.                                 String[] nuclear_cycle1 = {"\"Expander Bleed\"", "\"Expander Closed\"", "\"Expander Open\""};
  273.                                 Collections.shuffle(Arrays.asList(nuclear_cycle1));
  274.                                 Random nuclearCycleChosen = new Random();
  275.                                 int nuclearCycleChosen_index = nuclearCycleChosen.nextInt(nuclear_cycle1.length);
  276.                                 nuclear_Cycle_Chosen = nuclear_cycle1[nuclearCycleChosen_index];
  277.                                 // Reactor Fuel (Nuclear Thermal)
  278.                                 String[] reactor_fuel = {"100-90% Uranium-235", "50% Uranium-235", "20-8% Uranium-235", "1-2% Uranium-235",
  279.                                         "100-90% Plutonium-238", "50% Plutonium-238", "25-8% Plutonium-238", "1-2% Plutonium-238"};
  280.                                 Collections.shuffle(Arrays.asList(reactor_fuel));
  281.                                 Random reactorfuelChosen = new Random();
  282.                                 int reactorfuelChosen_index = reactorfuelChosen.nextInt(reactor_fuel.length);
  283.                                 reactor_Fuel_Chosen = reactor_fuel[reactorfuelChosen_index];
  284.                                 // Nozzle Type (Nuclear Thermal)
  285.                                 nozzle_Type_List_Chosen = "De Laval Bell (With Nozzle Extension)";
  286.                             }
  287.                         }
  288.                         // Altitude of Operation (Nuclear Thermal)
  289.                         String altitude_Of_Operation_Chosen = "80 km+ (Vacuum)";
  290.                         // Tank Repressurisation (Nuclear Thermal)
  291.                         Collections.shuffle(Arrays.asList(tank_Repressurisation));
  292.                         Random tankRepressurisationChosen = new Random();
  293.                         int tankRepressurisationChosen_index = tankRepressurisationChosen.nextInt(tank_Repressurisation.length);
  294.                         String tank_Repressurisation_Chosen = tank_Repressurisation[tankRepressurisationChosen_index];
  295.                         // Cooling Mechanism (Nuclear Thermal)
  296.                         String[] cooling_mechanism = {"Radiative Cooling", "Dump Cooling", "Film Cooling",
  297.                                 "Regenerative Cooling", "Transpiration Cooling"};
  298.                         Collections.shuffle(Arrays.asList(cooling_mechanism));
  299.                         Random coolingMechanismChosen = new Random();
  300.                         int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
  301.                         String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
  302.  
  303.                         // Beautiful Part (Nuclear Thermal)
  304.                         output_nt(engine_Name, engine_Cycle_Chosen, altitude_Of_Operation_Chosen, nuclear_Cycle_Chosen,
  305.                                 propellant_List_Chosen, reactor_Fuel_Chosen, nozzle_Type_List_Chosen,
  306.                                 tank_Repressurisation_Chosen, cooling_Mechanism_Chosen);
  307.  
  308.                     }
  309.  
  310.                     case "MagnetoPlasmaDynamic Thruster", "Hall Effect Thruster", "Gridded Ion Thruster",
  311.                             "Colloid Thruster", "Variable Specific Impulse Magnetoplasma Rocket (VASIMR)" -> {
  312.                         String propellant_List_Chosen = null;
  313.                         String nozzle_Type_List_Chosen = null;
  314.                         switch (engine_Cycle_Chosen) {
  315.                             case "Hall Effect Thruster" -> {
  316.                                 String[] propellant_List = {"Xenon", "Krypton", "Argon", "Bismuth", "Iodine",
  317.                                         "Magnesium", "Zinc", "Adamantane"};
  318.                                 Collections.shuffle(Arrays.asList(propellant_List));
  319.                                 Random propellantChosen = new Random();
  320.                                 int propellantChosen_index = propellantChosen.nextInt(propellant_List.length);
  321.                                 propellant_List_Chosen = propellant_List[propellantChosen_index];
  322.                                 // Nozzle Type (Nuclear Thermal)
  323.                                 nozzle_Type_List_Chosen = "Hall Effect Thruster Nozzle";
  324.                             } case "Gridded Ion Thruster" -> {
  325.                                 String[] propellant_List = {"Xenon", "Mercury", "Caesium"};
  326.                                 Collections.shuffle(Arrays.asList(propellant_List));
  327.                                 Random propellantChosen = new Random();
  328.                                 int propellantChosen_index = propellantChosen.nextInt(propellant_List.length);
  329.                                 propellant_List_Chosen = propellant_List[propellantChosen_index];
  330.                                 // Nozzle Type (Nuclear Thermal)
  331.                                 nozzle_Type_List_Chosen = "Electrostatic Ion Nozzle";
  332.                             } case "Colloid Thruster" -> {
  333.                                 propellant_List_Chosen = "NH2OH+NO3 (Hydroxylammonium nitrate)";
  334.                                 // Nozzle Type (Nuclear Thermal)
  335.                                 nozzle_Type_List_Chosen = "Capillary Emitter-Electrode Cone";
  336.                             } case "Variable Specific Impulse Magnetoplasma Rocket (VASIMR)" -> {
  337.                                 String[] propellant_List = {"Xenon", "Krypton", "Argon"};
  338.                                 Collections.shuffle(Arrays.asList(propellant_List));
  339.                                 Random propellantChosen = new Random();
  340.                                 int propellantChosen_index = propellantChosen.nextInt(propellant_List.length);
  341.                                 propellant_List_Chosen = propellant_List[propellantChosen_index];
  342.                                 // Nozzle Type (Nuclear Thermal)
  343.                                 nozzle_Type_List_Chosen = "VASIMR Magnetic Confinement Nozzle";
  344.                             } case "MagnetoPlasmaDynamic Thruster" -> {
  345.                                 String[] propellant_List = {"Xenon", "Neon", "Argon", "Hydrogen", "Hydrazine", "Lithium"};
  346.                                 Collections.shuffle(Arrays.asList(propellant_List));
  347.                                 Random propellantChosen = new Random();
  348.                                 int propellantChosen_index = propellantChosen.nextInt(propellant_List.length);
  349.                                 propellant_List_Chosen = propellant_List[propellantChosen_index];
  350.                                 // Nozzle Type (Nuclear Thermal)
  351.                                 nozzle_Type_List_Chosen = "Cathode Plug Magnetic Confinement Nozzle";
  352.                             }
  353.                         }
  354.                         // Altitude of Operation (Electric Propulsion)
  355.                         String altitude_Of_Operation_Chosen = "80 km+ (Vacuum)";
  356.                         // Cooling Mechanism (Electric Propulsion)
  357.                         String[] cooling_mechanism = {"Radiative Cooling", "Dump Cooling", "Film Cooling",
  358.                                 "Regenerative Cooling", "Transpiration Cooling"};
  359.                         Collections.shuffle(Arrays.asList(cooling_mechanism));
  360.                         Random coolingMechanismChosen = new Random();
  361.                         int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
  362.                         String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
  363.  
  364.                         // Beautiful Part (Electric Propulsion)
  365.                         output_et(engine_Name, engine_Cycle_Chosen, altitude_Of_Operation_Chosen,
  366.                                 propellant_List_Chosen, nozzle_Type_List_Chosen, cooling_Mechanism_Chosen);
  367.                     }
  368.  
  369.                     case "Monopropellant (Decomposition)" -> {
  370.                         // Propellant (Decomposing Monopropellant)
  371.                         Collections.shuffle(Arrays.asList(propellant_List1));
  372.                         Random propellantChosen = new Random();
  373.                         int propellantChosen_index = propellantChosen.nextInt(propellant_List1.length);
  374.                         String propellant_List_Chosen = propellant_List1[propellantChosen_index];
  375.                         // Altitude of Operation (Decomposing Monopropellant)
  376.                         String altitude_Of_Operation_Chosen = "80 km+ (Vacuum)";
  377.                         // Nozzle Type (Decomposing Monopropellant)
  378.                         Collections.shuffle(Arrays.asList(nozzle_Type_List1));
  379.                         Random nozzle_chosen = new Random();
  380.                         int nozzleChosen_index = nozzle_chosen.nextInt(nozzle_Type_List1.length);
  381.                         String nozzle_Type_List_Chosen = nozzle_Type_List1[nozzleChosen_index];
  382.                         // Cooling Mechanism (Decomposing Monopropellant)
  383.                         String[] cooling_mechanism = {"Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling"};
  384.                         Collections.shuffle(Arrays.asList(cooling_mechanism));
  385.                         Random coolingMechanismChosen = new Random();
  386.                         int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
  387.                         String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
  388.                         // Catalyst Choice (Decomposing Monopropellant)
  389.                         String catalyst_Chosen = null;
  390.                         switch (propellant_List_Chosen) {
  391.                             case "N2H4 (Hydrazine)", "LMP-103S: 65% Ammonium Dinitramide (NH4N(NO2)2) + 35% Methanol" -> {
  392.                                 catalyst_Chosen = "Aerojet S-405: Iridium coated Alumina Pellets";
  393.                             } case "H2O2 (Hydrogen Peroxide)" -> {
  394.                                 catalyst_Chosen = "KMNO4 (Potassium Permanganate) Honeycomb";
  395.                             } case "NH2OH+NO3 (Hydroxylammonium nitrate)" -> {
  396.                                 catalyst_Chosen = "Iridium coated Copper Pellets";
  397.                             }
  398.                         }
  399.                         // Beautiful Part (Least ugly)
  400.                         output_monod(engine_Name, engine_Cycle_Chosen, altitude_Of_Operation_Chosen,
  401.                                 propellant_List_Chosen, nozzle_Type_List_Chosen, cooling_Mechanism_Chosen, catalyst_Chosen);
  402.  
  403.                     } case "Monopropellant (Cold Gas)" -> {
  404.                         Collections.shuffle(Arrays.asList(propellant_List2));
  405.                         Random propellantChosen = new Random();
  406.                         int propellantChosen_index = propellantChosen.nextInt(propellant_List2.length);
  407.                         String propellant_List_Chosen = propellant_List2[propellantChosen_index];
  408.                         // Altitude of Operation (Cold Gas Monopropellant)
  409.                         String altitude_Of_Operation_Chosen = "80 km+ (Vacuum)";
  410.                         // Nozzle Type (Cold Gas Monopropellant)
  411.                         Collections.shuffle(Arrays.asList(nozzle_Type_List1));
  412.                         Random nozzle_chosen = new Random();
  413.                         int nozzleChosen_index = nozzle_chosen.nextInt(nozzle_Type_List1.length);
  414.                         String nozzle_Type_List_Chosen = nozzle_Type_List1[nozzleChosen_index];
  415.                         // Cooling Mechanism (Decomposing Monopropellant)
  416.                         String[] cooling_mechanism = {"Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling"};
  417.                         Collections.shuffle(Arrays.asList(cooling_mechanism));
  418.                         Random coolingMechanismChosen = new Random();
  419.                         int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
  420.                         String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
  421.  
  422.                         // Beautiful Part (Least ugly)
  423.                         output_mono(engine_Name, engine_Cycle_Chosen, altitude_Of_Operation_Chosen,
  424.                             propellant_List_Chosen, nozzle_Type_List_Chosen, cooling_Mechanism_Chosen);
  425.  
  426.                     }
  427.  
  428.                     case "Expander (Closed)", "Expander (Open/Bleed)" -> {
  429.                         String[] oxidizer_List2 = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)",
  430.                                 "O3 (Ozone)"};
  431.                         Collections.shuffle(Arrays.asList(oxidizer_List2));
  432.                         Random oxidizerChosen = new Random();
  433.                         int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List2.length);
  434.                         String oxidizer_Chosen = oxidizer_List2[oxidizerChosen_index];
  435.                         String fuel_Chosen = "";
  436.                         switch (oxidizer_Chosen) {
  437.                             case "O2 (Oxygen)" -> {
  438.                                 String[] fuel_List20 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  439.                                         "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  440.                                         "CH3OH (Methanol)", "C12H24 (Kerosene)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
  441.                                 Collections.shuffle(Arrays.asList(fuel_List20));
  442.                                 Random fuelChosen = new Random();
  443.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List20.length);
  444.                                 fuel_Chosen = fuel_List20[fuelChosen_index];
  445.                             } case "F2 (Fluorine)" -> {
  446.                                 String[] fuel_List1 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  447.                                         "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "C2H8N2 (UnsymetricalDimethylHydrazine)",
  448.                                         "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)", "CH3OH (Methanol)", "C12H24 (Kerosene)",
  449.                                         "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
  450.                                 Collections.shuffle(Arrays.asList(fuel_List1));
  451.                                 Random fuelChosen = new Random();
  452.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List1.length);
  453.                                 fuel_Chosen = fuel_List1[fuelChosen_index];
  454.                             } case "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)" -> {
  455.                                 String[] fuel_List2 = {"H2 (Hydrogen)", "N2H4 (Hydrazine)", "CH3OH (Methanol)",
  456.                                         "C12H24 (Kerosene)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
  457.                                 Collections.shuffle(Arrays.asList(fuel_List2));
  458.                                 Random fuelChosen = new Random();
  459.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List2.length);
  460.                                 fuel_Chosen = fuel_List2[fuelChosen_index];
  461.                             }
  462.                         }
  463.  
  464.                         Collections.shuffle(Arrays.asList(altitude_Of_Operation));
  465.                         Random altitudeOfOperationChosen = new Random();
  466.                         int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
  467.                         String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
  468.  
  469.                         String nozzle_Type_Chosen = bussy(altitude_Of_Operation_Chosen);
  470.  
  471.                         String[] cooling_mechanism = {"Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling",
  472.                                 "Regenerative Cooling", "Transpiration Cooling"};
  473.                         Collections.shuffle(Arrays.asList(cooling_mechanism));
  474.                         Random coolingMechanismChosen = new Random();
  475.                         int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
  476.                         String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
  477.  
  478.                         // Beautiful Part (Least ugly)
  479.                         boolean isGimballable = false;
  480.                         int gimbalangle = (int) (Math.random() * 15);
  481.                         if (gimbalangle >= 1) {
  482.                             isGimballable = true;
  483.                         }
  484.                         String message_from_the_stars;
  485.                         if (!isGimballable) {
  486.                             message_from_the_stars = "The engine is not gimballable";
  487.                         } else {
  488.                             message_from_the_stars = "The engine is gimballable by " + gimbalangle + " degrees";
  489.                         }
  490.                         boolean isHypergolic = isHypergolic(oxidizer_Chosen, fuel_Chosen);
  491.                         output_ex(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen, altitude_Of_Operation_Chosen,
  492.                                 nozzle_Type_Chosen,"Autogenously", cooling_Mechanism_Chosen, isHypergolic, message_from_the_stars);
  493.                        
  494.                     }
  495.  
  496.                     case "Dual Expander (Closed)", "Dual Expander (Open/Bleed)" -> {
  497.                         String[] oxidizer_List3 = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)"};
  498.                         Collections.shuffle(Arrays.asList(oxidizer_List3));
  499.                         Random oxidizerChosen = new Random();
  500.                         int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List3.length);
  501.                         String oxidizer_Chosen = oxidizer_List3[oxidizerChosen_index];
  502.  
  503.                         String fuel_Chosen = "";
  504.                         String[] fuel_List3 = {"H2 (Hydrogen)", "CH4 (Methane)"};
  505.                         switch (oxidizer_Chosen) {
  506.                             case "O2 (Oxygen)", "F2 (Fluorine)" -> {
  507.                                 Collections.shuffle(Arrays.asList(fuel_List3));
  508.                                 Random fuelChosen = new Random();
  509.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List3.length);
  510.                                 fuel_Chosen = fuel_List3[fuelChosen_index];
  511.                             } case "F2 (Fluorine) + O2 (Oxygen)" -> fuel_Chosen = "H2 (Hydrogen)";
  512.                         }
  513.  
  514.                         Collections.shuffle(Arrays.asList(altitude_Of_Operation));
  515.                         Random altitudeOfOperationChosen = new Random();
  516.                         int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
  517.                         String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
  518.  
  519.                         String nozzle_Type_Chosen = bussy(altitude_Of_Operation_Chosen);
  520.  
  521.                         String[] cooling_mechanism = {"Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling",
  522.                                 "Regenerative Cooling", "Transpiration Cooling"};
  523.                         Collections.shuffle(Arrays.asList(cooling_mechanism));
  524.                         Random coolingMechanismChosen = new Random();
  525.                         int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
  526.                         String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
  527.  
  528.                         // Beautiful Part (Least ugly)
  529.                         boolean isGimballable = false;
  530.                         int gimbalangle = (int) (Math.random() * 15);
  531.                         if (gimbalangle >= 1) {
  532.                             isGimballable = true;
  533.                         }
  534.                         String message_from_the_stars;
  535.                         if (!isGimballable) {
  536.                             message_from_the_stars = "The engine is not gimballable";
  537.                         } else {
  538.                             message_from_the_stars = "The engine is gimballable by " + gimbalangle + " degrees";
  539.                         }
  540.                         boolean isHypergolic = isHypergolic(oxidizer_Chosen, fuel_Chosen);
  541.                         output_ex(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen, altitude_Of_Operation_Chosen,
  542.                                 nozzle_Type_Chosen,"Autogenously", cooling_Mechanism_Chosen, isHypergolic, message_from_the_stars);
  543.                     }
  544.  
  545.                     case "Staged Combustion (Fuel Rich)" -> {
  546.                         String[] oxidizer_List4 = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)"};
  547.                         Collections.shuffle(Arrays.asList(oxidizer_List4));
  548.                         Random oxidizerChosen = new Random();
  549.                         int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List4.length);
  550.                         String oxidizer_Chosen = oxidizer_List4[oxidizerChosen_index];
  551.  
  552.                         String fuel_Chosen = "";
  553.                         switch (oxidizer_Chosen) {
  554.                             case "O2 (Oxygen)", "F2 (Fluorine)" -> {
  555.                                 String[] fuel_List4 = {"H2 (Hydrogen)", "NH3 (Ammonia)", "N2H4 (Hydrazine)"};
  556.                                 Collections.shuffle(Arrays.asList(fuel_List4));
  557.                                 Random fuelChosen = new Random();
  558.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List4.length);
  559.                                 fuel_Chosen = fuel_List4[fuelChosen_index];
  560.                             } case "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)" -> {
  561.                                 String[] fuel_List6 = {"H2 (Hydrogen)"};
  562.                                 Collections.shuffle(Arrays.asList(fuel_List6));
  563.                                 Random fuelChosen = new Random();
  564.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List6.length);
  565.                                 fuel_Chosen = fuel_List6[fuelChosen_index];
  566.                             }
  567.                         }
  568.                         Collections.shuffle(Arrays.asList(tank_Repressurisation));
  569.                         Random tankRepressurisationChosen = new Random();
  570.                         int tankRepressurisationChosen_index = tankRepressurisationChosen.nextInt(tank_Repressurisation.length);
  571.                         String tank_Repressurisation_Chosen = tank_Repressurisation[tankRepressurisationChosen_index];
  572.  
  573.                         Collections.shuffle(Arrays.asList(altitude_Of_Operation));
  574.                         Random altitudeOfOperationChosen = new Random();
  575.                         int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
  576.                         String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
  577.  
  578.                         String nozzle_Type_Chosen = bussy(altitude_Of_Operation_Chosen);
  579.  
  580.                         String[] cooling_mechanism = {"Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling",
  581.                                 "Regenerative Cooling", "Transpiration Cooling"};
  582.                         Collections.shuffle(Arrays.asList(cooling_mechanism));
  583.                         Random coolingMechanismChosen = new Random();
  584.                         int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
  585.                         String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
  586.  
  587.                         // Beautiful Part (Least ugly)
  588.                         boolean isGimballable = false;
  589.                         int gimbalangle = (int) (Math.random() * 15);
  590.                         if (gimbalangle >= 1) {
  591.                             isGimballable = true;
  592.                         }
  593.                         String message_from_the_stars;
  594.                         if (!isGimballable) {
  595.                             message_from_the_stars = "The engine is not gimballable";
  596.                         } else {
  597.                             message_from_the_stars = "The engine is gimballable by " + gimbalangle + " degrees";
  598.                         }
  599.                         // Beautiful Part (Least ugly)
  600.                         boolean isHypergolic = isHypergolic(oxidizer_Chosen, fuel_Chosen);
  601.                         output_def(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen, altitude_Of_Operation_Chosen,
  602.                                 nozzle_Type_Chosen, tank_Repressurisation_Chosen, cooling_Mechanism_Chosen, isHypergolic,
  603.                                 message_from_the_stars);
  604.                     }
  605.  
  606.                     case "Staged Combustion (Oxidizer Rich)" -> {
  607.                         String[] oxidizer_List4 = {"O2 (Oxygen)", "O3 (Ozone)", "N2O4 (Nitrogen Tetroxide)"};
  608.                         Collections.shuffle(Arrays.asList(oxidizer_List4));
  609.                         Random oxidizerChosen = new Random();
  610.                         int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List4.length);
  611.                         String oxidizer_Chosen = oxidizer_List4[oxidizerChosen_index];
  612.  
  613.                         String fuel_Chosen = "";
  614.                         switch (oxidizer_Chosen) {
  615.                             case "O2 (Oxygen)", "O3 (Ozone)" -> {
  616.                                 String[] fuel_List4 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  617.                                         "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  618.                                         "CH3OH (Methanol)"};
  619.                                 Collections.shuffle(Arrays.asList(fuel_List4));
  620.                                 Random fuelChosen = new Random();
  621.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List4.length);
  622.                                 fuel_Chosen = fuel_List4[fuelChosen_index];
  623.                             } case "N2O4 (Nitrogen Tetroxide)" -> {
  624.                                 String[] fuel_List7 = {"C6H5NH2 (Aniline)", "75% CH6N2 + 25% N2H4 (UH-25)", "50% CH6N2 + 50% N2H4 (Aerosine-50)",
  625.                                         "C2H8N2 (UnsymetricalDimethylHydrazine)"};
  626.                                 Collections.shuffle(Arrays.asList(fuel_List7));
  627.                                 Random fuelChosen = new Random();
  628.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List7.length);
  629.                                 fuel_Chosen = fuel_List7[fuelChosen_index];
  630.                             }
  631.                         }
  632.                         Collections.shuffle(Arrays.asList(tank_Repressurisation));
  633.                         Random tankRepressurisationChosen = new Random();
  634.                         int tankRepressurisationChosen_index = tankRepressurisationChosen.nextInt(tank_Repressurisation.length);
  635.                         String tank_Repressurisation_Chosen = tank_Repressurisation[tankRepressurisationChosen_index];
  636.  
  637.                         Collections.shuffle(Arrays.asList(altitude_Of_Operation));
  638.                         Random altitudeOfOperationChosen = new Random();
  639.                         int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
  640.                         String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
  641.  
  642.                         String nozzle_Type_Chosen = bussy(altitude_Of_Operation_Chosen);
  643.  
  644.                         String[] cooling_mechanism = {"Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling",
  645.                                 "Regenerative Cooling", "Transpiration Cooling"};
  646.                         Collections.shuffle(Arrays.asList(cooling_mechanism));
  647.                         Random coolingMechanismChosen = new Random();
  648.                         int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
  649.                         String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
  650.  
  651.                         // Beautiful Part (Least ugly)
  652.                         boolean isGimballable = false;
  653.                         int gimbalangle = (int) (Math.random() * 15);
  654.                         if (gimbalangle >= 1) {
  655.                             isGimballable = true;
  656.                         }
  657.                         String message_from_the_stars;
  658.                         if (!isGimballable) {
  659.                             message_from_the_stars = "The engine is not gimballable";
  660.                         } else {
  661.                             message_from_the_stars = "The engine is gimballable by " + gimbalangle + " degrees";
  662.                         }
  663.                         // Beautiful Part (Least ugly)
  664.                         boolean isHypergolic = isHypergolic(oxidizer_Chosen, fuel_Chosen);
  665.                         output_def(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen, altitude_Of_Operation_Chosen,
  666.                                 nozzle_Type_Chosen, tank_Repressurisation_Chosen, cooling_Mechanism_Chosen, isHypergolic,
  667.                                 message_from_the_stars);
  668.                     }
  669.  
  670.                     case "Full Flow Staged Combustion", "Combustion Tap Off" -> {
  671.                         String[] oxidizer_List4 = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)",
  672.                                 "N2H4 (Hydrazine)", "O3 (Ozone)", "N2O4 (Nitrogen Tetroxide)"};
  673.                         Collections.shuffle(Arrays.asList(oxidizer_List4));
  674.                         Random oxidizerChosen = new Random();
  675.                         int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List4.length);
  676.                         String oxidizer_Chosen = oxidizer_List4[oxidizerChosen_index];
  677.  
  678.                         String fuel_Chosen = "";
  679.                         switch (oxidizer_Chosen) {
  680.                             case "O2 (Oxygen)" -> {
  681.                                 String[] fuel_List4 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  682.                                         "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  683.                                         "CH3OH (Methanol)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
  684.                                 Collections.shuffle(Arrays.asList(fuel_List4));
  685.                                 Random fuelChosen = new Random();
  686.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List4.length);
  687.                                 fuel_Chosen = fuel_List4[fuelChosen_index];
  688.                             } case "F2 (Fluorine)" -> {
  689.                                 String[] fuel_List5 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  690.                                         "NH3 (Ammonia)", "C2H8N2 (UnsymetricalDimethylHydrazine)", "CH6N2 (MonomethylHydrazine)",
  691.                                         "N2H4 (Hydrazine)", "CH3OH (Methanol)"};
  692.                                 Collections.shuffle(Arrays.asList(fuel_List5));
  693.                                 Random fuelChosen = new Random();
  694.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List5.length);
  695.                                 fuel_Chosen = fuel_List5[fuelChosen_index];
  696.                             } case "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)" -> {
  697.                                 String[] fuel_List6 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  698.                                         "C6H5NH2 (Aniline)", "75% CH6N2 + 25% N2H4 (UH-25)", "50% CH6N2 + 50% N2H4 (Aerosine-50)",
  699.                                         "CH6N2 (MonomethylHydrazine)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
  700.                                 Collections.shuffle(Arrays.asList(fuel_List6));
  701.                                 Random fuelChosen = new Random();
  702.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List6.length);
  703.                                 fuel_Chosen = fuel_List6[fuelChosen_index];
  704.                             } case "N2H4 (Hydrazine)", "N2O4 (Nitrogen Tetroxide)" -> {
  705.                                 String[] fuel_List7 = {"H2 (Hydrogen)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  706.                                         "C6H5NH2 (Aniline)", "75% CH6N2 + 25% N2H4 (UH-25)", "50% CH6N2 + 50% N2H4 (Aerosine-50)",
  707.                                         "C2H8N2 (UnsymetricalDimethylHydrazine)", "CH3OH (Methanol)", "B2H6 (Diborane)"};
  708.                                 Collections.shuffle(Arrays.asList(fuel_List7));
  709.                                 Random fuelChosen = new Random();
  710.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List7.length);
  711.                                 fuel_Chosen = fuel_List7[fuelChosen_index];
  712.                             }
  713.                         }
  714.                         Collections.shuffle(Arrays.asList(tank_Repressurisation));
  715.                         Random tankRepressurisationChosen = new Random();
  716.                         int tankRepressurisationChosen_index = tankRepressurisationChosen.nextInt(tank_Repressurisation.length);
  717.                         String tank_Repressurisation_Chosen = tank_Repressurisation[tankRepressurisationChosen_index];
  718.  
  719.                         Collections.shuffle(Arrays.asList(altitude_Of_Operation));
  720.                         Random altitudeOfOperationChosen = new Random();
  721.                         int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
  722.                         String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
  723.  
  724.                         String nozzle_Type_Chosen = bussy(altitude_Of_Operation_Chosen);
  725.  
  726.                         String[] cooling_mechanism = {"Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling",
  727.                                 "Regenerative Cooling", "Transpiration Cooling"};
  728.                         Collections.shuffle(Arrays.asList(cooling_mechanism));
  729.                         Random coolingMechanismChosen = new Random();
  730.                         int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
  731.                         String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
  732.  
  733.                         // Beautiful Part (Least ugly)
  734.                         boolean isGimballable = false;
  735.                         int gimbalangle = (int) (Math.random() * 15);
  736.                         if (gimbalangle >= 1) {
  737.                             isGimballable = true;
  738.                         }
  739.                         String message_from_the_stars;
  740.                         if (!isGimballable) {
  741.                             message_from_the_stars = "The engine is not gimballable";
  742.                         } else {
  743.                             message_from_the_stars = "The engine is gimballable by " + gimbalangle + " degrees";
  744.                         }
  745.                         // Beautiful Part (Least ugly)
  746.                         boolean isHypergolic = isHypergolic(oxidizer_Chosen, fuel_Chosen);
  747.                         output_def(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen, altitude_Of_Operation_Chosen,
  748.                                 nozzle_Type_Chosen, tank_Repressurisation_Chosen, cooling_Mechanism_Chosen, isHypergolic,
  749.                                 message_from_the_stars);
  750.                     }
  751.  
  752.                     default -> {
  753.                         String[] oxidizer_List6 = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)",
  754.                                 "N2O4 (Nitrogen Tetroxide)", "H2O2 (Hydrogen Peroxide) 95%",
  755.                                 "H2O2 (Hydrogen Peroxide) 85%", "O3 (Ozone)", "AK20F: 80% HNO3 + 20% N2O4 (Nitric Acid)",
  756.                                 "AK20I: 80% HNO3 + 20% N2O4 (Nitric Acid)", "AK20K: 80% HNO3 + 20% N2O4 (Nitric Acid)",
  757.                                 "AK27I: 73% HNO3 + 27% N2O4 (Nitric Acid)", "AK27P: 73% HNO3 + 27% N2O4 (Nitric Acid)",
  758.                                 "ClF3 (Chlorine Trifluoride)", "ClF5 (Chlorine Pentafluoride)"};
  759.                         Collections.shuffle(Arrays.asList(oxidizer_List6));
  760.                         Random oxidizerChosen = new Random();
  761.                         int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List6.length);
  762.                         String oxidizer_Chosen = oxidizer_List6[oxidizerChosen_index];
  763.  
  764.                         String fuel_Chosen = "";
  765.                         switch (oxidizer_Chosen) {
  766.                             case "O2 (Oxygen)" -> {
  767.                                 String[] fuel_List8 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  768.                                         "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "CH6N2 (MonomethylHydrazine)",
  769.                                         "N2H4 (Hydrazine)", "CH3OH (Methanol)", "C12H24 (Kerosene)", "B2H6 (Diborane)", "B5H9 (Pentaborane)",
  770.                                         "C2H6 (Ethane)"};
  771.                                 Collections.shuffle(Arrays.asList(fuel_List8));
  772.                                 Random fuelChosen = new Random();
  773.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List8.length);
  774.                                 fuel_Chosen = fuel_List8[fuelChosen_index];
  775.                             } case "F2 (Fluorine)" -> {
  776.                                 String[] fuel_List9 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  777.                                         "C6H5NH2 (Aniline)", "NH3 (Ammonia)",
  778.                                         "C2H8N2 (UnsymetricalDimethylHydrazine)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  779.                                         "CH3OH (Methanol)", "C12H24 (Kerosene)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
  780.                                 Collections.shuffle(Arrays.asList(fuel_List9));
  781.                                 Random fuelChosen = new Random();
  782.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List9.length);
  783.                                 fuel_Chosen = fuel_List9[fuelChosen_index];
  784.                             } case "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)" -> {
  785.                                 String[] fuel_List10 = {"H2 (Hydrogen)", "CH3OH (Methanol)", "C12H24 (Kerosene)", "B2H6 (Diborane)",
  786.                                         "B5H9 (Pentaborane)"};
  787.                                 Collections.shuffle(Arrays.asList(fuel_List10));
  788.                                 Random fuelChosen = new Random();
  789.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List10.length);
  790.                                 fuel_Chosen = fuel_List10[fuelChosen_index];
  791.                             } case "AK20F: 80% HNO3 + 20% N2O4 (Nitric Acid)", "AK20I: 80% HNO3 + 20% N2O4 (Nitric Acid)",
  792.                                     "AK20K: 80% HNO3 + 20% N2O4 (Nitric Acid)", "AK27I: 73% HNO3 + 27% N2O4 (Nitric Acid)",
  793.                                     "AK27P: 73% HNO3 + 27% N2O4 (Nitric Acid)", "ClF3 (Chlorine Trifluoride)",
  794.                                     "ClF5 (Chlorine Pentafluoride)" -> {
  795.                                 String[] fuel_List11 = {"C2H5OH(Ethanol) 85%", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  796.                                         "CH3OH (Methanol)"};
  797.                                 Collections.shuffle(Arrays.asList(fuel_List11));
  798.                                 Random fuelChosen = new Random();
  799.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List11.length);
  800.                                 fuel_Chosen = fuel_List11[fuelChosen_index];
  801.                             } case "N2O4 (Nitrogen Tetroxide)", "H2O2 (Hydrogen Peroxide) 95%", "H2O2 (Hydrogen Peroxide) 85%" -> {
  802.                                 String[] fuel_List12 = {"H2 (Hydrogen)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  803.                                         "C6H5NH2 (Aniline)", "75% CH6N2 + 25% N2H4 (UH-25)", "50% CH6N2 + 50% N2H4 (Aerosine-50)",
  804.                                         "C2H8N2 (UnsymmetricalDimethylHydrazine)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  805.                                         "CH3OH (Methanol)", "C12H24 (Kerosene)"};
  806.                                 Collections.shuffle(Arrays.asList(fuel_List12));
  807.                                 Random fuelChosen = new Random();
  808.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List12.length);
  809.                                 fuel_Chosen = fuel_List12[fuelChosen_index];
  810.                             }
  811.                         }
  812.  
  813.                         Collections.shuffle(Arrays.asList(tank_Repressurisation));
  814.                         Random tankRepressurisationChosen = new Random();
  815.                         int tankRepressurisationChosen_index = tankRepressurisationChosen.nextInt(tank_Repressurisation.length);
  816.                         String tank_Repressurisation_Chosen = tank_Repressurisation[tankRepressurisationChosen_index];
  817.  
  818.                         Collections.shuffle(Arrays.asList(altitude_Of_Operation));
  819.                         Random altitudeOfOperationChosen = new Random();
  820.                         int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
  821.                         String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
  822.  
  823.                         String nozzle_Type_Chosen = bussy(altitude_Of_Operation_Chosen);
  824.  
  825.                         String[] cooling_mechanism = {"Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling",
  826.                                 "Regenerative Cooling", "Transpiration Cooling"};
  827.                         Collections.shuffle(Arrays.asList(cooling_mechanism));
  828.                         Random coolingMechanismChosen = new Random();
  829.                         int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
  830.                         String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
  831.  
  832.                         // Beautiful Part (Least ugly)
  833.                         boolean isGimballable = false;
  834.                         int gimbalangle = (int) (Math.random() * 15);
  835.                         if (gimbalangle >= 1) {
  836.                             isGimballable = true;
  837.                         }
  838.                         String message_from_the_stars;
  839.                         if (!isGimballable) {
  840.                             message_from_the_stars = "The engine is not gimballable";
  841.                         } else {
  842.                             message_from_the_stars = "The engine is gimballable by " + gimbalangle + " degrees";
  843.                         }
  844.                         // Beautiful Part (Least ugly)
  845.                         boolean isHypergolic = isHypergolic(oxidizer_Chosen, fuel_Chosen);
  846.                         output_def(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen, altitude_Of_Operation_Chosen,
  847.                                 nozzle_Type_Chosen, tank_Repressurisation_Chosen, cooling_Mechanism_Chosen, isHypergolic,
  848.                                 message_from_the_stars);
  849.                     }
  850.                 }
  851.             } else {
  852.                 while (!(repeatCommand.equalsIgnoreCase("Y") && repeatCommand.equalsIgnoreCase("N"))) {
  853.                     System.out.println("Wrong input! Please input an appropriate command [Y/N] ot [YES/NO]");
  854.                     System.out.print("> ");
  855.                     repeatCommand = scanner.next();
  856.                     if (repeatCommand.equalsIgnoreCase("Y") || repeatCommand.equalsIgnoreCase("N") || repeatCommand.equalsIgnoreCase("YES") || repeatCommand.equalsIgnoreCase("NO")) {
  857.                         break;
  858.                     }
  859.                 }
  860.             }
  861.         }
  862.     }
  863.     public static String bussy (String altitude_Of_Operation_Chosen) {
  864.         String nozzle_Type_Chosen = null;
  865.         switch (altitude_Of_Operation_Chosen) {
  866.             case "0-10 km (Sea Level)" -> {
  867.                 String[] nozzle_Type_List_SL = {"De Laval Cone (Without Nozzle Extension)",
  868.                         "De Laval Bell (Without Nozzle Extension)"};
  869.                 Collections.shuffle(Arrays.asList(nozzle_Type_List_SL));
  870.                 Random nozzleTypeSLspikeChosen = new Random();
  871.                 int nozzleTypeSLspikeChosen_index = nozzleTypeSLspikeChosen.nextInt(nozzle_Type_List_SL.length);
  872.                 nozzle_Type_Chosen = nozzle_Type_List_SL[nozzleTypeSLspikeChosen_index];
  873.             } case "20-30 km (Medium Atmosphere)" -> {
  874.                 String[] nozzle_Type_List_HA = {"De Laval Bell (Without Nozzle Extension)", "De Laval Cone (With Nozzle Extension)",
  875.                         "De Laval Bell (With Nozzle Extension)", "Dual Bell Nozzle"};
  876.                 Collections.shuffle(Arrays.asList(nozzle_Type_List_HA));
  877.                 Random nozzleTypeHAspikeChosen = new Random();
  878.                 int nozzleTypeHAspikeChosen_index = nozzleTypeHAspikeChosen.nextInt(nozzle_Type_List_HA.length);
  879.                 nozzle_Type_Chosen = nozzle_Type_List_HA[nozzleTypeHAspikeChosen_index];
  880.             } case "30-80 km (High Atmosphere)" -> {
  881.                 String[] nozzle_Type_List_HAi = {"De Laval Cone (With Nozzle Extension)", "De Laval Bell (With Nozzle Extension)",
  882.                         "Dual Bell Nozzle"};
  883.                 Collections.shuffle(Arrays.asList(nozzle_Type_List_HAi));
  884.                 Random nozzleTypeHAispikeChosen = new Random();
  885.                 int nozzleTypeHAispikeChosen_index = nozzleTypeHAispikeChosen.nextInt(nozzle_Type_List_HAi.length);
  886.                 nozzle_Type_Chosen = nozzle_Type_List_HAi[nozzleTypeHAispikeChosen_index];
  887.             } case "80 km+ (Vacuum)" -> {
  888.                 String[] nozzle_Type_List_VA = {"De Laval Cone (With Nozzle Extension)",
  889.                         "De Laval Bell (With Nozzle Extension)", "Expanding Nozzle"};
  890.                 Collections.shuffle(Arrays.asList(nozzle_Type_List_VA));
  891.                 Random nozzleTypeVAspikeChosen = new Random();
  892.                 int nozzleTypeVAspikeChosen_index = nozzleTypeVAspikeChosen.nextInt(nozzle_Type_List_VA.length);
  893.                 nozzle_Type_Chosen = nozzle_Type_List_VA[nozzleTypeVAspikeChosen_index];
  894.             } case "Any Altitude (0-80 km+)" -> {
  895.                 String[] nozzle_Type_List_Aero = {"Linear Aerospike Nozzle", "Toroidal Aerospike Nozzle", "Expansion-Deflection Nozzle"};
  896.                 Collections.shuffle(Arrays.asList(nozzle_Type_List_Aero));
  897.                 Random nozzleTypeAerospikeChosen = new Random();
  898.                 int nozzleTypeAerospikeChosen_index = nozzleTypeAerospikeChosen.nextInt(nozzle_Type_List_Aero.length);
  899.                 nozzle_Type_Chosen = nozzle_Type_List_Aero[nozzleTypeAerospikeChosen_index];
  900.             }
  901.         }
  902.         return nozzle_Type_Chosen;
  903.     }
  904.     public static String ass_crack(String[] engine_Name1, String[] firstPart) {
  905.         String engine_Name;
  906.         Collections.shuffle(Arrays.asList(engine_Name1));
  907.         Collections.shuffle(Arrays.asList(firstPart));
  908.         Random engineNameChosen = new Random();
  909.         Random firstPartC = new Random();
  910.         int engineNameChosen_index = engineNameChosen.nextInt(engine_Name1.length);
  911.         int firstPart_index = firstPartC.nextInt(firstPart.length);
  912.         String engNameFinalf = " " + engine_Name1[engineNameChosen_index];
  913.         String firstPart_f = firstPart[firstPart_index] + "-";
  914.         int finalNumber = 12 + ((int) (Math.random() * 999));
  915.         if (finalNumber % 8 == 0) {
  916.             engine_Name = firstPart_f + finalNumber + engNameFinalf;
  917.         } else {
  918.             char randomizedCharacter;
  919.             int uio93 = 1 + ((int) (Math.random() * 999));
  920.             int uio94 = 1 + ((int) (Math.random() * 11));
  921.             Random randomLetter = new Random();
  922.             if (uio93 % uio94 == 0) {
  923.                 randomizedCharacter = (char) (randomLetter.nextInt(26) + 'a');
  924.                 while (randomizedCharacter != 'l' || randomizedCharacter == 'o' || randomizedCharacter == 'i' || randomizedCharacter == 'q' || randomizedCharacter == 'e' || randomizedCharacter == 'h' || randomizedCharacter == 'g' || randomizedCharacter == 'c' || randomizedCharacter == 'j') {
  925.                     randomizedCharacter = (char) (randomLetter.nextInt(26) + 'a');
  926.                     if (randomizedCharacter != 'l' && randomizedCharacter != 'o' && randomizedCharacter != 'i' && randomizedCharacter != 'q' && randomizedCharacter != 'e' && randomizedCharacter != 'h' && randomizedCharacter != 'g' && randomizedCharacter != 'c' && randomizedCharacter != 'j') {
  927.                         break;
  928.                     }
  929.                 }
  930.             } else {
  931.                 randomizedCharacter = (char) (randomLetter.nextInt(26) + 'A');
  932.                 while (randomizedCharacter == 'O' || randomizedCharacter == 'I' || randomizedCharacter == 'Q') {
  933.                     randomizedCharacter = (char) (randomLetter.nextInt(26) + 'A');
  934.                     if (randomizedCharacter == 'O' || randomizedCharacter == 'I' || randomizedCharacter == 'Q') {
  935.                         break;
  936.                     }
  937.                 }
  938.             }
  939.             engine_Name = firstPart_f + finalNumber + randomizedCharacter + engNameFinalf;
  940.         }
  941.         return engine_Name;
  942.     }
  943.     public static void output_monod(String ENN, String ECC, String AOOC, String PLC, String NTLC, String CMC, String CCC) throws IOException {
  944.         String lbrk = "========================================================================================";
  945.         File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/ofb_rex.docx");
  946.         System.out.println(lbrk + "\n" + "Your Engine is called: " + ENN + "\n");
  947.         System.out.println("Your Engine Cycle is: " + ECC);
  948.         System.out.println("Your Propellant is: " + PLC);
  949.         System.out.println("Your Altitude of operation is: " + AOOC);
  950.         System.out.println("Your engine's nozzle type should be : " + NTLC);
  951.         System.out.println("The Cooling Mechanism to be used would be " + CMC);
  952.         System.out.println("Your engine's catalyst is : " + CCC + '\n');
  953.         XWPFDocument docx = new XWPFDocument();
  954.         if (new File(String.valueOf(pathn1)).exists()) {
  955.             FileInputStream jesus = new FileInputStream(String.valueOf(pathn1));
  956.             docx = new XWPFDocument(jesus);
  957.         }
  958.         XWPFParagraph par = docx.createParagraph();
  959.         XWPFRun run = par.createRun();
  960.         run.setFontSize(12);
  961.         run.setBold(true);
  962.         run.setFontFamily("Arial");
  963.         run.setText("Your Engine is called: ");
  964.         run.setTextPosition(15);
  965.         XWPFRun run2 = par.createRun();
  966.         run2.setFontSize(12);
  967.         run.setBold(true);
  968.         run2.setFontFamily("Arial");
  969.         run2.setText(ENN);
  970.         run2.setTextPosition(15);
  971.         run2.addBreak();
  972.         // -----------------------------------------------------------
  973.         XWPFRun run3 = par.createRun();
  974.         run3.setFontSize(10);
  975.         run3.setBold(true);
  976.         run3.setFontFamily("Arial");
  977.         run3.setText("Your Engine Cycle is: ");
  978.         XWPFRun run4 = par.createRun();
  979.         run4.setFontSize(10);
  980.         run4.setFontFamily("Arial");
  981.         run4.setText(ECC);
  982.         run4.addBreak();
  983.         // -----------------------------------------------------------
  984.         XWPFRun run5 = par.createRun();
  985.         run5.setFontSize(10);
  986.         run5.setBold(true);
  987.         run5.setFontFamily("Arial");
  988.         run5.setText("Your Propellant is: ");
  989.         XWPFRun run6 = par.createRun();
  990.         run6.setFontSize(10);
  991.         run6.setFontFamily("Arial");
  992.         run6.setText(PLC);
  993.         run6.addBreak();
  994.         // -----------------------------------------------------------
  995.         XWPFRun run9 = par.createRun();
  996.         run9.setFontSize(10);
  997.         run9.setBold(true);
  998.         run9.setFontFamily("Arial");
  999.         run9.setText("Your engine's nozzle type should be: ");
  1000.         XWPFRun run0 = par.createRun();
  1001.         run0.setFontSize(10);
  1002.         run0.setFontFamily("Arial");
  1003.         run0.setText(NTLC);
  1004.         run0.addBreak();
  1005.         // -----------------------------------------------------------
  1006.         XWPFRun run10 = par.createRun();
  1007.         run10.setFontSize(10);
  1008.         run10.setBold(true);
  1009.         run10.setFontFamily("Arial");
  1010.         run10.setText("Your Altitude of operation is: ");
  1011.         XWPFRun run23 = par.createRun();
  1012.         run23.setFontSize(10);
  1013.         run23.setFontFamily("Arial");
  1014.         run23.setText(AOOC);
  1015.         run23.addBreak();
  1016.         // -----------------------------------------------------------
  1017.         XWPFRun run13 = par.createRun();
  1018.         run13.setFontSize(10);
  1019.         run13.setBold(true);
  1020.         run13.setFontFamily("Arial");
  1021.         run13.setText("The Cooling Mechanism to be used would be ");
  1022.         XWPFRun run14 = par.createRun();
  1023.         run14.setFontSize(10);
  1024.         run14.setBold(true);
  1025.         run14.setFontFamily("Arial");
  1026.         run14.setText(CMC);
  1027.         run14.addBreak();
  1028.         // -----------------------------------------------------------
  1029.         XWPFRun run15 = par.createRun();
  1030.         run15.setFontSize(10);
  1031.         run15.setBold(true);
  1032.         run15.setFontFamily("Arial");
  1033.         run15.setText("Your engine's catalyst is : ");
  1034.         XWPFRun run16 = par.createRun();
  1035.         run16.setFontSize(10);
  1036.         run16.setFontFamily("Arial");
  1037.         run16.setText(CCC);
  1038.         run16.addBreak();
  1039.         run16.addBreak();
  1040.         // -----------------------------------------------------------
  1041.         try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  1042.             docx.write(out);
  1043.         }
  1044.     }
  1045.     public static void output_mono(String ENN, String ECC, String AOOC, String PLC, String NTLC, String CMC) throws IOException {
  1046.         String lbrk = "========================================================================================";
  1047.         File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/ofb_rex.docx");
  1048.         System.out.println(lbrk + "\n" + "Your Engine is called: " + ENN + "\n");
  1049.         System.out.println("Your Engine Cycle is: " + ECC);
  1050.         System.out.println("Your Propellant is: " + PLC);
  1051.         System.out.println("Your Altitude of operation is: " + AOOC);
  1052.         System.out.println("Your engine's nozzle type should be : " + NTLC);
  1053.         System.out.println("The Cooling Mechanism to be used would be " + CMC + '\n');
  1054.         XWPFDocument docx = new XWPFDocument();
  1055.         if (new File(String.valueOf(pathn1)).exists()) {
  1056.             FileInputStream jesus = new FileInputStream(String.valueOf(pathn1));
  1057.             docx = new XWPFDocument(jesus);
  1058.         }
  1059.         XWPFParagraph par = docx.createParagraph();
  1060.         XWPFRun run = par.createRun();
  1061.         run.setFontSize(12);
  1062.         run.setBold(true);
  1063.         run.setFontFamily("Arial");
  1064.         run.setText("Your Engine is called: ");
  1065.         run.setTextPosition(15);
  1066.         XWPFRun run2 = par.createRun();
  1067.         run2.setFontSize(12);
  1068.         run.setBold(true);
  1069.         run2.setFontFamily("Arial");
  1070.         run2.setText(ENN);
  1071.         run2.setTextPosition(15);
  1072.         run2.addBreak();
  1073.         // -----------------------------------------------------------
  1074.         XWPFRun run3 = par.createRun();
  1075.         run3.setFontSize(10);
  1076.         run3.setBold(true);
  1077.         run3.setFontFamily("Arial");
  1078.         run3.setText("Your Engine Cycle is: ");
  1079.         XWPFRun run4 = par.createRun();
  1080.         run4.setFontSize(10);
  1081.         run4.setFontFamily("Arial");
  1082.         run4.setText(ECC);
  1083.         run4.addBreak();
  1084.         // -----------------------------------------------------------
  1085.         XWPFRun run5 = par.createRun();
  1086.         run5.setFontSize(10);
  1087.         run5.setBold(true);
  1088.         run5.setFontFamily("Arial");
  1089.         run5.setText("Your Propellant is: ");
  1090.         XWPFRun run6 = par.createRun();
  1091.         run6.setFontSize(10);
  1092.         run6.setFontFamily("Arial");
  1093.         run6.setText(PLC);
  1094.         run6.addBreak();
  1095.         // -----------------------------------------------------------
  1096.         XWPFRun run9 = par.createRun();
  1097.         run9.setFontSize(10);
  1098.         run9.setBold(true);
  1099.         run9.setFontFamily("Arial");
  1100.         run9.setText("Your engine's nozzle type should be: ");
  1101.         XWPFRun run0 = par.createRun();
  1102.         run0.setFontSize(10);
  1103.         run0.setFontFamily("Arial");
  1104.         run0.setText(NTLC);
  1105.         run0.addBreak();
  1106.         // -----------------------------------------------------------
  1107.         XWPFRun run10 = par.createRun();
  1108.         run10.setFontSize(10);
  1109.         run10.setBold(true);
  1110.         run10.setFontFamily("Arial");
  1111.         run10.setText("Your Altitude of operation is: ");
  1112.         XWPFRun run23 = par.createRun();
  1113.         run23.setFontSize(10);
  1114.         run23.setFontFamily("Arial");
  1115.         run23.setText(AOOC);
  1116.         run23.addBreak();
  1117.         // -----------------------------------------------------------
  1118.         XWPFRun run13 = par.createRun();
  1119.         run13.setFontSize(10);
  1120.         run13.setBold(true);
  1121.         run13.setFontFamily("Arial");
  1122.         run13.setText("The Cooling Mechanism to be used would be ");
  1123.         XWPFRun run14 = par.createRun();
  1124.         run14.setFontSize(10);
  1125.         run14.setBold(true);
  1126.         run14.setFontFamily("Arial");
  1127.         run14.setText(CMC);
  1128.         run14.addBreak();
  1129.         run14.addBreak();
  1130.         // -----------------------------------------------------------
  1131.         try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  1132.             docx.write(out);
  1133.         }
  1134.     }
  1135.     public static void output_ex(String ENN, String ECC, String OCC, String FCC, String AOOC, String NTC, String TRR,
  1136.                                  String CMC, boolean isHyp, String mfts) throws IOException {
  1137.         String lbrk = "========================================================================================";
  1138.         File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/ofb_rex.docx");
  1139.         System.out.println(lbrk + "\n" + "Your Engine is called: " + ENN + "\n");
  1140.         System.out.println("Your Engine Cycle is: " + ECC);
  1141.         System.out.println("Your Oxidizer is: " + OCC);
  1142.         System.out.println("Your Fuel is: " + FCC);
  1143.         String message;
  1144.         if (isHyp) {
  1145.             message = "Your propellant combination is hypergolic";
  1146.             System.out.println(message);
  1147.         } else {
  1148.             message = "Your propellant combination is not hypergolic";
  1149.             System.out.println(message);
  1150.         }
  1151.         System.out.println("Your Altitude of operation is: " + AOOC);
  1152.         System.out.println("Your engine's nozzle type should be : " + NTC);
  1153.         System.out.println(mfts);
  1154.         System.out.println("Tank repressurisation would be done " + TRR);
  1155.         System.out.println("The Cooling Mechanism to be used would be " + CMC + '\n');
  1156.  
  1157.         XWPFDocument docx = new XWPFDocument();
  1158.         if (new File(String.valueOf(pathn1)).exists()) {
  1159.             FileInputStream jesus = new FileInputStream(String.valueOf(pathn1));
  1160.             docx = new XWPFDocument(jesus);
  1161.         }
  1162.         XWPFParagraph par = docx.createParagraph();
  1163.         XWPFRun run = par.createRun();
  1164.         run.setFontSize(12);
  1165.         run.setBold(true);
  1166.         run.setFontFamily("Arial");
  1167.         run.setText("Your Engine is called: ");
  1168.         run.setTextPosition(15);
  1169.         XWPFRun run2 = par.createRun();
  1170.         run2.setFontSize(12);
  1171.         run.setBold(true);
  1172.         run2.setFontFamily("Arial");
  1173.         run2.setText(ENN);
  1174.         run2.setTextPosition(15);
  1175.         run2.addBreak();
  1176.         // -----------------------------------------------------------
  1177.         XWPFRun run3 = par.createRun();
  1178.         run3.setFontSize(10);
  1179.         run3.setBold(true);
  1180.         run3.setFontFamily("Arial");
  1181.         run3.setText("Your Engine Cycle is: ");
  1182.         XWPFRun run4 = par.createRun();
  1183.         run4.setFontSize(10);
  1184.         run4.setFontFamily("Arial");
  1185.         run4.setText(ECC);
  1186.         run4.addBreak();
  1187.         // -----------------------------------------------------------
  1188.         XWPFRun run5 = par.createRun();
  1189.         run5.setFontSize(10);
  1190.         run5.setBold(true);
  1191.         run5.setFontFamily("Arial");
  1192.         run5.setText("Your Oxidizer is: ");
  1193.         XWPFRun run6 = par.createRun();
  1194.         run6.setFontSize(10);
  1195.         run6.setFontFamily("Arial");
  1196.         run6.setText(OCC);
  1197.         run6.addBreak();
  1198.         // -----------------------------------------------------------
  1199.         XWPFRun run8 = par.createRun();
  1200.         run8.setFontSize(10);
  1201.         run8.setBold(true);
  1202.         run8.setFontFamily("Arial");
  1203.         run8.setText("Your Fuel is: ");
  1204.         XWPFRun run7 = par.createRun();
  1205.         run7.setFontSize(10);
  1206.         run7.setFontFamily("Arial");
  1207.         run7.setText(FCC);
  1208.         run7.addBreak();
  1209.         // -----------------------------------------------------------
  1210.         XWPFRun run100 = par.createRun();
  1211.         run100.setFontSize(10);
  1212.         run100.setBold(true);
  1213.         run100.setFontFamily("Arial");
  1214.         run100.setText(message);
  1215.         run100.addBreak();
  1216.         // -----------------------------------------------------------
  1217.         XWPFRun run9 = par.createRun();
  1218.         run9.setFontSize(10);
  1219.         run9.setBold(true);
  1220.         run9.setFontFamily("Arial");
  1221.         run9.setText("Your engine's nozzle type should be: ");
  1222.         XWPFRun run0 = par.createRun();
  1223.         run0.setFontSize(10);
  1224.         run0.setFontFamily("Arial");
  1225.         run0.setText(NTC);
  1226.         run0.addBreak();
  1227.         // -----------------------------------------------------------
  1228.         XWPFRun run101 = par.createRun();
  1229.         run101.setFontSize(10);
  1230.         run101.setBold(true);
  1231.         run101.setFontFamily("Arial");
  1232.         run101.setText(mfts);
  1233.         run101.addBreak();
  1234.         // -----------------------------------------------------------
  1235.         XWPFRun run10 = par.createRun();
  1236.         run10.setFontSize(10);
  1237.         run10.setBold(true);
  1238.         run10.setFontFamily("Arial");
  1239.         run10.setText("Your Altitude of operation is: ");
  1240.         XWPFRun run23 = par.createRun();
  1241.         run23.setFontSize(10);
  1242.         run23.setFontFamily("Arial");
  1243.         run23.setText(AOOC);
  1244.         run23.addBreak();
  1245.         // -----------------------------------------------------------
  1246.         XWPFRun run11 = par.createRun();
  1247.         run11.setFontSize(10);
  1248.         run11.setBold(true);
  1249.         run11.setFontFamily("Arial");
  1250.         run11.setText("Tank repressurisation would be done ");
  1251.         XWPFRun run12 = par.createRun();
  1252.         run12.setFontSize(10);
  1253.         run12.setBold(true);
  1254.         run12.setFontFamily("Arial");
  1255.         run12.setText(TRR);
  1256.         run12.addBreak();
  1257.         // -----------------------------------------------------------
  1258.         XWPFRun run13 = par.createRun();
  1259.         run13.setFontSize(10);
  1260.         run13.setBold(true);
  1261.         run13.setFontFamily("Arial");
  1262.         run13.setText("The Cooling Mechanism to be used would be ");
  1263.         XWPFRun run14 = par.createRun();
  1264.         run14.setFontSize(10);
  1265.         run14.setBold(true);
  1266.         run14.setFontFamily("Arial");
  1267.         run14.setText(CMC);
  1268.         run14.addBreak();
  1269.         run14.addBreak();
  1270.         // -----------------------------------------------------------
  1271.         try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  1272.             docx.write(out);
  1273.         }
  1274.     }
  1275.     public static void output_nt(String ENN, String ECC, String AOOC, String NCC, String PLC, String RFC, String NTLC,
  1276.                                  String TRC, String CMC) throws IOException {
  1277.         String lbrk = "========================================================================================";
  1278.         File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/ofb_rex.docx");
  1279.         System.out.println(lbrk + "\n" + "Your Engine is called: " + ENN + "\n");
  1280.         System.out.println("Your Engine Cycle is: " + NCC + " " + ECC);
  1281.         System.out.println("Your Propellant is: " + PLC);
  1282.         System.out.println("Your Reactor's Fuel is: " + RFC);
  1283.         System.out.println("Your Altitude of operation is: " + AOOC);
  1284.         System.out.println("Your engine's nozzle type should be : " + NTLC);
  1285.         System.out.println("Tank repressurisation would be done " + TRC);
  1286.         System.out.println("The Cooling Mechanism to be used would be " + CMC + '\n');
  1287.  
  1288.         XWPFDocument docx = new XWPFDocument();
  1289.         if (new File(String.valueOf(pathn1)).exists()) {
  1290.             FileInputStream jesus = new FileInputStream(String.valueOf(pathn1));
  1291.             docx = new XWPFDocument(jesus);
  1292.         }
  1293.         XWPFParagraph par = docx.createParagraph();
  1294.         XWPFRun run = par.createRun();
  1295.         run.setFontSize(12);
  1296.         run.setBold(true);
  1297.         run.setFontFamily("Arial");
  1298.         run.setText("Your Engine is called: ");
  1299.         run.setTextPosition(15);
  1300.         XWPFRun run2 = par.createRun();
  1301.         run2.setFontSize(12);
  1302.         run.setBold(true);
  1303.         run2.setFontFamily("Arial");
  1304.         run2.setText(ENN);
  1305.         run2.setTextPosition(15);
  1306.         run2.addBreak();
  1307.         // -----------------------------------------------------------
  1308.         XWPFRun run3 = par.createRun();
  1309.         run3.setFontSize(10);
  1310.         run3.setBold(true);
  1311.         run3.setFontFamily("Arial");
  1312.         run3.setText("Your Engine Cycle is: ");
  1313.         XWPFRun run4 = par.createRun();
  1314.         run4.setFontSize(10);
  1315.         run4.setFontFamily("Arial");
  1316.         run4.setText(NCC + " " + ECC);
  1317.         run4.addBreak();
  1318.         // -----------------------------------------------------------
  1319.         XWPFRun run5 = par.createRun();
  1320.         run5.setFontSize(10);
  1321.         run5.setBold(true);
  1322.         run5.setFontFamily("Arial");
  1323.         run5.setText("Your Propellant is: ");
  1324.         XWPFRun run6 = par.createRun();
  1325.         run6.setFontSize(10);
  1326.         run6.setFontFamily("Arial");
  1327.         run6.setText(PLC);
  1328.         run6.addBreak();
  1329.         // -----------------------------------------------------------
  1330.         XWPFRun run7 = par.createRun();
  1331.         run7.setFontSize(10);
  1332.         run7.setBold(true);
  1333.         run7.setFontFamily("Arial");
  1334.         run7.setText("Your Reactor's Fission Fuel is: ");
  1335.         XWPFRun run8 = par.createRun();
  1336.         run8.setFontSize(10);
  1337.         run8.setFontFamily("Arial");
  1338.         run8.setText(RFC);
  1339.         run8.addBreak();
  1340.         // -----------------------------------------------------------
  1341.         XWPFRun run9 = par.createRun();
  1342.         run9.setFontSize(10);
  1343.         run9.setBold(true);
  1344.         run9.setFontFamily("Arial");
  1345.         run9.setText("Your engine's nozzle type should be: ");
  1346.         XWPFRun run0 = par.createRun();
  1347.         run0.setFontSize(10);
  1348.         run0.setFontFamily("Arial");
  1349.         run0.setText(NTLC);
  1350.         run0.addBreak();
  1351.         // -----------------------------------------------------------
  1352.         XWPFRun run10 = par.createRun();
  1353.         run10.setFontSize(10);
  1354.         run10.setBold(true);
  1355.         run10.setFontFamily("Arial");
  1356.         run10.setText("Your Altitude of operation is: ");
  1357.         XWPFRun run23 = par.createRun();
  1358.         run23.setFontSize(10);
  1359.         run23.setFontFamily("Arial");
  1360.         run23.setText(AOOC);
  1361.         run23.addBreak();
  1362.         // ------------------------------------------------------------
  1363.         XWPFRun run11 = par.createRun();
  1364.         run11.setFontSize(10);
  1365.         run11.setBold(true);
  1366.         run11.setFontFamily("Arial");
  1367.         run11.setText("Tank repressurisation would be done ");
  1368.         XWPFRun run12 = par.createRun();
  1369.         run12.setFontSize(10);
  1370.         run12.setBold(true);
  1371.         run12.setFontFamily("Arial");
  1372.         run12.setText(TRC);
  1373.         run12.addBreak();
  1374.         // -----------------------------------------------------------
  1375.         XWPFRun run13 = par.createRun();
  1376.         run13.setFontSize(10);
  1377.         run13.setBold(true);
  1378.         run13.setFontFamily("Arial");
  1379.         run13.setText("The Cooling Mechanism to be used would be ");
  1380.         XWPFRun run14 = par.createRun();
  1381.         run14.setFontSize(10);
  1382.         run14.setBold(true);
  1383.         run14.setFontFamily("Arial");
  1384.         run14.setText(CMC);
  1385.         run14.addBreak();
  1386.         run14.addBreak();
  1387.         // -----------------------------------------------------------
  1388.         try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  1389.             docx.write(out);
  1390.         }
  1391.     }
  1392.     public static void output_et(String ENN, String ECC, String AOOC, String PLC, String NTLC, String CMC) throws IOException {
  1393.         String lbrk = "========================================================================================";
  1394.         File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/ofb_rex.docx");
  1395.         System.out.println(lbrk + "\n" + "Your Engine is called: " + ENN + "\n");
  1396.         System.out.println("Your Engine Cycle is: " + ECC);
  1397.         System.out.println("Your Propellant is: " + PLC);
  1398.         System.out.println("Your Altitude of operation is: " + AOOC);
  1399.         System.out.println("Your engine's nozzle type should be : " + NTLC);
  1400.         System.out.println("The Cooling Mechanism to be used would be " + CMC + '\n');
  1401.  
  1402.         XWPFDocument docx = new XWPFDocument();
  1403.         if (new File(String.valueOf(pathn1)).exists()) {
  1404.             FileInputStream jesus = new FileInputStream(String.valueOf(pathn1));
  1405.             docx = new XWPFDocument(jesus);
  1406.         }
  1407.         XWPFParagraph par = docx.createParagraph();
  1408.         XWPFRun run = par.createRun();
  1409.         run.setFontSize(12);
  1410.         run.setBold(true);
  1411.         run.setFontFamily("Arial");
  1412.         run.setText("Your Engine is called: ");
  1413.         run.setTextPosition(15);
  1414.         XWPFRun run2 = par.createRun();
  1415.         run2.setFontSize(12);
  1416.         run.setBold(true);
  1417.         run2.setFontFamily("Arial");
  1418.         run2.setText(ENN);
  1419.         run2.setTextPosition(15);
  1420.         run2.addBreak();
  1421.         // -----------------------------------------------------------
  1422.         XWPFRun run3 = par.createRun();
  1423.         run3.setFontSize(10);
  1424.         run3.setBold(true);
  1425.         run3.setFontFamily("Arial");
  1426.         run3.setText("Your Engine Cycle is: ");
  1427.         XWPFRun run4 = par.createRun();
  1428.         run4.setFontSize(10);
  1429.         run4.setFontFamily("Arial");
  1430.         run4.setText(ECC);
  1431.         run4.addBreak();
  1432.         // -----------------------------------------------------------
  1433.         XWPFRun run5 = par.createRun();
  1434.         run5.setFontSize(10);
  1435.         run5.setBold(true);
  1436.         run5.setFontFamily("Arial");
  1437.         run5.setText("Your Propellant is: ");
  1438.         XWPFRun run6 = par.createRun();
  1439.         run6.setFontSize(10);
  1440.         run6.setFontFamily("Arial");
  1441.         run6.setText(PLC);
  1442.         run6.addBreak();
  1443.         // -----------------------------------------------------------
  1444.         XWPFRun run9 = par.createRun();
  1445.         run9.setFontSize(10);
  1446.         run9.setBold(true);
  1447.         run9.setFontFamily("Arial");
  1448.         run9.setText("Your engine's nozzle type should be: ");
  1449.         XWPFRun run0 = par.createRun();
  1450.         run0.setFontSize(10);
  1451.         run0.setFontFamily("Arial");
  1452.         run0.setText(NTLC);
  1453.         run0.addBreak();
  1454.         // -----------------------------------------------------------
  1455.         XWPFRun run10 = par.createRun();
  1456.         run10.setFontSize(10);
  1457.         run10.setBold(true);
  1458.         run10.setFontFamily("Arial");
  1459.         run10.setText("Your Altitude of operation is: ");
  1460.         XWPFRun run23 = par.createRun();
  1461.         run23.setFontSize(10);
  1462.         run23.setFontFamily("Arial");
  1463.         run23.setText(AOOC);
  1464.         run23.addBreak();
  1465.         // -----------------------------------------------------------
  1466.         XWPFRun run13 = par.createRun();
  1467.         run13.setFontSize(10);
  1468.         run13.setBold(true);
  1469.         run13.setFontFamily("Arial");
  1470.         run13.setText("The Cooling Mechanism to be used would be ");
  1471.         XWPFRun run14 = par.createRun();
  1472.         run14.setFontSize(10);
  1473.         run14.setBold(true);
  1474.         run14.setFontFamily("Arial");
  1475.         run14.setText(CMC);
  1476.         run14.addBreak();
  1477.         run14.addBreak();
  1478.         // -----------------------------------------------------------
  1479.         try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  1480.             docx.write(out);
  1481.         }
  1482.     }
  1483.     public static void output_def(String ENN, String ECC, String OCC, String FCC, String AOOC, String NTC, String TRC, String CMC,
  1484.                                   boolean isHyp, String mfts) throws IOException {
  1485.         String lbrk = "========================================================================================";
  1486.         File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/ofb_rex.docx");
  1487.         System.out.println(lbrk + "\n" + "Your Engine is called: " + ENN + "\n");
  1488.         System.out.println("Your Engine Cycle is: " + ECC);
  1489.         System.out.println("Your Oxidizer is: " + OCC);
  1490.         System.out.println("Your Fuel is: " + FCC);
  1491.         String message;
  1492.         if (isHyp) {
  1493.             message = "Your propellant combination is hypergolic";
  1494.             System.out.println(message);
  1495.         } else {
  1496.             message = "Your propellant combination is not hypergolic";
  1497.             System.out.println(message);
  1498.         }
  1499.         System.out.println("Your Altitude of operation is: " + AOOC);
  1500.         System.out.println("Your engine's nozzle type should be : " + NTC);
  1501.         System.out.println(mfts);
  1502.         System.out.println("Tank repressurisation would be done " + TRC);
  1503.         System.out.println("The Cooling Mechanism to be used would be " + CMC + '\n');
  1504.  
  1505.         XWPFDocument docx = new XWPFDocument();
  1506.         if (new File(String.valueOf(pathn1)).exists()) {
  1507.             docx = new XWPFDocument(new FileInputStream(String.valueOf(pathn1)));
  1508.         }
  1509.         XWPFParagraph par = docx.createParagraph();
  1510.         XWPFRun run = par.createRun();
  1511.         run.setFontSize(12);
  1512.         run.setBold(true);
  1513.         run.setFontFamily("Arial");
  1514.         run.setText("Your Engine is called: ");
  1515.         run.setTextPosition(15);
  1516.         XWPFRun run2 = par.createRun();
  1517.         run2.setFontSize(12);
  1518.         run.setBold(true);
  1519.         run2.setFontFamily("Arial");
  1520.         run2.setText(ENN);
  1521.         run2.setTextPosition(15);
  1522.         run2.addBreak();
  1523.         // -----------------------------------------------------------
  1524.         XWPFRun run3 = par.createRun();
  1525.         run3.setFontSize(10);
  1526.         run3.setBold(true);
  1527.         run3.setFontFamily("Arial");
  1528.         run3.setText("Your Engine Cycle is: ");
  1529.         XWPFRun run4 = par.createRun();
  1530.         run4.setFontSize(10);
  1531.         run4.setFontFamily("Arial");
  1532.         run4.setText(ECC);
  1533.         run4.addBreak();
  1534.         // -----------------------------------------------------------
  1535.         XWPFRun run5 = par.createRun();
  1536.         run5.setFontSize(10);
  1537.         run5.setBold(true);
  1538.         run5.setFontFamily("Arial");
  1539.         run5.setText("Your Oxidizer is: ");
  1540.         XWPFRun run6 = par.createRun();
  1541.         run6.setFontSize(10);
  1542.         run6.setFontFamily("Arial");
  1543.         run6.setText(OCC);
  1544.         run6.addBreak();
  1545.         // -----------------------------------------------------------
  1546.         XWPFRun run8 = par.createRun();
  1547.         run8.setFontSize(10);
  1548.         run8.setBold(true);
  1549.         run8.setFontFamily("Arial");
  1550.         run8.setText("Your Fuel is: ");
  1551.         XWPFRun run7 = par.createRun();
  1552.         run7.setFontSize(10);
  1553.         run7.setFontFamily("Arial");
  1554.         run7.setText(FCC);
  1555.         run7.addBreak();
  1556.         // -----------------------------------------------------------
  1557.         XWPFRun run100 = par.createRun();
  1558.         run100.setFontSize(10);
  1559.         run100.setBold(true);
  1560.         run100.setFontFamily("Arial");
  1561.         run100.setText(message);
  1562.         run100.addBreak();
  1563.         // -----------------------------------------------------------
  1564.         XWPFRun run9 = par.createRun();
  1565.         run9.setFontSize(10);
  1566.         run9.setBold(true);
  1567.         run9.setFontFamily("Arial");
  1568.         run9.setText("Your engine's nozzle type should be: ");
  1569.         XWPFRun run0 = par.createRun();
  1570.         run0.setFontSize(10);
  1571.         run0.setFontFamily("Arial");
  1572.         run0.setText(NTC);
  1573.         run0.addBreak();
  1574.         // -----------------------------------------------------------
  1575.         XWPFRun run101 = par.createRun();
  1576.         run101.setFontSize(10);
  1577.         run101.setBold(true);
  1578.         run101.setFontFamily("Arial");
  1579.         run101.setText(mfts);
  1580.         run101.addBreak();
  1581.         // -----------------------------------------------------------
  1582.         XWPFRun run10 = par.createRun();
  1583.         run10.setFontSize(10);
  1584.         run10.setBold(true);
  1585.         run10.setFontFamily("Arial");
  1586.         run10.setText("Your Altitude of operation is: ");
  1587.         XWPFRun run23 = par.createRun();
  1588.         run23.setFontSize(10);
  1589.         run23.setFontFamily("Arial");
  1590.         run23.setText(AOOC);
  1591.         run23.addBreak();
  1592.         // -----------------------------------------------------------
  1593.         XWPFRun run11 = par.createRun();
  1594.         run11.setFontSize(10);
  1595.         run11.setBold(true);
  1596.         run11.setFontFamily("Arial");
  1597.         run11.setText("Tank repressurisation would be done ");
  1598.         XWPFRun run12 = par.createRun();
  1599.         run12.setFontSize(10);
  1600.         run12.setBold(true);
  1601.         run12.setFontFamily("Arial");
  1602.         run12.setText(TRC);
  1603.         run12.addBreak();
  1604.         // -----------------------------------------------------------
  1605.         XWPFRun run13 = par.createRun();
  1606.         run13.setFontSize(10);
  1607.         run13.setBold(true);
  1608.         run13.setFontFamily("Arial");
  1609.         run13.setText("The Cooling Mechanism to be used would be ");
  1610.         XWPFRun run14 = par.createRun();
  1611.         run14.setFontSize(10);
  1612.         run14.setBold(true);
  1613.         run14.setFontFamily("Arial");
  1614.         run14.setText(CMC);
  1615.         run14.addBreak();
  1616.         run14.addBreak();
  1617.         // -----------------------------------------------------------
  1618.         try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  1619.             docx.write(out);
  1620.         }
  1621.     }
  1622.     public static boolean isHypergolic (String OCC, String FCC) {
  1623.         boolean isHypergolic = false;
  1624.         switch (OCC) {
  1625.             case "N2O4 (Nitrogen Tetroxide)" -> {
  1626.                 switch (FCC) {
  1627.                     case "50% CH6N2 + 50% N2H4 (Aerosine-50)", "75% CH6N2 + 25% N2H4 (UH-25)", "C6H5NH2 (Aniline)" ,
  1628.                             "C2H8N2 (UnsymmetricalDimethylHydrazine)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)" ->{
  1629.                         isHypergolic = true;
  1630.                     } default -> {
  1631.                         isHypergolic = false;
  1632.                     }
  1633.                 }
  1634.             } case "H2O2 (Hydrogen Peroxide) 95%", "H2O2 (Hydrogen Peroxide) 85%", "O2 (Oxygen)" -> {
  1635.                 isHypergolic = false;
  1636.             } case "O3 (Ozone)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)", "ClF3 (Chlorine Trifluoride)", "ClF5 (Chlorine Pentafluoride)" -> {
  1637.                 isHypergolic = true;
  1638.             } case "AK20F: 80% HNO3 + 20% N2O4 (Nitric Acid)", "AK20I: 80% HNO3 + 20% N2O4 (Nitric Acid)",
  1639.                     "AK20K: 80% HNO3 + 20% N2O4 (Nitric Acid)", "AK27I: 73% HNO3 + 27% N2O4 (Nitric Acid)",
  1640.                     "AK27P: 73% HNO3 + 27% N2O4 (Nitric Acid)" -> {
  1641.                 switch (FCC) {
  1642.                     case "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)" ->{
  1643.                         isHypergolic = true;
  1644.                     } default -> {
  1645.                         isHypergolic = false;
  1646.                     }
  1647.                 }
  1648.             }
  1649.         }
  1650.         return isHypergolic;
  1651.     }
  1652. }
Add Comment
Please, Sign In to add comment