MAKS_Enjoyer

Mental Anguish: Disaster Mode

Sep 19th, 2022
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 94.75 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 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"};
  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", "TQ", "S",
  193.                         "MJ", "XS", "LM10", "HM", "LE", "LRE", "CE", "DST", "DOK", "KDU", "KRD", "R", "RO", "LMS", "LMP"};
  194.  
  195.                 String engine_Name = ass_crack(engine_Name1, firstPart);
  196.                 Collections.shuffle(Arrays.asList(engine_Cycle));
  197.                 Random engineCycleChosen = new Random();
  198.                 int engineTypeChosen_index = engineCycleChosen.nextInt(engine_Cycle.length);
  199.                 String engine_Cycle_Chosen = engine_Cycle[engineTypeChosen_index];
  200.  
  201.                 switch (engine_Cycle_Chosen) {
  202.                     case "Gas Core", "Liquid Core", "Solid Core", "Pulsed Nuclear", "Nuclear SaltWater", "Pebble-Bed Core" -> {
  203.                         String propellant_List_Chosen, nuclear_Cycle_Chosen, reactor_Fuel_Chosen, nozzle_Type_List_Chosen;
  204.                         switch (engine_Cycle_Chosen) {
  205.                             case "Gas Core" -> {
  206.                                 String[] remass_List = {"Hydrogen (H2)", "Nitrogen (N2)", "Monoatomic Hydrogen (H)", "Ammonia (NH3)",
  207.                                         "Water (H2O)", "Oxygen (O2)", "Carbon Dioxide (CO2)", "Carbon Monoxide (CO)",
  208.                                         "Methane (CH4)"};
  209.                                 Collections.shuffle(Arrays.asList(remass_List));
  210.                                 Random remassChosen = new Random();
  211.                                 int remassChosen_index = remassChosen.nextInt(remass_List.length);
  212.                                 String remass_List_Chosen = remass_List[remassChosen_index];
  213.                                 propellant_List_Chosen = "Uranium HexaFluoride Salt (UF6) and " + remass_List_Chosen + " as remass";
  214.                                 // Nuclear Cycle (Nuclear Thermal)
  215.                                 String[] nuclear_cycle1 = {"\"Expander Bleed\"", "\"Expander Closed\"", "\"Nuclear Lightbulb\"", "\"Vortex Confined\"",
  216.                                         "\"Wheel Flow\"", "\"Magnetohydrodynamic(MHD) vortex\"", "\"Expander Open\""};
  217.                                 Collections.shuffle(Arrays.asList(nuclear_cycle1));
  218.                                 Random nuclearCycleChosen = new Random();
  219.                                 int nuclearCycleChosen_index = nuclearCycleChosen.nextInt(nuclear_cycle1.length);
  220.                                 nuclear_Cycle_Chosen = nuclear_cycle1[nuclearCycleChosen_index];
  221.                                 // Reactor Fuel (Nuclear Thermal)
  222.                                 String[] reactor_fuel = {"100-90% Uranium-235", "50% Uranium-235", "25-8% Uranium-235", "1-2% Uranium-235"};
  223.                                 Collections.shuffle(Arrays.asList(reactor_fuel));
  224.                                 Random reactorfuelChosen = new Random();
  225.                                 int reactorfuelChosen_index = reactorfuelChosen.nextInt(reactor_fuel.length);
  226.                                 reactor_Fuel_Chosen = reactor_fuel[reactorfuelChosen_index];
  227.                                 // Nozzle Type (Nuclear Thermal)
  228.                                 nozzle_Type_List_Chosen = "De Laval Bell (With Nozzle Extension)";
  229.                             } case "Liquid Core", "Colloid-Core", "Pebble-Bed Core" -> {
  230.                                 // Remass (Nuclear Thermal)
  231.                                 String[] remass_List2 = {"Hydrogen (H2)", "Nitrogen (N2)", "Monoatomic Hydrogen (H)", "Ammonia (NH3)",
  232.                                         "Water (H2O)", "Oxygen (O2)", "Carbon Dioxide (CO2)", "Carbon Monoxide (CO)",
  233.                                         "Methane (CH4)", "Hydrogen (H2) + Hexane (C6H14)"};
  234.                                 Collections.shuffle(Arrays.asList(remass_List2));
  235.                                 Random remassChosen = new Random();
  236.                                 int remassChosen_index = remassChosen.nextInt(remass_List2.length);
  237.                                 String remass_List_Chosen = remass_List2[remassChosen_index];
  238.                                 propellant_List_Chosen = "Uranium HexaFluoride Salt (UF6) and " + remass_List_Chosen + " as a remass";
  239.                                 // Nuclear Cycle (Nuclear Thermal)
  240.                                 String[] nuclear_cycle1 = {"\"Expander Bleed\"", "\"Expander Closed\"", "\"Vortex Confined\"", "\"Expander Open\""};
  241.                                 Collections.shuffle(Arrays.asList(nuclear_cycle1));
  242.                                 Random nuclearCycleChosen = new Random();
  243.                                 int nuclearCycleChosen_index = nuclearCycleChosen.nextInt(nuclear_cycle1.length);
  244.                                 nuclear_Cycle_Chosen = nuclear_cycle1[nuclearCycleChosen_index];
  245.                                 // Reactor Fuel (Nuclear Thermal)
  246.                                 String[] reactor_fuel = {"100-90% Uranium-235", "50% Uranium-235", "25-8% Uranium-235", "1-2% Uranium-235"};
  247.                                 Collections.shuffle(Arrays.asList(reactor_fuel));
  248.                                 Random reactorfuelChosen = new Random();
  249.                                 int reactorfuelChosen_index = reactorfuelChosen.nextInt(reactor_fuel.length);
  250.                                 reactor_Fuel_Chosen = reactor_fuel[reactorfuelChosen_index];
  251.                                 // Nozzle Type (Nuclear Thermal)
  252.                                 nozzle_Type_List_Chosen = "De Laval Bell (With Nozzle Extension)";
  253.                             } case "Nuclear SaltWater" -> {
  254.                                 propellant_List_Chosen = "Uranium TetraBromide (UBr4) + Water (H2O)";
  255.                                 nuclear_Cycle_Chosen = "";
  256.                                 // Reactor Fuel (Nuclear Thermal)
  257.                                 String[] reactor_fuel = {"100-90% Uranium-235", "50% Uranium-235", "25-8% Uranium-235", "1-2% Uranium-235"};
  258.                                 Collections.shuffle(Arrays.asList(reactor_fuel));
  259.                                 Random reactorfuelChosen = new Random();
  260.                                 int reactorfuelChosen_index = reactorfuelChosen.nextInt(reactor_fuel.length);
  261.                                 reactor_Fuel_Chosen = reactor_fuel[reactorfuelChosen_index];
  262.                                 // Nozzle Type (Nuclear Thermal)
  263.                                 nozzle_Type_List_Chosen = "De Laval Bell (With Nozzle Extension)";
  264.                             } default -> {
  265.                                 // Propellant (Nuclear Thermal)
  266.                                 Collections.shuffle(Arrays.asList(propellant_List3));
  267.                                 Random propellantChosen = new Random();
  268.                                 int propellantChosen_index = propellantChosen.nextInt(propellant_List3.length);
  269.                                 propellant_List_Chosen = propellant_List3[propellantChosen_index];
  270.                                 // Nuclear Cycle (Nuclear Thermal)
  271.                                 String[] nuclear_cycle1 = {"\"Expander Bleed\"", "\"Expander Closed\"", "\"Expander Open\""};
  272.                                 Collections.shuffle(Arrays.asList(nuclear_cycle1));
  273.                                 Random nuclearCycleChosen = new Random();
  274.                                 int nuclearCycleChosen_index = nuclearCycleChosen.nextInt(nuclear_cycle1.length);
  275.                                 nuclear_Cycle_Chosen = nuclear_cycle1[nuclearCycleChosen_index];
  276.                                 // Reactor Fuel (Nuclear Thermal)
  277.                                 String[] reactor_fuel = {"100-90% Uranium-235", "50% Uranium-235", "20-8% Uranium-235", "1-2% Uranium-235",
  278.                                         "100-90% Plutonium-238", "50% Plutonium-238", "25-8% Plutonium-238", "1-2% Plutonium-238"};
  279.                                 Collections.shuffle(Arrays.asList(reactor_fuel));
  280.                                 Random reactorfuelChosen = new Random();
  281.                                 int reactorfuelChosen_index = reactorfuelChosen.nextInt(reactor_fuel.length);
  282.                                 reactor_Fuel_Chosen = reactor_fuel[reactorfuelChosen_index];
  283.                                 // Nozzle Type (Nuclear Thermal)
  284.                                 nozzle_Type_List_Chosen = "De Laval Bell (With Nozzle Extension)";
  285.                             }
  286.                         }
  287.                         // Altitude of Operation (Nuclear Thermal)
  288.                         String altitude_Of_Operation_Chosen = "80 km+ (Vacuum)";
  289.                         // Tank Repressurisation (Nuclear Thermal)
  290.                         Collections.shuffle(Arrays.asList(tank_Repressurisation));
  291.                         Random tankRepressurisationChosen = new Random();
  292.                         int tankRepressurisationChosen_index = tankRepressurisationChosen.nextInt(tank_Repressurisation.length);
  293.                         String tank_Repressurisation_Chosen = tank_Repressurisation[tankRepressurisationChosen_index];
  294.                         // Cooling Mechanism (Nuclear Thermal)
  295.                         String[] cooling_mechanism = {"Radiative Cooling", "Dump Cooling", "Film Cooling",
  296.                                 "Regenerative Cooling", "Transpiration Cooling"};
  297.                         Collections.shuffle(Arrays.asList(cooling_mechanism));
  298.                         Random coolingMechanismChosen = new Random();
  299.                         int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
  300.                         String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
  301.  
  302.                         // Beautiful Part (Nuclear Thermal)
  303.                         output_nt(engine_Name, engine_Cycle_Chosen, altitude_Of_Operation_Chosen, nuclear_Cycle_Chosen,
  304.                                 propellant_List_Chosen, reactor_Fuel_Chosen, nozzle_Type_List_Chosen,
  305.                                 tank_Repressurisation_Chosen, cooling_Mechanism_Chosen);
  306.  
  307.                     }
  308.  
  309.                     case "MagnetoPlasmaDynamic Thruster", "Hall Effect Thruster", "Gridded Ion Thruster",
  310.                             "Colloid Thruster", "Variable Specific Impulse Magnetoplasma Rocket (VASIMR)" -> {
  311.                         String propellant_List_Chosen = null;
  312.                         String nozzle_Type_List_Chosen = null;
  313.                         switch (engine_Cycle_Chosen) {
  314.                             case "Hall Effect Thruster" -> {
  315.                                 String[] propellant_List = {"Xenon", "Krypton", "Argon", "Bismuth", "Iodine",
  316.                                         "Magnesium", "Zinc", "Adamantane"};
  317.                                 Collections.shuffle(Arrays.asList(propellant_List));
  318.                                 Random propellantChosen = new Random();
  319.                                 int propellantChosen_index = propellantChosen.nextInt(propellant_List.length);
  320.                                 propellant_List_Chosen = propellant_List[propellantChosen_index];
  321.                                 // Nozzle Type (Nuclear Thermal)
  322.                                 nozzle_Type_List_Chosen = "Hall Effect Thruster Nozzle";
  323.                             } case "Gridded Ion Thruster" -> {
  324.                                 String[] propellant_List = {"Xenon", "Mercury", "Caesium"};
  325.                                 Collections.shuffle(Arrays.asList(propellant_List));
  326.                                 Random propellantChosen = new Random();
  327.                                 int propellantChosen_index = propellantChosen.nextInt(propellant_List.length);
  328.                                 propellant_List_Chosen = propellant_List[propellantChosen_index];
  329.                                 // Nozzle Type (Nuclear Thermal)
  330.                                 nozzle_Type_List_Chosen = "Electrostatic Ion Nozzle";
  331.                             } case "Colloid Thruster" -> {
  332.                                 propellant_List_Chosen = "NH2OH+NO3 (Hydroxylammonium nitrate)";
  333.                                 // Nozzle Type (Nuclear Thermal)
  334.                                 nozzle_Type_List_Chosen = "Capillary Emitter-Electrode Cone";
  335.                             } case "Variable Specific Impulse Magnetoplasma Rocket (VASIMR)" -> {
  336.                                 String[] propellant_List = {"Xenon", "Krypton", "Argon"};
  337.                                 Collections.shuffle(Arrays.asList(propellant_List));
  338.                                 Random propellantChosen = new Random();
  339.                                 int propellantChosen_index = propellantChosen.nextInt(propellant_List.length);
  340.                                 propellant_List_Chosen = propellant_List[propellantChosen_index];
  341.                                 // Nozzle Type (Nuclear Thermal)
  342.                                 nozzle_Type_List_Chosen = "VASIMR Magnetic Confinement Nozzle";
  343.                             } case "MagnetoPlasmaDynamic Thruster" -> {
  344.                                 String[] propellant_List = {"Xenon", "Neon", "Argon", "Hydrogen", "Hydrazine", "Lithium"};
  345.                                 Collections.shuffle(Arrays.asList(propellant_List));
  346.                                 Random propellantChosen = new Random();
  347.                                 int propellantChosen_index = propellantChosen.nextInt(propellant_List.length);
  348.                                 propellant_List_Chosen = propellant_List[propellantChosen_index];
  349.                                 // Nozzle Type (Nuclear Thermal)
  350.                                 nozzle_Type_List_Chosen = "Cathode Plug Magnetic Confinement Nozzle";
  351.                             }
  352.                         }
  353.                         // Altitude of Operation (Electric Propulsion)
  354.                         String altitude_Of_Operation_Chosen = "80 km+ (Vacuum)";
  355.                         // Cooling Mechanism (Electric Propulsion)
  356.                         String[] cooling_mechanism = {"Radiative Cooling", "Dump Cooling", "Film Cooling",
  357.                                 "Regenerative Cooling", "Transpiration Cooling"};
  358.                         Collections.shuffle(Arrays.asList(cooling_mechanism));
  359.                         Random coolingMechanismChosen = new Random();
  360.                         int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
  361.                         String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
  362.  
  363.                         // Beautiful Part (Electric Propulsion)
  364.                         output_et(engine_Name, engine_Cycle_Chosen, altitude_Of_Operation_Chosen,
  365.                                 propellant_List_Chosen, nozzle_Type_List_Chosen, cooling_Mechanism_Chosen);
  366.                     }
  367.  
  368.                     case "Monopropellant (Decomposition)" -> {
  369.                         // Propellant (Decomposing Monopropellant)
  370.                         Collections.shuffle(Arrays.asList(propellant_List1));
  371.                         Random propellantChosen = new Random();
  372.                         int propellantChosen_index = propellantChosen.nextInt(propellant_List1.length);
  373.                         String propellant_List_Chosen = propellant_List1[propellantChosen_index];
  374.                         // Altitude of Operation (Decomposing Monopropellant)
  375.                         String altitude_Of_Operation_Chosen = "80 km+ (Vacuum)";
  376.                         // Nozzle Type (Decomposing Monopropellant)
  377.                         Collections.shuffle(Arrays.asList(nozzle_Type_List1));
  378.                         Random nozzle_chosen = new Random();
  379.                         int nozzleChosen_index = nozzle_chosen.nextInt(nozzle_Type_List1.length);
  380.                         String nozzle_Type_List_Chosen = nozzle_Type_List1[nozzleChosen_index];
  381.                         // Cooling Mechanism (Decomposing Monopropellant)
  382.                         String[] cooling_mechanism = {"Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling"};
  383.                         Collections.shuffle(Arrays.asList(cooling_mechanism));
  384.                         Random coolingMechanismChosen = new Random();
  385.                         int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
  386.                         String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
  387.                         // Catalyst Choice (Decomposing Monopropellant)
  388.                         String catalyst_Chosen = null;
  389.                         switch (propellant_List_Chosen) {
  390.                             case "N2H4 (Hydrazine)", "LMP-103S: 65% Ammonium Dinitramide (NH4N(NO2)2) + 35% Methanol" -> {
  391.                                 catalyst_Chosen = "Aerojet S-405: Iridium coated Alumina Pellets";
  392.                             } case "H2O2 (Hydrogen Peroxide)" -> {
  393.                                 catalyst_Chosen = "KMNO4 (Potassium Permanganate) Honeycomb";
  394.                             } case "NH2OH+NO3 (Hydroxylammonium nitrate)" -> {
  395.                                 catalyst_Chosen = "Iridium coated Copper Pellets";
  396.                             }
  397.                         }
  398.                         // Beautiful Part (Least non-ugly)
  399.                         output_monod(engine_Name, engine_Cycle_Chosen, altitude_Of_Operation_Chosen,
  400.                                 propellant_List_Chosen, nozzle_Type_List_Chosen, cooling_Mechanism_Chosen, catalyst_Chosen);
  401.  
  402.                     } case "Monopropellant (Cold Gas)" -> {
  403.                         Collections.shuffle(Arrays.asList(propellant_List2));
  404.                         Random propellantChosen = new Random();
  405.                         int propellantChosen_index = propellantChosen.nextInt(propellant_List2.length);
  406.                         String propellant_List_Chosen = propellant_List2[propellantChosen_index];
  407.                         // Altitude of Operation (Cold Gas Monopropellant)
  408.                         String altitude_Of_Operation_Chosen = "80 km+ (Vacuum)";
  409.                         // Nozzle Type (Cold Gas Monopropellant)
  410.                         Collections.shuffle(Arrays.asList(nozzle_Type_List1));
  411.                         Random nozzle_chosen = new Random();
  412.                         int nozzleChosen_index = nozzle_chosen.nextInt(nozzle_Type_List1.length);
  413.                         String nozzle_Type_List_Chosen = nozzle_Type_List1[nozzleChosen_index];
  414.                         // Cooling Mechanism (Decomposing Monopropellant)
  415.                         String[] cooling_mechanism = {"Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling"};
  416.                         Collections.shuffle(Arrays.asList(cooling_mechanism));
  417.                         Random coolingMechanismChosen = new Random();
  418.                         int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
  419.                         String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
  420.  
  421.                         // Beautiful Part (Least non-ugly)
  422.                         output_mono(engine_Name, engine_Cycle_Chosen, altitude_Of_Operation_Chosen,
  423.                             propellant_List_Chosen, nozzle_Type_List_Chosen, cooling_Mechanism_Chosen);
  424.  
  425.                     }
  426.  
  427.                     case "Expander (Closed)", "Expander (Open/Bleed)" -> {
  428.                         String[] oxidizer_List2 = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)",
  429.                                 "O3 (Ozone)"};
  430.                         Collections.shuffle(Arrays.asList(oxidizer_List2));
  431.                         Random oxidizerChosen = new Random();
  432.                         int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List2.length);
  433.                         String oxidizer_Chosen = oxidizer_List2[oxidizerChosen_index];
  434.                         String fuel_Chosen = "";
  435.                         switch (oxidizer_Chosen) {
  436.                             case "O2 (Oxygen)" -> {
  437.                                 String[] fuel_List20 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  438.                                         "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  439.                                         "CH3OH (Methanol)", "C12H24 (Kerosene)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
  440.                                 Collections.shuffle(Arrays.asList(fuel_List20));
  441.                                 Random fuelChosen = new Random();
  442.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List20.length);
  443.                                 fuel_Chosen = fuel_List20[fuelChosen_index];
  444.                             } case "F2 (Fluorine)" -> {
  445.                                 String[] fuel_List1 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  446.                                         "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "C2H8N2 (UnsymetricalDimethylHydrazine)",
  447.                                         "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)", "CH3OH (Methanol)", "C12H24 (Kerosene)",
  448.                                         "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
  449.                                 Collections.shuffle(Arrays.asList(fuel_List1));
  450.                                 Random fuelChosen = new Random();
  451.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List1.length);
  452.                                 fuel_Chosen = fuel_List1[fuelChosen_index];
  453.                             } case "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)" -> {
  454.                                 String[] fuel_List2 = {"H2 (Hydrogen)", "N2H4 (Hydrazine)", "CH3OH (Methanol)",
  455.                                         "C12H24 (Kerosene)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
  456.                                 Collections.shuffle(Arrays.asList(fuel_List2));
  457.                                 Random fuelChosen = new Random();
  458.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List2.length);
  459.                                 fuel_Chosen = fuel_List2[fuelChosen_index];
  460.                             }
  461.                         }
  462.  
  463.                         Collections.shuffle(Arrays.asList(altitude_Of_Operation));
  464.                         Random altitudeOfOperationChosen = new Random();
  465.                         int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
  466.                         String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
  467.  
  468.                         String nozzle_Type_Chosen = bussy(altitude_Of_Operation_Chosen);
  469.  
  470.                         String[] cooling_mechanism = {"Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling",
  471.                                 "Regenerative Cooling", "Transpiration Cooling"};
  472.                         Collections.shuffle(Arrays.asList(cooling_mechanism));
  473.                         Random coolingMechanismChosen = new Random();
  474.                         int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
  475.                         String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
  476.  
  477.                         // Beautiful Part (Least non-ugly)
  478.                         output_ex(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen, altitude_Of_Operation_Chosen,
  479.                                 nozzle_Type_Chosen,"Autogenously", cooling_Mechanism_Chosen);
  480.                     }
  481.  
  482.                     case "Dual Expander (Closed)", "Dual Expander (Open/Bleed)" -> {
  483.                         String[] oxidizer_List3 = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)"};
  484.                         Collections.shuffle(Arrays.asList(oxidizer_List3));
  485.                         Random oxidizerChosen = new Random();
  486.                         int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List3.length);
  487.                         String oxidizer_Chosen = oxidizer_List3[oxidizerChosen_index];
  488.  
  489.                         String fuel_Chosen = "";
  490.                         String[] fuel_List3 = {"H2 (Hydrogen)", "CH4 (Methane)"};
  491.                         switch (oxidizer_Chosen) {
  492.                             case "O2 (Oxygen)", "F2 (Fluorine)" -> {
  493.                                 Collections.shuffle(Arrays.asList(fuel_List3));
  494.                                 Random fuelChosen = new Random();
  495.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List3.length);
  496.                                 fuel_Chosen = fuel_List3[fuelChosen_index];
  497.                             } case "F2 (Fluorine) + O2 (Oxygen)" -> fuel_Chosen = "H2 (Hydrogen)";
  498.                         }
  499.  
  500.                         Collections.shuffle(Arrays.asList(altitude_Of_Operation));
  501.                         Random altitudeOfOperationChosen = new Random();
  502.                         int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
  503.                         String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
  504.  
  505.                         String nozzle_Type_Chosen = bussy(altitude_Of_Operation_Chosen);
  506.  
  507.                         String[] cooling_mechanism = {"Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling",
  508.                                 "Regenerative Cooling", "Transpiration Cooling"};
  509.                         Collections.shuffle(Arrays.asList(cooling_mechanism));
  510.                         Random coolingMechanismChosen = new Random();
  511.                         int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
  512.                         String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
  513.  
  514.                         // Beautiful Part (Least non-ugly)
  515.                         output_ex(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen,
  516.                                 altitude_Of_Operation_Chosen, nozzle_Type_Chosen,"Autogenously", cooling_Mechanism_Chosen);
  517.  
  518.                     }
  519.  
  520.                     case "Staged Combustion (Fuel Rich)" -> {
  521.                         String[] oxidizer_List4 = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)"};
  522.                         Collections.shuffle(Arrays.asList(oxidizer_List4));
  523.                         Random oxidizerChosen = new Random();
  524.                         int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List4.length);
  525.                         String oxidizer_Chosen = oxidizer_List4[oxidizerChosen_index];
  526.  
  527.                         String fuel_Chosen = "";
  528.                         switch (oxidizer_Chosen) {
  529.                             case "O2 (Oxygen)", "F2 (Fluorine)" -> {
  530.                                 String[] fuel_List4 = {"H2 (Hydrogen)", "NH3 (Ammonia)", "N2H4 (Hydrazine)"};
  531.                                 Collections.shuffle(Arrays.asList(fuel_List4));
  532.                                 Random fuelChosen = new Random();
  533.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List4.length);
  534.                                 fuel_Chosen = fuel_List4[fuelChosen_index];
  535.                             } case "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)" -> {
  536.                                 String[] fuel_List6 = {"H2 (Hydrogen)"};
  537.                                 Collections.shuffle(Arrays.asList(fuel_List6));
  538.                                 Random fuelChosen = new Random();
  539.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List6.length);
  540.                                 fuel_Chosen = fuel_List6[fuelChosen_index];
  541.                             }
  542.                         }
  543.                         Collections.shuffle(Arrays.asList(tank_Repressurisation));
  544.                         Random tankRepressurisationChosen = new Random();
  545.                         int tankRepressurisationChosen_index = tankRepressurisationChosen.nextInt(tank_Repressurisation.length);
  546.                         String tank_Repressurisation_Chosen = tank_Repressurisation[tankRepressurisationChosen_index];
  547.  
  548.                         Collections.shuffle(Arrays.asList(altitude_Of_Operation));
  549.                         Random altitudeOfOperationChosen = new Random();
  550.                         int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
  551.                         String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
  552.  
  553.                         String nozzle_Type_Chosen = bussy(altitude_Of_Operation_Chosen);
  554.  
  555.                         String[] cooling_mechanism = {"Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling",
  556.                                 "Regenerative Cooling", "Transpiration Cooling"};
  557.                         Collections.shuffle(Arrays.asList(cooling_mechanism));
  558.                         Random coolingMechanismChosen = new Random();
  559.                         int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
  560.                         String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
  561.  
  562.                         // Beautiful Part (Least non-ugly)
  563.                         output_def(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen,
  564.                                 altitude_Of_Operation_Chosen, nozzle_Type_Chosen, tank_Repressurisation_Chosen, cooling_Mechanism_Chosen);
  565.                     }
  566.  
  567.                     case "Staged Combustion (Oxidizer Rich)" -> {
  568.                         String[] oxidizer_List4 = {"O2 (Oxygen)", "N2H4 (Hydrazine)", "O3 (Ozone)", "N2O4 (Nitrogen Tetroxide)"};
  569.                         Collections.shuffle(Arrays.asList(oxidizer_List4));
  570.                         Random oxidizerChosen = new Random();
  571.                         int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List4.length);
  572.                         String oxidizer_Chosen = oxidizer_List4[oxidizerChosen_index];
  573.  
  574.                         String fuel_Chosen = "";
  575.                         switch (oxidizer_Chosen) {
  576.                             case "O2 (Oxygen)", "O3 (Ozone)" -> {
  577.                                 String[] fuel_List4 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  578.                                         "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  579.                                         "CH3OH (Methanol)"};
  580.                                 Collections.shuffle(Arrays.asList(fuel_List4));
  581.                                 Random fuelChosen = new Random();
  582.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List4.length);
  583.                                 fuel_Chosen = fuel_List4[fuelChosen_index];
  584.                             } case "N2H4 (Hydrazine)", "N2O4 (Nitrogen Tetroxide)" -> {
  585.                                 String[] fuel_List7 = {"C6H5NH2 (Aniline)", "75% CH6N2 + 25% N2H4 (UH-25)", "50% CH6N2 + 50% N2H4 (Aerosine-50)",
  586.                                         "C2H8N2 (UnsymetricalDimethylHydrazine)"};
  587.                                 Collections.shuffle(Arrays.asList(fuel_List7));
  588.                                 Random fuelChosen = new Random();
  589.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List7.length);
  590.                                 fuel_Chosen = fuel_List7[fuelChosen_index];
  591.                             }
  592.                         }
  593.                         Collections.shuffle(Arrays.asList(tank_Repressurisation));
  594.                         Random tankRepressurisationChosen = new Random();
  595.                         int tankRepressurisationChosen_index = tankRepressurisationChosen.nextInt(tank_Repressurisation.length);
  596.                         String tank_Repressurisation_Chosen = tank_Repressurisation[tankRepressurisationChosen_index];
  597.  
  598.                         Collections.shuffle(Arrays.asList(altitude_Of_Operation));
  599.                         Random altitudeOfOperationChosen = new Random();
  600.                         int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
  601.                         String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
  602.  
  603.                         String nozzle_Type_Chosen = bussy(altitude_Of_Operation_Chosen);
  604.  
  605.                         String[] cooling_mechanism = {"Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling",
  606.                                 "Regenerative Cooling", "Transpiration Cooling"};
  607.                         Collections.shuffle(Arrays.asList(cooling_mechanism));
  608.                         Random coolingMechanismChosen = new Random();
  609.                         int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
  610.                         String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
  611.  
  612.                         // Beautiful Part (Least non-ugly)
  613.                         output_def(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen,
  614.                                 altitude_Of_Operation_Chosen, nozzle_Type_Chosen, tank_Repressurisation_Chosen, cooling_Mechanism_Chosen);
  615.                     }
  616.  
  617.                     case "Full Flow Staged Combustion", "Combustion Tap Off" -> {
  618.                         String[] oxidizer_List4 = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)",
  619.                                 "N2H4 (Hydrazine)", "O3 (Ozone)", "N2O4 (Nitrogen Tetroxide)"};
  620.                         Collections.shuffle(Arrays.asList(oxidizer_List4));
  621.                         Random oxidizerChosen = new Random();
  622.                         int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List4.length);
  623.                         String oxidizer_Chosen = oxidizer_List4[oxidizerChosen_index];
  624.  
  625.                         String fuel_Chosen = "";
  626.                         switch (oxidizer_Chosen) {
  627.                             case "O2 (Oxygen)" -> {
  628.                                 String[] fuel_List4 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  629.                                         "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  630.                                         "CH3OH (Methanol)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
  631.                                 Collections.shuffle(Arrays.asList(fuel_List4));
  632.                                 Random fuelChosen = new Random();
  633.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List4.length);
  634.                                 fuel_Chosen = fuel_List4[fuelChosen_index];
  635.                             } case "F2 (Fluorine)" -> {
  636.                                 String[] fuel_List5 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  637.                                         "NH3 (Ammonia)", "C2H8N2 (UnsymetricalDimethylHydrazine)", "CH6N2 (MonomethylHydrazine)",
  638.                                         "N2H4 (Hydrazine)", "CH3OH (Methanol)"};
  639.                                 Collections.shuffle(Arrays.asList(fuel_List5));
  640.                                 Random fuelChosen = new Random();
  641.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List5.length);
  642.                                 fuel_Chosen = fuel_List5[fuelChosen_index];
  643.                             } case "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)" -> {
  644.                                 String[] fuel_List6 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  645.                                         "C6H5NH2 (Aniline)", "75% CH6N2 + 25% N2H4 (UH-25)", "50% CH6N2 + 50% N2H4 (Aerosine-50)",
  646.                                         "CH6N2 (MonomethylHydrazine)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
  647.                                 Collections.shuffle(Arrays.asList(fuel_List6));
  648.                                 Random fuelChosen = new Random();
  649.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List6.length);
  650.                                 fuel_Chosen = fuel_List6[fuelChosen_index];
  651.                             } case "N2H4 (Hydrazine)", "N2O4 (Nitrogen Tetroxide)" -> {
  652.                                 String[] fuel_List7 = {"H2 (Hydrogen)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  653.                                         "C6H5NH2 (Aniline)", "75% CH6N2 + 25% N2H4 (UH-25)", "50% CH6N2 + 50% N2H4 (Aerosine-50)",
  654.                                         "C2H8N2 (UnsymetricalDimethylHydrazine)", "CH3OH (Methanol)", "B2H6 (Diborane)"};
  655.                                 Collections.shuffle(Arrays.asList(fuel_List7));
  656.                                 Random fuelChosen = new Random();
  657.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List7.length);
  658.                                 fuel_Chosen = fuel_List7[fuelChosen_index];
  659.                             }
  660.                         }
  661.                         Collections.shuffle(Arrays.asList(tank_Repressurisation));
  662.                         Random tankRepressurisationChosen = new Random();
  663.                         int tankRepressurisationChosen_index = tankRepressurisationChosen.nextInt(tank_Repressurisation.length);
  664.                         String tank_Repressurisation_Chosen = tank_Repressurisation[tankRepressurisationChosen_index];
  665.  
  666.                         Collections.shuffle(Arrays.asList(altitude_Of_Operation));
  667.                         Random altitudeOfOperationChosen = new Random();
  668.                         int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
  669.                         String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
  670.  
  671.                         String nozzle_Type_Chosen = bussy(altitude_Of_Operation_Chosen);
  672.  
  673.                         String[] cooling_mechanism = {"Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling",
  674.                                 "Regenerative Cooling", "Transpiration Cooling"};
  675.                         Collections.shuffle(Arrays.asList(cooling_mechanism));
  676.                         Random coolingMechanismChosen = new Random();
  677.                         int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
  678.                         String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
  679.  
  680.                         // Beautiful Part (Least non-ugly)
  681.                         output_def(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen,
  682.                                 altitude_Of_Operation_Chosen, nozzle_Type_Chosen, tank_Repressurisation_Chosen, cooling_Mechanism_Chosen);
  683.                     }
  684.  
  685.                     default -> {
  686.                         String[] oxidizer_List6 = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)",
  687.                                 "N2O4 (Nitrogen Tetroxide)", "N2H4 (Hydrazine)", "H2O2 (Hydrogen Peroxide) 95%",
  688.                                 "H2O2 (Hydrogen Peroxide) 85%", "O3 (Ozone)", "AK20F: 80% HNO3 + 20% N2O4 (Nitric Acid)",
  689.                                 "AK20I: 80% HNO3 + 20% N2O4 (Nitric Acid)", "AK20K: 80% HNO3 + 20% N2O4 (Nitric Acid)",
  690.                                 "AK27I: 73% HNO3 + 27% N2O4 (Nitric Acid)", "AK27P: 73% HNO3 + 27% N2O4 (Nitric Acid)",
  691.                                 "ClF3 (Chlorine Trifluoride)", "ClF5 (Chlorine Pentafluoride)"};
  692.                         Collections.shuffle(Arrays.asList(oxidizer_List6));
  693.                         Random oxidizerChosen = new Random();
  694.                         int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List6.length);
  695.                         String oxidizer_Chosen = oxidizer_List6[oxidizerChosen_index];
  696.  
  697.                         String fuel_Chosen = "";
  698.                         switch (oxidizer_Chosen) {
  699.                             case "O2 (Oxygen)" -> {
  700.                                 String[] fuel_List8 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  701.                                         "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "CH6N2 (MonomethylHydrazine)",
  702.                                         "N2H4 (Hydrazine)", "CH3OH (Methanol)", "C12H24 (Kerosene)", "B2H6 (Diborane)", "B5H9 (Pentaborane)",
  703.                                         "C2H6 (Ethane)"};
  704.                                 Collections.shuffle(Arrays.asList(fuel_List8));
  705.                                 Random fuelChosen = new Random();
  706.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List8.length);
  707.                                 fuel_Chosen = fuel_List8[fuelChosen_index];
  708.                             } case "F2 (Fluorine)" -> {
  709.                                 String[] fuel_List9 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  710.                                         "C6H5NH2 (Aniline)", "NH3 (Ammonia)",
  711.                                         "C2H8N2 (UnsymetricalDimethylHydrazine)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  712.                                         "CH3OH (Methanol)", "C12H24 (Kerosene)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
  713.                                 Collections.shuffle(Arrays.asList(fuel_List9));
  714.                                 Random fuelChosen = new Random();
  715.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List9.length);
  716.                                 fuel_Chosen = fuel_List9[fuelChosen_index];
  717.                             } case "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)" -> {
  718.                                 String[] fuel_List10 = {"H2 (Hydrogen)", "CH3OH (Methanol)", "C12H24 (Kerosene)", "B2H6 (Diborane)",
  719.                                         "B5H9 (Pentaborane)"};
  720.                                 Collections.shuffle(Arrays.asList(fuel_List10));
  721.                                 Random fuelChosen = new Random();
  722.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List10.length);
  723.                                 fuel_Chosen = fuel_List10[fuelChosen_index];
  724.                             } case "AK20F: 80% HNO3 + 20% N2O4 (Nitric Acid)", "AK20I: 80% HNO3 + 20% N2O4 (Nitric Acid)",
  725.                                     "AK20K: 80% HNO3 + 20% N2O4 (Nitric Acid)", "AK27I: 73% HNO3 + 27% N2O4 (Nitric Acid)",
  726.                                     "AK27P: 73% HNO3 + 27% N2O4 (Nitric Acid)", "ClF3 (Chlorine Trifluoride)",
  727.                                     "ClF5 (Chlorine Pentafluoride)" -> {
  728.                                 String[] fuel_List11 = {"C2H5OH(Ethanol) 85%", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  729.                                         "CH3OH (Methanol)"};
  730.                                 Collections.shuffle(Arrays.asList(fuel_List11));
  731.                                 Random fuelChosen = new Random();
  732.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List11.length);
  733.                                 fuel_Chosen = fuel_List11[fuelChosen_index];
  734.                             } case "N2O4 (Nitrogen Tetroxide)", "H2O2 (Hydrogen Peroxide) 95%", "H2O2 (Hydrogen Peroxide) 85%" -> {
  735.                                 String[] fuel_List12 = {"H2 (Hydrogen)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  736.                                         "C6H5NH2 (Aniline)", "75% CH6N2 + 25% N2H4 (UH-25)", "50% CH6N2 + 50% N2H4 (Aerosine-50)",
  737.                                         "C2H8N2 (UnsymmetricalDimethylHydrazine)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  738.                                         "CH3OH (Methanol)", "C12H24 (Kerosene)"};
  739.                                 Collections.shuffle(Arrays.asList(fuel_List12));
  740.                                 Random fuelChosen = new Random();
  741.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List12.length);
  742.                                 fuel_Chosen = fuel_List12[fuelChosen_index];
  743.                             } case "N2H4 (Hydrazine)" -> {
  744.                                 String[] fuel_List13 = {"B2H6 (Diborane)", "B5H9 (Pentaborane)"};
  745.                                 Collections.shuffle(Arrays.asList(fuel_List13));
  746.                                 Random fuelChosen = new Random();
  747.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List13.length);
  748.                                 fuel_Chosen = fuel_List13[fuelChosen_index];
  749.                             }
  750.                         }
  751.  
  752.                         Collections.shuffle(Arrays.asList(tank_Repressurisation));
  753.                         Random tankRepressurisationChosen = new Random();
  754.                         int tankRepressurisationChosen_index = tankRepressurisationChosen.nextInt(tank_Repressurisation.length);
  755.                         String tank_Repressurisation_Chosen = tank_Repressurisation[tankRepressurisationChosen_index];
  756.  
  757.                         Collections.shuffle(Arrays.asList(altitude_Of_Operation));
  758.                         Random altitudeOfOperationChosen = new Random();
  759.                         int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
  760.                         String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
  761.  
  762.                         String nozzle_Type_Chosen = bussy(altitude_Of_Operation_Chosen);
  763.  
  764.                         String[] cooling_mechanism = {"Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling",
  765.                                 "Regenerative Cooling", "Transpiration Cooling"};
  766.                         Collections.shuffle(Arrays.asList(cooling_mechanism));
  767.                         Random coolingMechanismChosen = new Random();
  768.                         int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
  769.                         String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
  770.  
  771.                         // Beautiful Part (Least non-ugly)
  772.                         output_def(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen, altitude_Of_Operation_Chosen,
  773.                                 nozzle_Type_Chosen, tank_Repressurisation_Chosen, cooling_Mechanism_Chosen);
  774.                     }
  775.                 }
  776.             } else {
  777.                 while (!(repeatCommand.equalsIgnoreCase("Y") && repeatCommand.equalsIgnoreCase("N"))) {
  778.                     System.out.println("Wrong input! Input must be either [Y/N] or [Yes/No]");
  779.                     System.out.print("> ");
  780.                     repeatCommand = scanner.next();
  781.                     if (repeatCommand.equalsIgnoreCase("Y") || repeatCommand.equalsIgnoreCase("N") || repeatCommand.equalsIgnoreCase("YES") || repeatCommand.equalsIgnoreCase("NO")) {
  782.                         break;
  783.                     }
  784.                 }
  785.             }
  786.         }
  787.     }
  788.     public static String bussy (String altitude_Of_Operation_Chosen) {
  789.         String nozzle_Type_Chosen = null;
  790.         switch (altitude_Of_Operation_Chosen) {
  791.             case "0-10 km (Sea Level)" -> {
  792.                 String[] nozzle_Type_List_SL = {"De Laval Cone (Without Nozzle Extension)",
  793.                         "De Laval Bell (Without Nozzle Extension)"};
  794.                 Collections.shuffle(Arrays.asList(nozzle_Type_List_SL));
  795.                 Random nozzleTypeSLspikeChosen = new Random();
  796.                 int nozzleTypeSLspikeChosen_index = nozzleTypeSLspikeChosen.nextInt(nozzle_Type_List_SL.length);
  797.                 nozzle_Type_Chosen = nozzle_Type_List_SL[nozzleTypeSLspikeChosen_index];
  798.             } case "20-30 km (Medium Atmosphere)" -> {
  799.                 String[] nozzle_Type_List_HA = {"De Laval Bell (Without Nozzle Extension)", "De Laval Cone (With Nozzle Extension)",
  800.                         "De Laval Bell (With Nozzle Extension)", "Dual Bell Nozzle"};
  801.                 Collections.shuffle(Arrays.asList(nozzle_Type_List_HA));
  802.                 Random nozzleTypeHAspikeChosen = new Random();
  803.                 int nozzleTypeHAspikeChosen_index = nozzleTypeHAspikeChosen.nextInt(nozzle_Type_List_HA.length);
  804.                 nozzle_Type_Chosen = nozzle_Type_List_HA[nozzleTypeHAspikeChosen_index];
  805.             } case "30-80 km (High Atmosphere)" -> {
  806.                 String[] nozzle_Type_List_HAi = {"De Laval Cone (With Nozzle Extension)", "De Laval Bell (With Nozzle Extension)",
  807.                         "Dual Bell Nozzle"};
  808.                 Collections.shuffle(Arrays.asList(nozzle_Type_List_HAi));
  809.                 Random nozzleTypeHAispikeChosen = new Random();
  810.                 int nozzleTypeHAispikeChosen_index = nozzleTypeHAispikeChosen.nextInt(nozzle_Type_List_HAi.length);
  811.                 nozzle_Type_Chosen = nozzle_Type_List_HAi[nozzleTypeHAispikeChosen_index];
  812.             } case "80 km+ (Vacuum)" -> {
  813.                 String[] nozzle_Type_List_VA = {"De Laval Cone (With Nozzle Extension)",
  814.                         "De Laval Bell (With Nozzle Extension)", "Expanding Nozzle"};
  815.                 Collections.shuffle(Arrays.asList(nozzle_Type_List_VA));
  816.                 Random nozzleTypeVAspikeChosen = new Random();
  817.                 int nozzleTypeVAspikeChosen_index = nozzleTypeVAspikeChosen.nextInt(nozzle_Type_List_VA.length);
  818.                 nozzle_Type_Chosen = nozzle_Type_List_VA[nozzleTypeVAspikeChosen_index];
  819.             } case "Any Altitude (0-80 km+)" -> {
  820.                 String[] nozzle_Type_List_Aero = {"Linear Aerospike Nozzle", "Toroidal Aerospike Nozzle", "Expansion-Deflection Nozzle"};
  821.                 Collections.shuffle(Arrays.asList(nozzle_Type_List_Aero));
  822.                 Random nozzleTypeAerospikeChosen = new Random();
  823.                 int nozzleTypeAerospikeChosen_index = nozzleTypeAerospikeChosen.nextInt(nozzle_Type_List_Aero.length);
  824.                 nozzle_Type_Chosen = nozzle_Type_List_Aero[nozzleTypeAerospikeChosen_index];
  825.             }
  826.         }
  827.         return nozzle_Type_Chosen;
  828.     }
  829.     public static String ass_crack(String[] engine_Name1, String[] firstPart) {
  830.         String engine_Name;
  831.         Collections.shuffle(Arrays.asList(engine_Name1));
  832.         Collections.shuffle(Arrays.asList(firstPart));
  833.         Random engineNameChosen = new Random();
  834.         Random firstPartC = new Random();
  835.         int engineNameChosen_index = engineNameChosen.nextInt(engine_Name1.length);
  836.         int firstPart_index = firstPartC.nextInt(firstPart.length);
  837.         String engNameFinalf = " " + engine_Name1[engineNameChosen_index];
  838.         String firstPart_f = firstPart[firstPart_index] + "-";
  839.         int finalNumber = 12 + ((int) (Math.random() * 1001));
  840.         if (finalNumber % 8 == 0) {
  841.             engine_Name = firstPart_f + finalNumber + engNameFinalf;
  842.         } else {
  843.             char randomizedCharacter;
  844.             int uio93 = 1 + ((int) (Math.random() * 1001));
  845.             int uio94 = 1 + ((int) (Math.random() * 11));
  846.             Random randomLetter = new Random();
  847.             if (uio93 % uio94 == 0) {
  848.                 randomizedCharacter = (char) (randomLetter.nextInt(26) + 'a');
  849.                 while (randomizedCharacter == 'o' || randomizedCharacter == 'i' || randomizedCharacter == 'q' || randomizedCharacter == 'e' || randomizedCharacter == 'h' || randomizedCharacter == 'g' || randomizedCharacter == 'c' || randomizedCharacter == 'j') {
  850.                     randomizedCharacter = (char) (randomLetter.nextInt(26) + 'a');
  851.                     if (randomizedCharacter == 'o' || randomizedCharacter == 'i' || randomizedCharacter == 'q' || randomizedCharacter == 'e' || randomizedCharacter == 'h' || randomizedCharacter == 'g' || randomizedCharacter == 'c' || randomizedCharacter == 'j') {
  852.                         break;
  853.                     }
  854.                 }
  855.             } else {
  856.                 randomizedCharacter = (char) (randomLetter.nextInt(26) + 'A');
  857.                 while (randomizedCharacter == 'O' || randomizedCharacter == 'I' || randomizedCharacter == 'Q') {
  858.                     randomizedCharacter = (char) (randomLetter.nextInt(26) + 'A');
  859.                     if (randomizedCharacter == 'O' || randomizedCharacter == 'I' || randomizedCharacter == 'Q') {
  860.                         break;
  861.                     }
  862.                 }
  863.             }
  864.             engine_Name = firstPart_f + finalNumber + randomizedCharacter + engNameFinalf;
  865.         }
  866.         return engine_Name;
  867.     }
  868.     public static void output_monod(String ENN, String ECC, String AOOC, String PLC, String NTLC, String CMC, String CCC) throws IOException {
  869.         String lbrk = "========================================================================================";
  870.         File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/ofb_rex.docx");
  871.         System.out.println(lbrk + "\n" + "Your Engine is called: " + ENN + "\n");
  872.         System.out.println("Your Engine Cycle is: " + ECC);
  873.         System.out.println("Your Propellant is: " + PLC);
  874.         System.out.println("Your Altitude of operation is: " + AOOC);
  875.         System.out.println("Your engine's nozzle type should be : " + NTLC);
  876.         System.out.println("The Cooling Mechanism to be used would be " + CMC);
  877.         System.out.println("Your engine's catalyst is : " + CCC + '\n');
  878.         XWPFDocument docx = new XWPFDocument();
  879.         if (new File(String.valueOf(pathn1)).exists()) {
  880.             FileInputStream jesus = new FileInputStream(String.valueOf(pathn1));
  881.             docx = new XWPFDocument(jesus);
  882.         }
  883.         XWPFParagraph par = docx.createParagraph();
  884.         XWPFRun run = par.createRun();
  885.         run.setFontSize(12);
  886.         run.setBold(true);
  887.         run.setFontFamily("Arial");
  888.         run.setText("Your Engine is called: ");
  889.         run.setTextPosition(15);
  890.         XWPFRun run2 = par.createRun();
  891.         run2.setFontSize(12);
  892.         run.setBold(true);
  893.         run2.setFontFamily("Arial");
  894.         run2.setText(ENN);
  895.         run2.setTextPosition(15);
  896.         run2.addBreak();
  897.         // -----------------------------------------------------------
  898.         XWPFRun run3 = par.createRun();
  899.         run3.setFontSize(10);
  900.         run3.setBold(true);
  901.         run3.setFontFamily("Arial");
  902.         run3.setText("Your Engine Cycle is: ");
  903.         XWPFRun run4 = par.createRun();
  904.         run4.setFontSize(10);
  905.         run4.setFontFamily("Arial");
  906.         run4.setText(ECC);
  907.         run4.addBreak();
  908.         // -----------------------------------------------------------
  909.         XWPFRun run5 = par.createRun();
  910.         run5.setFontSize(10);
  911.         run5.setBold(true);
  912.         run5.setFontFamily("Arial");
  913.         run5.setText("Your Propellant is: ");
  914.         XWPFRun run6 = par.createRun();
  915.         run6.setFontSize(10);
  916.         run6.setFontFamily("Arial");
  917.         run6.setText(PLC);
  918.         run6.addBreak();
  919.         // -----------------------------------------------------------
  920.         XWPFRun run9 = par.createRun();
  921.         run9.setFontSize(10);
  922.         run9.setBold(true);
  923.         run9.setFontFamily("Arial");
  924.         run9.setText("Your engine's nozzle type should be: ");
  925.         XWPFRun run0 = par.createRun();
  926.         run0.setFontSize(10);
  927.         run0.setFontFamily("Arial");
  928.         run0.setText(NTLC);
  929.         run0.addBreak();
  930.         // -----------------------------------------------------------
  931.         XWPFRun run10 = par.createRun();
  932.         run10.setFontSize(10);
  933.         run10.setBold(true);
  934.         run10.setFontFamily("Arial");
  935.         run10.setText("Your Altitude of operation is: ");
  936.         XWPFRun run23 = par.createRun();
  937.         run23.setFontSize(10);
  938.         run23.setFontFamily("Arial");
  939.         run23.setText(AOOC);
  940.         run23.addBreak();
  941.         // -----------------------------------------------------------
  942.         XWPFRun run13 = par.createRun();
  943.         run13.setFontSize(10);
  944.         run13.setBold(true);
  945.         run13.setFontFamily("Arial");
  946.         run13.setText("The Cooling Mechanism to be used would be ");
  947.         XWPFRun run14 = par.createRun();
  948.         run14.setFontSize(10);
  949.         run14.setBold(true);
  950.         run14.setFontFamily("Arial");
  951.         run14.setText(CMC);
  952.         run14.addBreak();
  953.         // -----------------------------------------------------------
  954.         XWPFRun run15 = par.createRun();
  955.         run15.setFontSize(10);
  956.         run15.setBold(true);
  957.         run15.setFontFamily("Arial");
  958.         run15.setText("Your engine's catalyst is : ");
  959.         XWPFRun run16 = par.createRun();
  960.         run16.setFontSize(10);
  961.         run16.setBold(true);
  962.         run16.setFontFamily("Arial");
  963.         run16.setText(CCC);
  964.         run16.addBreak();
  965.         run16.addBreak();
  966.         // -----------------------------------------------------------
  967.         try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  968.             docx.write(out);
  969.         }
  970.     }
  971.     public static void output_mono(String ENN, String ECC, String AOOC, String PLC, String NTLC, String CMC) throws IOException {
  972.         String lbrk = "========================================================================================";
  973.         File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/ofb_rex.docx");
  974.         System.out.println(lbrk + "\n" + "Your Engine is called: " + ENN + "\n");
  975.         System.out.println("Your Engine Cycle is: " + ECC);
  976.         System.out.println("Your Propellant is: " + PLC);
  977.         System.out.println("Your Altitude of operation is: " + AOOC);
  978.         System.out.println("Your engine's nozzle type should be : " + NTLC);
  979.         System.out.println("The Cooling Mechanism to be used would be " + CMC + '\n');
  980.         XWPFDocument docx = new XWPFDocument();
  981.         if (new File(String.valueOf(pathn1)).exists()) {
  982.             FileInputStream jesus = new FileInputStream(String.valueOf(pathn1));
  983.             docx = new XWPFDocument(jesus);
  984.         }
  985.         XWPFParagraph par = docx.createParagraph();
  986.         XWPFRun run = par.createRun();
  987.         run.setFontSize(12);
  988.         run.setBold(true);
  989.         run.setFontFamily("Arial");
  990.         run.setText("Your Engine is called: ");
  991.         run.setTextPosition(15);
  992.         XWPFRun run2 = par.createRun();
  993.         run2.setFontSize(12);
  994.         run.setBold(true);
  995.         run2.setFontFamily("Arial");
  996.         run2.setText(ENN);
  997.         run2.setTextPosition(15);
  998.         run2.addBreak();
  999.         // -----------------------------------------------------------
  1000.         XWPFRun run3 = par.createRun();
  1001.         run3.setFontSize(10);
  1002.         run3.setBold(true);
  1003.         run3.setFontFamily("Arial");
  1004.         run3.setText("Your Engine Cycle is: ");
  1005.         XWPFRun run4 = par.createRun();
  1006.         run4.setFontSize(10);
  1007.         run4.setFontFamily("Arial");
  1008.         run4.setText(ECC);
  1009.         run4.addBreak();
  1010.         // -----------------------------------------------------------
  1011.         XWPFRun run5 = par.createRun();
  1012.         run5.setFontSize(10);
  1013.         run5.setBold(true);
  1014.         run5.setFontFamily("Arial");
  1015.         run5.setText("Your Propellant is: ");
  1016.         XWPFRun run6 = par.createRun();
  1017.         run6.setFontSize(10);
  1018.         run6.setFontFamily("Arial");
  1019.         run6.setText(PLC);
  1020.         run6.addBreak();
  1021.         // -----------------------------------------------------------
  1022.         XWPFRun run9 = par.createRun();
  1023.         run9.setFontSize(10);
  1024.         run9.setBold(true);
  1025.         run9.setFontFamily("Arial");
  1026.         run9.setText("Your engine's nozzle type should be: ");
  1027.         XWPFRun run0 = par.createRun();
  1028.         run0.setFontSize(10);
  1029.         run0.setFontFamily("Arial");
  1030.         run0.setText(NTLC);
  1031.         run0.addBreak();
  1032.         // -----------------------------------------------------------
  1033.         XWPFRun run10 = par.createRun();
  1034.         run10.setFontSize(10);
  1035.         run10.setBold(true);
  1036.         run10.setFontFamily("Arial");
  1037.         run10.setText("Your Altitude of operation is: ");
  1038.         XWPFRun run23 = par.createRun();
  1039.         run23.setFontSize(10);
  1040.         run23.setFontFamily("Arial");
  1041.         run23.setText(AOOC);
  1042.         run23.addBreak();
  1043.         // -----------------------------------------------------------
  1044.         XWPFRun run13 = par.createRun();
  1045.         run13.setFontSize(10);
  1046.         run13.setBold(true);
  1047.         run13.setFontFamily("Arial");
  1048.         run13.setText("The Cooling Mechanism to be used would be ");
  1049.         XWPFRun run14 = par.createRun();
  1050.         run14.setFontSize(10);
  1051.         run14.setBold(true);
  1052.         run14.setFontFamily("Arial");
  1053.         run14.setText(CMC);
  1054.         run14.addBreak();
  1055.         run14.addBreak();
  1056.         // -----------------------------------------------------------
  1057.         try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  1058.             docx.write(out);
  1059.         }
  1060.     }
  1061.     public static void output_ex(String ENN, String ECC, String OCC, String FCC, String AOOC, String NTC, String TRR, String CMC) throws IOException {
  1062.         String lbrk = "========================================================================================";
  1063.         File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/ofb_rex.docx");
  1064.         System.out.println(lbrk + "\n" + "Your Engine is called: " + ENN + "\n");
  1065.         System.out.println("Your Engine Cycle is: " + ECC);
  1066.         System.out.println("Your Oxidizer is: " + OCC);
  1067.         System.out.println("Your Fuel is: " + FCC);
  1068.         System.out.println("Your Altitude of operation is: " + AOOC);
  1069.         System.out.println("Your engine's nozzle type should be : " + NTC);
  1070.         System.out.println("Tank repressurisation would be done " + TRR);
  1071.         System.out.println("The Cooling Mechanism to be used would be " + CMC + '\n');
  1072.  
  1073.         XWPFDocument docx = new XWPFDocument();
  1074.         if (new File(String.valueOf(pathn1)).exists()) {
  1075.             FileInputStream jesus = new FileInputStream(String.valueOf(pathn1));
  1076.             docx = new XWPFDocument(jesus);
  1077.         }
  1078.         XWPFParagraph par = docx.createParagraph();
  1079.         XWPFRun run = par.createRun();
  1080.         run.setFontSize(12);
  1081.         run.setBold(true);
  1082.         run.setFontFamily("Arial");
  1083.         run.setText("Your Engine is called: ");
  1084.         run.setTextPosition(15);
  1085.         XWPFRun run2 = par.createRun();
  1086.         run2.setFontSize(12);
  1087.         run.setBold(true);
  1088.         run2.setFontFamily("Arial");
  1089.         run2.setText(ENN);
  1090.         run2.setTextPosition(15);
  1091.         run2.addBreak();
  1092.         // -----------------------------------------------------------
  1093.         XWPFRun run3 = par.createRun();
  1094.         run3.setFontSize(10);
  1095.         run3.setBold(true);
  1096.         run3.setFontFamily("Arial");
  1097.         run3.setText("Your Engine Cycle is: ");
  1098.         XWPFRun run4 = par.createRun();
  1099.         run4.setFontSize(10);
  1100.         run4.setFontFamily("Arial");
  1101.         run4.setText(ECC);
  1102.         run4.addBreak();
  1103.         // -----------------------------------------------------------
  1104.         XWPFRun run5 = par.createRun();
  1105.         run5.setFontSize(10);
  1106.         run5.setBold(true);
  1107.         run5.setFontFamily("Arial");
  1108.         run5.setText("Your Oxidizer is: ");
  1109.         XWPFRun run6 = par.createRun();
  1110.         run6.setFontSize(10);
  1111.         run6.setFontFamily("Arial");
  1112.         run6.setText(OCC);
  1113.         run6.addBreak();
  1114.         // -----------------------------------------------------------
  1115.         XWPFRun run8 = par.createRun();
  1116.         run8.setFontSize(10);
  1117.         run8.setBold(true);
  1118.         run8.setFontFamily("Arial");
  1119.         run8.setText("Your Fuel is: ");
  1120.         XWPFRun run7 = par.createRun();
  1121.         run7.setFontSize(10);
  1122.         run7.setFontFamily("Arial");
  1123.         run7.setText(FCC);
  1124.         run7.addBreak();
  1125.         // -----------------------------------------------------------
  1126.         XWPFRun run9 = par.createRun();
  1127.         run9.setFontSize(10);
  1128.         run9.setBold(true);
  1129.         run9.setFontFamily("Arial");
  1130.         run9.setText("Your engine's nozzle type should be: ");
  1131.         XWPFRun run0 = par.createRun();
  1132.         run0.setFontSize(10);
  1133.         run0.setFontFamily("Arial");
  1134.         run0.setText(NTC);
  1135.         run0.addBreak();
  1136.         // -----------------------------------------------------------
  1137.         XWPFRun run10 = par.createRun();
  1138.         run10.setFontSize(10);
  1139.         run10.setBold(true);
  1140.         run10.setFontFamily("Arial");
  1141.         run10.setText("Your Altitude of operation is: ");
  1142.         XWPFRun run23 = par.createRun();
  1143.         run23.setFontSize(10);
  1144.         run23.setFontFamily("Arial");
  1145.         run23.setText(AOOC);
  1146.         run23.addBreak();
  1147.         // -----------------------------------------------------------
  1148.         XWPFRun run11 = par.createRun();
  1149.         run11.setFontSize(10);
  1150.         run11.setBold(true);
  1151.         run11.setFontFamily("Arial");
  1152.         run11.setText("Tank repressurisation would be done ");
  1153.         XWPFRun run12 = par.createRun();
  1154.         run12.setFontSize(10);
  1155.         run12.setBold(true);
  1156.         run12.setFontFamily("Arial");
  1157.         run12.setText(TRR);
  1158.         run12.addBreak();
  1159.         // -----------------------------------------------------------
  1160.         XWPFRun run13 = par.createRun();
  1161.         run13.setFontSize(10);
  1162.         run13.setBold(true);
  1163.         run13.setFontFamily("Arial");
  1164.         run13.setText("The Cooling Mechanism to be used would be ");
  1165.         XWPFRun run14 = par.createRun();
  1166.         run14.setFontSize(10);
  1167.         run14.setBold(true);
  1168.         run14.setFontFamily("Arial");
  1169.         run14.setText(CMC);
  1170.         run14.addBreak();
  1171.         run14.addBreak();
  1172.         // -----------------------------------------------------------
  1173.         try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  1174.             docx.write(out);
  1175.         }
  1176.     }
  1177.     public static void output_nt(String ENN, String ECC, String AOOC, String NCC, String PLC, String RFC, String NTLC,
  1178.                                  String TRC, String CMC) throws IOException {
  1179.         String lbrk = "========================================================================================";
  1180.         File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/ofb_rex.docx");
  1181.         System.out.println(lbrk + "\n" + "Your Engine is called: " + ENN + "\n");
  1182.         System.out.println("Your Engine Cycle is: " + NCC + " " + ECC);
  1183.         System.out.println("Your Propellant is: " + PLC);
  1184.         System.out.println("Your Reactor's Fuel is: " + RFC);
  1185.         System.out.println("Your Altitude of operation is: " + AOOC);
  1186.         System.out.println("Your engine's nozzle type should be : " + NTLC);
  1187.         System.out.println("Tank repressurisation would be done " + TRC);
  1188.         System.out.println("The Cooling Mechanism to be used would be " + CMC + '\n');
  1189.  
  1190.         XWPFDocument docx = new XWPFDocument();
  1191.         if (new File(String.valueOf(pathn1)).exists()) {
  1192.             FileInputStream jesus = new FileInputStream(String.valueOf(pathn1));
  1193.             docx = new XWPFDocument(jesus);
  1194.         }
  1195.         XWPFParagraph par = docx.createParagraph();
  1196.         XWPFRun run = par.createRun();
  1197.         run.setFontSize(12);
  1198.         run.setBold(true);
  1199.         run.setFontFamily("Arial");
  1200.         run.setText("Your Engine is called: ");
  1201.         run.setTextPosition(15);
  1202.         XWPFRun run2 = par.createRun();
  1203.         run2.setFontSize(12);
  1204.         run.setBold(true);
  1205.         run2.setFontFamily("Arial");
  1206.         run2.setText(ENN);
  1207.         run2.setTextPosition(15);
  1208.         run2.addBreak();
  1209.         // -----------------------------------------------------------
  1210.         XWPFRun run3 = par.createRun();
  1211.         run3.setFontSize(10);
  1212.         run3.setBold(true);
  1213.         run3.setFontFamily("Arial");
  1214.         run3.setText("Your Engine Cycle is: ");
  1215.         XWPFRun run4 = par.createRun();
  1216.         run4.setFontSize(10);
  1217.         run4.setFontFamily("Arial");
  1218.         run4.setText(NCC + " " + ECC);
  1219.         run4.addBreak();
  1220.         // -----------------------------------------------------------
  1221.         XWPFRun run5 = par.createRun();
  1222.         run5.setFontSize(10);
  1223.         run5.setBold(true);
  1224.         run5.setFontFamily("Arial");
  1225.         run5.setText("Your Propellant is: ");
  1226.         XWPFRun run6 = par.createRun();
  1227.         run6.setFontSize(10);
  1228.         run6.setFontFamily("Arial");
  1229.         run6.setText(PLC);
  1230.         run6.addBreak();
  1231.         // -----------------------------------------------------------
  1232.         XWPFRun run7 = par.createRun();
  1233.         run7.setFontSize(10);
  1234.         run7.setBold(true);
  1235.         run7.setFontFamily("Arial");
  1236.         run7.setText("Your Reactor's Fission Fuel is: ");
  1237.         XWPFRun run8 = par.createRun();
  1238.         run8.setFontSize(10);
  1239.         run8.setFontFamily("Arial");
  1240.         run8.setText(RFC);
  1241.         run8.addBreak();
  1242.         // -----------------------------------------------------------
  1243.         XWPFRun run9 = par.createRun();
  1244.         run9.setFontSize(10);
  1245.         run9.setBold(true);
  1246.         run9.setFontFamily("Arial");
  1247.         run9.setText("Your engine's nozzle type should be: ");
  1248.         XWPFRun run0 = par.createRun();
  1249.         run0.setFontSize(10);
  1250.         run0.setFontFamily("Arial");
  1251.         run0.setText(NTLC);
  1252.         run0.addBreak();
  1253.         // -----------------------------------------------------------
  1254.         XWPFRun run10 = par.createRun();
  1255.         run10.setFontSize(10);
  1256.         run10.setBold(true);
  1257.         run10.setFontFamily("Arial");
  1258.         run10.setText("Your Altitude of operation is: ");
  1259.         XWPFRun run23 = par.createRun();
  1260.         run23.setFontSize(10);
  1261.         run23.setFontFamily("Arial");
  1262.         run23.setText(AOOC);
  1263.         run23.addBreak();
  1264.         // ------------------------------------------------------------
  1265.         XWPFRun run11 = par.createRun();
  1266.         run11.setFontSize(10);
  1267.         run11.setBold(true);
  1268.         run11.setFontFamily("Arial");
  1269.         run11.setText("Tank repressurisation would be done ");
  1270.         XWPFRun run12 = par.createRun();
  1271.         run12.setFontSize(10);
  1272.         run12.setBold(true);
  1273.         run12.setFontFamily("Arial");
  1274.         run12.setText(TRC);
  1275.         run12.addBreak();
  1276.         // -----------------------------------------------------------
  1277.         XWPFRun run13 = par.createRun();
  1278.         run13.setFontSize(10);
  1279.         run13.setBold(true);
  1280.         run13.setFontFamily("Arial");
  1281.         run13.setText("The Cooling Mechanism to be used would be ");
  1282.         XWPFRun run14 = par.createRun();
  1283.         run14.setFontSize(10);
  1284.         run14.setBold(true);
  1285.         run14.setFontFamily("Arial");
  1286.         run14.setText(CMC);
  1287.         run14.addBreak();
  1288.         run14.addBreak();
  1289.         // -----------------------------------------------------------
  1290.         try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  1291.             docx.write(out);
  1292.         }
  1293.     }
  1294.     public static void output_et(String ENN, String ECC, String AOOC, String PLC, String NTLC, String CMC) throws IOException {
  1295.         String lbrk = "========================================================================================";
  1296.         File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/ofb_rex.docx");
  1297.         System.out.println(lbrk + "\n" + "Your Engine is called: " + ENN + "\n");
  1298.         System.out.println("Your Engine Cycle is: " + ECC);
  1299.         System.out.println("Your Propellant is: " + PLC);
  1300.         System.out.println("Your Altitude of operation is: " + AOOC);
  1301.         System.out.println("Your engine's nozzle type should be : " + NTLC);
  1302.         System.out.println("The Cooling Mechanism to be used would be " + CMC + '\n');
  1303.  
  1304.         XWPFDocument docx = new XWPFDocument();
  1305.         if (new File(String.valueOf(pathn1)).exists()) {
  1306.             FileInputStream jesus = new FileInputStream(String.valueOf(pathn1));
  1307.             docx = new XWPFDocument(jesus);
  1308.         }
  1309.         XWPFParagraph par = docx.createParagraph();
  1310.         XWPFRun run = par.createRun();
  1311.         run.setFontSize(12);
  1312.         run.setBold(true);
  1313.         run.setFontFamily("Arial");
  1314.         run.setText("Your Engine is called: ");
  1315.         run.setTextPosition(15);
  1316.         XWPFRun run2 = par.createRun();
  1317.         run2.setFontSize(12);
  1318.         run.setBold(true);
  1319.         run2.setFontFamily("Arial");
  1320.         run2.setText(ENN);
  1321.         run2.setTextPosition(15);
  1322.         run2.addBreak();
  1323.         // -----------------------------------------------------------
  1324.         XWPFRun run3 = par.createRun();
  1325.         run3.setFontSize(10);
  1326.         run3.setBold(true);
  1327.         run3.setFontFamily("Arial");
  1328.         run3.setText("Your Engine Cycle is: ");
  1329.         XWPFRun run4 = par.createRun();
  1330.         run4.setFontSize(10);
  1331.         run4.setFontFamily("Arial");
  1332.         run4.setText(ECC);
  1333.         run4.addBreak();
  1334.         // -----------------------------------------------------------
  1335.         XWPFRun run5 = par.createRun();
  1336.         run5.setFontSize(10);
  1337.         run5.setBold(true);
  1338.         run5.setFontFamily("Arial");
  1339.         run5.setText("Your Propellant is: ");
  1340.         XWPFRun run6 = par.createRun();
  1341.         run6.setFontSize(10);
  1342.         run6.setFontFamily("Arial");
  1343.         run6.setText(PLC);
  1344.         run6.addBreak();
  1345.         // -----------------------------------------------------------
  1346.         XWPFRun run9 = par.createRun();
  1347.         run9.setFontSize(10);
  1348.         run9.setBold(true);
  1349.         run9.setFontFamily("Arial");
  1350.         run9.setText("Your engine's nozzle type should be: ");
  1351.         XWPFRun run0 = par.createRun();
  1352.         run0.setFontSize(10);
  1353.         run0.setFontFamily("Arial");
  1354.         run0.setText(NTLC);
  1355.         run0.addBreak();
  1356.         // -----------------------------------------------------------
  1357.         XWPFRun run10 = par.createRun();
  1358.         run10.setFontSize(10);
  1359.         run10.setBold(true);
  1360.         run10.setFontFamily("Arial");
  1361.         run10.setText("Your Altitude of operation is: ");
  1362.         XWPFRun run23 = par.createRun();
  1363.         run23.setFontSize(10);
  1364.         run23.setFontFamily("Arial");
  1365.         run23.setText(AOOC);
  1366.         run23.addBreak();
  1367.         // -----------------------------------------------------------
  1368.         XWPFRun run13 = par.createRun();
  1369.         run13.setFontSize(10);
  1370.         run13.setBold(true);
  1371.         run13.setFontFamily("Arial");
  1372.         run13.setText("The Cooling Mechanism to be used would be ");
  1373.         XWPFRun run14 = par.createRun();
  1374.         run14.setFontSize(10);
  1375.         run14.setBold(true);
  1376.         run14.setFontFamily("Arial");
  1377.         run14.setText(CMC);
  1378.         run14.addBreak();
  1379.         run14.addBreak();
  1380.         // -----------------------------------------------------------
  1381.         try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  1382.             docx.write(out);
  1383.         }
  1384.     }
  1385.     public static void output_def(String ENN, String ECC, String OCC, String FCC, String AOOC, String NTC, String TRC, String CMC) throws IOException {
  1386.         String lbrk = "========================================================================================";
  1387.         File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/ofb_rex.docx");
  1388.         System.out.println(lbrk + "\n" + "Your Engine is called: " + ENN + "\n");
  1389.         System.out.println("Your Engine Cycle is: " + ECC);
  1390.         System.out.println("Your Oxidizer is: " + OCC);
  1391.         System.out.println("Your Fuel is: " + FCC);
  1392.         System.out.println("Your Altitude of operation is: " + AOOC);
  1393.         System.out.println("Your engine's nozzle type should be : " + NTC);
  1394.         System.out.println("Tank repressurisation would be done " + TRC);
  1395.         System.out.println("The Cooling Mechanism to be used would be " + CMC + '\n');
  1396.  
  1397.         XWPFDocument docx = new XWPFDocument();
  1398.         if (new File(String.valueOf(pathn1)).exists()) {
  1399.             docx = new XWPFDocument(new FileInputStream(String.valueOf(pathn1)));
  1400.         }
  1401.         XWPFParagraph par = docx.createParagraph();
  1402.         XWPFRun run = par.createRun();
  1403.         run.setFontSize(12);
  1404.         run.setBold(true);
  1405.         run.setFontFamily("Arial");
  1406.         run.setText("Your Engine is called: ");
  1407.         run.setTextPosition(15);
  1408.         XWPFRun run2 = par.createRun();
  1409.         run2.setFontSize(12);
  1410.         run.setBold(true);
  1411.         run2.setFontFamily("Arial");
  1412.         run2.setText(ENN);
  1413.         run2.setTextPosition(15);
  1414.         run2.addBreak();
  1415.         // -----------------------------------------------------------
  1416.         XWPFRun run3 = par.createRun();
  1417.         run3.setFontSize(10);
  1418.         run3.setBold(true);
  1419.         run3.setFontFamily("Arial");
  1420.         run3.setText("Your Engine Cycle is: ");
  1421.         XWPFRun run4 = par.createRun();
  1422.         run4.setFontSize(10);
  1423.         run4.setFontFamily("Arial");
  1424.         run4.setText(ECC);
  1425.         run4.addBreak();
  1426.         // -----------------------------------------------------------
  1427.         XWPFRun run5 = par.createRun();
  1428.         run5.setFontSize(10);
  1429.         run5.setBold(true);
  1430.         run5.setFontFamily("Arial");
  1431.         run5.setText("Your Oxidizer is: ");
  1432.         XWPFRun run6 = par.createRun();
  1433.         run6.setFontSize(10);
  1434.         run6.setFontFamily("Arial");
  1435.         run6.setText(OCC);
  1436.         run6.addBreak();
  1437.         // -----------------------------------------------------------
  1438.         XWPFRun run8 = par.createRun();
  1439.         run8.setFontSize(10);
  1440.         run8.setBold(true);
  1441.         run8.setFontFamily("Arial");
  1442.         run8.setText("Your Fuel is: ");
  1443.         XWPFRun run7 = par.createRun();
  1444.         run7.setFontSize(10);
  1445.         run7.setFontFamily("Arial");
  1446.         run7.setText(FCC);
  1447.         run7.addBreak();
  1448.         // -----------------------------------------------------------
  1449.         XWPFRun run9 = par.createRun();
  1450.         run9.setFontSize(10);
  1451.         run9.setBold(true);
  1452.         run9.setFontFamily("Arial");
  1453.         run9.setText("Your engine's nozzle type should be: ");
  1454.         XWPFRun run0 = par.createRun();
  1455.         run0.setFontSize(10);
  1456.         run0.setFontFamily("Arial");
  1457.         run0.setText(NTC);
  1458.         run0.addBreak();
  1459.         // -----------------------------------------------------------
  1460.         XWPFRun run10 = par.createRun();
  1461.         run10.setFontSize(10);
  1462.         run10.setBold(true);
  1463.         run10.setFontFamily("Arial");
  1464.         run10.setText("Your Altitude of operation is: ");
  1465.         XWPFRun run23 = par.createRun();
  1466.         run23.setFontSize(10);
  1467.         run23.setFontFamily("Arial");
  1468.         run23.setText(AOOC);
  1469.         run23.addBreak();
  1470.         // -----------------------------------------------------------
  1471.         XWPFRun run11 = par.createRun();
  1472.         run11.setFontSize(10);
  1473.         run11.setBold(true);
  1474.         run11.setFontFamily("Arial");
  1475.         run11.setText("Tank repressurisation would be done ");
  1476.         XWPFRun run12 = par.createRun();
  1477.         run12.setFontSize(10);
  1478.         run12.setBold(true);
  1479.         run12.setFontFamily("Arial");
  1480.         run12.setText(TRC);
  1481.         run12.addBreak();
  1482.         // -----------------------------------------------------------
  1483.         XWPFRun run13 = par.createRun();
  1484.         run13.setFontSize(10);
  1485.         run13.setBold(true);
  1486.         run13.setFontFamily("Arial");
  1487.         run13.setText("The Cooling Mechanism to be used would be ");
  1488.         XWPFRun run14 = par.createRun();
  1489.         run14.setFontSize(10);
  1490.         run14.setBold(true);
  1491.         run14.setFontFamily("Arial");
  1492.         run14.setText(CMC);
  1493.         run14.addBreak();
  1494.         run14.addBreak();
  1495.         // -----------------------------------------------------------
  1496.         try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  1497.             docx.write(out);
  1498.         }
  1499.     }
  1500. }
Add Comment
Please, Sign In to add comment