MAKS_Enjoyer

I want to start a village in minecraft

Aug 26th, 2022 (edited)
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 211.57 KB | Source Code | 0 0
  1. // Version 0.1a
  2. import java.io.*;
  3. import java.time.*;
  4. import java.util.*;
  5. import java.nio.file.*;
  6. import org.apache.poi.xwpf.usermodel.*;
  7. import java.time.format.DateTimeFormatter;
  8.  
  9. public class Operational_Functional_Block {
  10.     public static void main(String[] args) throws IOException {
  11.         String lbrk = "////////////////////////////////////////////////////////////////";
  12.         String[] engine_Name1 = {"\"Argosy\"", "\"Galileo\"", "\"Callisto\"", "\"Nauka\"",
  13.                 "\"Rassvet\"", "\"Zvezda\"", "\"Zarya\"", "\"Orion\"", "\"Ares\"", "\"Delta\"", "\"Atlas\"",
  14.                 "\"Daedalus\"", "\"Baltia\"", "\"Dizhou\"", "\"Hermes\"", "\"Icarus\"", "\"Connestoga\"", "\"Yupiter\"",
  15.                 "\"Emphasis\"", "\"Olympus\"", "\"Kronos\"", "\"Helios\"", "\"Alabaster\"", "\"Falcon\"",
  16.                 "\"Eagle\"", "\"Endeavour\"", "\"Atlantis\"", "\"Cygnus\"", "\"Apollo\"", "\"Horizon\"",
  17.                 "\"Pioneer\"", "\"Voyager\"", "\"Exploration\"", "\"Expedition\"", "\"Vulcan\"",
  18.                 "\"Federation\"", "\"Sojourner\"", "\"Nautilus\"", "\"Jubilance\"", "\"Lagrange\"",
  19.                 "\"Prometheus\"", "\"Tellus\"", "\"Alpha\"", "\"Delta\"", "\"Proton\"", "\"Neutron\"",
  20.                 "\"Electron\"", "\"Pluton\"", "\"Poodle\"", "\"Skipper\"", "\"Convair\"", "\"Nexus\"",
  21.                 "\"Vector\"", "\"Terrier\"", "\"Rhino\"", "\"Panther\"", "\"Goliath\"", "\"Juno\"", "\"Shrimp\"",
  22.                 "\"Thumper\"", "\"Mainsail\"", "\"Dart\"", "\"Twitch\"", "\"Stratus\"", "\"Oscar\"",
  23.                 "\"Sentinel\"", "\"Pegasus\"", "\"Kelus\"", "\"Starshot\"", "\"Vernor\"", "\"Mammoth\"",
  24.                 "\"Douglas\"", "\"Heimdall\"", "\"Dynetics\"", "\"Pathfinder\"", "\"Horizon\"", "\"Poisk\"",
  25.                 "\"Pirs\"", "\"Philae\"", "\"Mariner\"", "\"Centaur\"", "\"Orel\"", "\"Pratt\"", "\"Hyperion\"",
  26.                 "\"Sagittarius\"", "\"Apollo\"", "\"Bryton\"", "\"Volga\"", "\"Harmony\"", "\"Cassini\"", "\"Contour\"",
  27.                 "\"Altair\"", "\"Dream\"", "\"Baikal\"", "\"Zenith\"", "\"Urpinod\"", "\"Bernal\"", "\"Condor\"",
  28.                 "\"Athena\"", "\"Astra\"", "\"Aerolus\"", "\"Rombus\"", "\"Lunokhod\"", "\"Fregat\"", "\"Glonass\"",
  29.                 "\"Dragon\"", "\"Salyut\"", "\"Starliner\"", "\"Skylab\"", "\"Briz\"", "\"Colombus\"", "\"Rosetta\"",
  30.                 "\"Redstone\"", "\"Antares\"", "\"Philae\"", "\"Prospero\"", "\"Leonardo\"", "\"Parker\"", "\"Dyson\"",
  31.                 "\"Oberon\"", "\"DragonFly\"", "\"Energia\"", "\"Buran\"", "\"Urgan\"", "\"Angara\"", "\"Vostok\"",
  32.                 "\"Voskhod\"", "\"Shenzhou\"", "\"Ingenuity\"", "\"Oberon\"", "\"Discovery\"", "\"Horizon\"",
  33.                 "\"Cerasus\"", "\"Progress\"", "\"Unity\"", "\"Surveyor\"", "\"Prospector\"", "\"Ikar\"", "\"Redstone\"",
  34.                 "\"Lapis\"", "\"Caesius\"", "\"Iridium\"", "\"Daedlus\"", "\"Aelita\"", "\"Beta\"", "\"Gamma\"",
  35.                 "\"Alpha\"", "\"Epsilon\"", "\"Omega\"", "\"Discoverer\"", "\"Explorer\"", "\"Hornet\"", "\"Serenity\"",
  36.                 "\"Ariane\"", "\"Hornet\"", "\"Asimov\"", "\"Pegasus\"", "\"Venture\"", "\"Antares\"", "\"Star\"",
  37.                 "\"Archimedes\"", "\"Hera\"", "\"Iris\"", "\"Titan\"", "\"Artemis\"", "\"Phoenix\"", "\"Ross\"",
  38.                 "\"Sarychev\"", "\"Nemesis\"", "\"Heimdall\"", "\"Sturt\"", "\"Odin\"", "\"Aethelred\"", "\"Vesper\"",
  39.                 "\"Aces\"", "\"Argon\"", "\"Olympia\"", "\"Perseus\"", "\"Chyron\"", "\"Proxima\"", "\"Arminus\"",
  40.                 "\"Destiny\"", "\"Valient\"", "\"FireFly\"", "\"Obsidian\"", "\"Leviathan\"", "\"Magellan\"", "\"Voyager\"",
  41.                 "\"Mariner\"", "\"Joist\"", "\"Crimson\"", "\"Fortune\"", "\"Vanguard\"", "\"Aurora\"", "\"Ulysses\"",
  42.                 "\"Crusader\"", "\"Python\"", "\"Kuiper\"", "\"Insurgent\"", "\"Pathfinder\"", "\"Kvant\"", "\"Spektr\"",
  43.                 "\"Cassini\"", "\"Zemlya\"", "\"Dawn\"", "\"Kepler\"", "\"Parom\"", "\"Elektron\"", "\"Aeonian\"",
  44.                 "\"Node\"", "\"Burya\"", "\"Voyager\"", "\"Ceres\"", "\"Bayern\"", "\"Chasovoy\"", "\"Copernicus\"",
  45.                 "\"Quaoar\"", "\"Minotaur\"", "\"Agena\"", "\"Thor\"", "\"Vega\"", "\"Scout\"", "\"Coeus\"", "\"Minerva\"",
  46.                 "\"Kratos\"", "\"Neith\"", "\"Omoikane\"", "\"Gayamun\"", "\"Odin\"", "\"Kronos\"", "\"Hope\"", "\"Polet\"",
  47.                 "\"Polyot\"", "\"Sputnik\"", "\"Clementine\"", "\"Sojourner\"", "\"Ingenuity\"", "\"Perseverence\"", "\"Insider\"",
  48.                 "\"Onatchesko\"", "\"Atlantis\"", "\"Tsyklon\"", "\"Zenit\"", "\"Almaz\"", "\"Soyuz\"", "\"Molniya\"", "\"Kosmos\"",
  49.                 "\"Oreol\"", "\"Yantar\"", "\"Foton\"", "\"Meteor\"", "\"Ekran\"", "\"Strela\"", "\"Bion\"", "\"Piroda\"",
  50.                 "\"Salyut\"", "\"Strela\"", "\"Luch\"", "\"Potok\"", "\"Prognoz\"", "\"Orlets\"", "\"Etalon\"", "\"Astron\"",
  51.                 "\"Efir\"", "\"Kometa\"", "\"Fram\"", "\"Zemlya\"", "\"Gorizont\"", "\"Arkon\"", "\"Gamma\"", "\"Ekspress\"",
  52.                 "\"Gonets\"", "\"Taifun\"", "\"Okean\"", "\"Reflektor\"", "\"Kolibr\"", "\"Sever\"", "\"Comet\"",
  53.                 "\"Roton\"", "\"Solaris\"", "\"Altaris\"", "\"Ithacus\"", "\"Dekto\"", "\"Dream\"", "\"Impuls\"",
  54.                 "\"Vremya\"", "\"Portal\"", "\"Zodiak\"", "\"Slava\"", "\"Inertsiya\"", "\"Stimuls\"", "\"Ambross\"",
  55.                 "\"Amal\"", "\"Thea\"", "\"Orphelia\"", "\"Polyot\"", "\"Mudrost\"", "\"Carrack\"", "\"Artak\"",
  56.                 "\"Questar\"", "\"Artyom\"", "\"Tsyclon\"", "\"Ascension\"", "\"Tenacity\"", "\"Contour\"", "\"Zephyr\"",
  57.                 "\"Atlanta\"", "\"Polaris\"", "\"Aeolus\"", "\"Mayak\"", "\"Pamir\"", "\"Taimyr\"", "\"Cheget\"", "\"Sirius\"",
  58.                 "\"Uragan\"", "\"Agat\"", "\"Skiph\"", "\"Kristall\"", "\"Altair\"", "\"Uran\"", "\"Ingul\"", "\"Carat\"",
  59.                 "\"Pulsar\"", "\"Titan\"", "\"Eridanus\"", "\"Parus\"", "\"Cepheus\"", "\"Varagian\"", "\"Olympus\"",
  60.                 "\"Tarkhaniy\"", "\"Astraeus\"", "\"Antares\"", "\"Kazbek\"", "\"Burlak\"", "\"Borei\"", "\"Favor\"",
  61.                 "\"Rubin\"", "\"Almaz\"", "\"Granit\"", "\"Ruby\"", "\"Sokol\"", "\"Argon\"", "\"Kavkaz\"", "\"Ural\"",
  62.                 "\"Berkut\"", "\"Dunay\"", "\"Yastreb\"", "\"Terek\"", "\"Radon\"", "\"Taymyr\"", "\"Pamir\"", "\"Photon\"",
  63.                 "\"Elbrus\"", "\"Isayiev\"", "\"Shmel\"", "\"Kobra\"", "\"Shturn\"", "\"Metis\"", "\"Malyutka\"", "\"Fleyta\"",
  64.                 "\"Konkurs\"", "\"Bastion\"", "\"Svir\"", "\"Ataka\"", "\"Vodopad\"", "\"Veter\"", "\"Vyuga\"", "\"Vulga\"",
  65.                 "\"Tochka\"", "\"Oka\"", "\"Dvina\"", "\"Almaz\"", "\"Araks\"", "\"Kanopus\"", "\"Kliper\"", "\"Kobalt\"",
  66.                 "\"Siluet\"", "\"Kondor\"", "\"Lotos\"", "\"Luch\"", "\"Mir\"", "\"Neman\"", "\"Obzor\"", "\"Okean\"", "\"Oko\"",
  67.                 "\"Oktan\"", "\"Orlets\"", "\"Poisk\"", "\"Potok\"", "\"Pirs\"", "\"Prognoz\"", "\"Resurs\"", "\"Rodnik\"",
  68.                 "\"Romb\"", "\"Kapustin\"", "\"Oplot\"", "\"Tsygan\"", "\"Teplokhod\"", "\"Sokosha\"", "\"Rubezh\"", "\"Topol\"",
  69.                 "\"Zircon\"", "\"Moskva\"", "\"Tryol\"", "\"Ustinov\"", "\"Belyayev\"", "\"Novorod\"", "\"Argos\"", "\"Dreadnought\"",
  70.                 "\"Nerthus\"", "\"Janus\"", "\"Hephaestus\"", "\"Themis\"", "\"Chronos\"", "\"Tethys\"", "\"Minos\"", "\"Visionalis\"",
  71.                 "\"Autumn\"", "\"Resilience\"", "\"Aelita\"", "\"Rheus\"", "\"Solntspek\"", "\"Spitzer\"", "\"Cartago\"", "\"Liberty\"",
  72.                 "\"Melibea\"", "\"Spartacus\"", "\"Pulsar\"", "\"Fusion\"", "\"Reliant\"", "\"Thunder\"", "\"Novo\"", "\"Granis\"",
  73.                 "\"Panthera\"", "\"Nematoda\"", "\"Anelida\"", "\"Chordata\"", "\"Tetrapoda\"", "\"Cyclero\"", "\"Carrier\"", "\"Saturn\"",
  74.                 "\"Gaia\"", "\"Irtysh\"", "\"Wyvern\"", "\"Tarsier\"", "\"Alpina\"", "\"Espadon\"", "\"Parlos\"", "\"Nebula\"",
  75.                 "\"Lazarus\"", "\"Rufus\"", "\"Dornier\"", "\"Argus\"", "\"Kybau\"", "\"Kalau\"", "\"Chasvoy\"", "\"Zephyr\"",
  76.                 "\"Temny\"", "\"Gorizont\"", "\"Yars\"", "\"Krugazor\"", "\"Soprotivlenye\"", "\"Shtil\"", "\"Layner\"", "\"Bulava\"",
  77.                 "\"Vysota\"", "\"Volna\""};
  78.         String[] engine_Cycle = {"Gas Generator", "Staged Combustion (oxidizer Rich)", "Staged Combustion (Fuel Rich)",
  79.                 "Expander (Open)", "Expander (Closed)", "Dual Expander (Open)", "Dual Expander (Closed)",
  80.                 "Pressure-Fed", "Full Flow Staged", "Electric Pump Fed", "Combustion Tap Off",
  81.                 "Monopropellant (Cold Gas)", "Monopropellant (Decomposition)", "Gas Core", "Liquid Core",
  82.                 "Solid Core", "Pulsed Nuclear", "Pebble-Bed", "Nuclear SaltWater"};
  83.         String[] propellant_List1 = {"H2O2 (Hydrogen Peroxide)", "N2H4 (Hydrazine)", "NH2OH+NO3 (Hydroxyl ammonium nitrate)"};
  84.         String[] propellant_List2 = {"Nitrogen (N2)", "Helium (He)", "Carbon Dioxide (CO2)", "Ammonia (NH3)", "Hydrogen (H2)",
  85.                 "Methane (CH4)"};
  86.         String[] propellant_List3 = {"Hydrogen (H2)", "Helium (He)", "Nitrogen (N2)", "Hydrogen (H)", "Ammonia (NH3)",
  87.                 "Water (H2O)", "Oxygen (O2)", "Carbon Dioxide (CO2)", "Carbon Monoxide (CO)",
  88.                 "Methane (CH4)"};
  89.         String[] altitude_Of_Operation = {"0-10 km (Sea Level)", "20-30 km (Medium Atmosphere)",
  90.                 "30-80 km (High Atmosphere)", "80 km+ (Vacuum)", "Any Altitude (0-80 km+)"};
  91.         String[] tank_Repressurisation = {"Autogenously", "using Inert gas"};
  92.         String[] nozzle_Type_List1 = {"De Laval Cone (Without Nozzle Extension)",
  93.                 "De Laval Bell (Without Nozzle Extension)"};
  94.         String[] firstPart = {"RD", "RS", "AJ", "XLR", "NK", "RL", "KDTU", "AR", "BE", "MV",
  95.                 "YF", "PKA", "TQ", "MJ", "XS", "LM10", "HM", "LE", "LRE", "CE", "DST",
  96.                 "DOK", "KDU", "KRD", "R", "RO"};
  97.         File org = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles");
  98.         org.mkdir();
  99.         // -------------------------------------
  100.         File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/obf_rex.docx");
  101.         if (!(new File(String.valueOf(pathn1)).exists())) {
  102.             XWPFDocument docx1 = new XWPFDocument();
  103.             XWPFParagraph par1 = docx1.createParagraph();
  104.             par1.setAlignment(ParagraphAlignment.CENTER);
  105.             XWPFRun run1 = par1.createRun();
  106.             run1.setText("Rocket Engine Generator");
  107.             run1.setFontFamily("Calibri");
  108.             run1.setBold(true);
  109.             run1.setFontSize(33);
  110.             run1.setTextPosition(60);
  111.             // -----------------------------------------------------------------------------
  112.             XWPFParagraph par2 = docx1.createParagraph();
  113.             par2.setAlignment(ParagraphAlignment.RIGHT);
  114.             XWPFRun run2 = par2.createRun();
  115.             LocalDateTime date = LocalDateTime.now();
  116.             DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd MMM yyyy, HH:mm:ss");
  117.             String dt = date.format(formatter);
  118.             run2.setText("Created on: " + dt);
  119.             run2.setFontFamily("Calibri");
  120.             run2.setBold(true);
  121.             run2.setFontSize(10);
  122.             run2.setTextPosition(60);
  123.             // ----------------------------------------------------------------------------------------------------
  124.             try (FileOutputStream out1 = new FileOutputStream(String.valueOf(pathn1))) {
  125.                 docx1.write(out1);
  126.                 out1.close();
  127.                 docx1.close();
  128.             }
  129.         }
  130.         Scanner mstr_cmds = new Scanner(System.in);
  131.         String mstr_cmd = "";
  132.         // First Logic
  133.         String std_cmd;
  134.         while (!mstr_cmd.equals("N")) {
  135.             System.out.println("Do you want to generate a new engine? [Y/N]");
  136.             System.out.print("> ");
  137.             mstr_cmd = mstr_cmds.next();
  138.             if (mstr_cmd.equalsIgnoreCase("N") || mstr_cmd.equalsIgnoreCase("NO")) {
  139.                 System.exit(0);
  140.             } else if (mstr_cmd.equalsIgnoreCase("Y") || mstr_cmd.equalsIgnoreCase("YES")) {
  141.  
  142.             }
  143.             Scanner std_cmdMC = new Scanner(System.in);
  144.             System.out.println("""
  145.                    How do you want to configure the app:
  146.                    Advanced - For more experienced users with a good grasp on rocketry
  147.                    Standard - For users looking for quick rocket engine generation process
  148.                    """);
  149.             System.out.print("> ");
  150.             std_cmd = std_cmdMC.next();
  151.             Path path = Paths.get("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/Data/obf_rex[Full].docx");
  152.             Path of = Path.of(String.valueOf(pathn1));
  153.             if (std_cmd.equalsIgnoreCase("Advanced")) {
  154.                 int i = 1;
  155.                 Scanner scanner = new Scanner(System.in);
  156.                 String repeatCommand = "";
  157.                 System.out.println("Do you want to generate a new engine? [Y/N]");
  158.                 System.out.print("> ");
  159.                 repeatCommand = scanner.next();
  160.                 boolean isEngineCycle = false;
  161.                 for (String s : engine_Cycle) {
  162.                     if (Objects.equals(repeatCommand, s)) {
  163.                         isEngineCycle = true;
  164.                         break;
  165.                     }
  166.                 }
  167.                 double sizeInbytes = pathn1.length();
  168.                 double sizeInKilobytes = (sizeInbytes / 1000);
  169.                 if (sizeInKilobytes < 80) {
  170.                     System.out.println("size" + "------>" + pathn1.length());
  171.                 } else {
  172.                     File logM = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/Data");
  173.                     logM.mkdir();
  174.                     // ------------------------------
  175.                     if ((new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/Data/obf_rex[Full].docx")).exists()) {
  176.                         Path logPF = Paths.get("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/Data/obf_rex[Full]" + i + ".docx");
  177.                         Files.copy(of, logPF);
  178.                         i++;
  179.                     } else {
  180.                         Files.copy(of, path);
  181.                     }
  182.                     XWPFDocument docx1 = new XWPFDocument();
  183.                     XWPFParagraph par1 = docx1.createParagraph();
  184.                     par1.setAlignment(ParagraphAlignment.CENTER);
  185.                     XWPFRun run1 = par1.createRun();
  186.                     run1.setText("Rocket Engine Generator");
  187.                     run1.setFontFamily("Calibri");
  188.                     run1.setBold(true);
  189.                     run1.setFontSize(33);
  190.                     run1.setTextPosition(60);
  191.                     // -----------------------------------------------------------------------------
  192.                     XWPFParagraph par2 = docx1.createParagraph();
  193.                     par2.setAlignment(ParagraphAlignment.RIGHT);
  194.                     XWPFRun run2 = par2.createRun();
  195.                     LocalDateTime date = LocalDateTime.now();
  196.                     DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd MMM yyyy, HH:mm:ss");
  197.                     String dt = date.format(formatter);
  198.                     run2.setText("Created on: " + dt);
  199.                     run2.setFontFamily("Calibri");
  200.                     run2.setBold(true);
  201.                     run2.setFontSize(10);
  202.                     run2.setTextPosition(60);
  203.                     // ----------------------------------------------------------------------------------------------------
  204.                     FileOutputStream out1 = new FileOutputStream(String.valueOf(pathn1));
  205.                     docx1.write(out1);
  206.                     out1.close();
  207.                     docx1.close();
  208.                 }
  209.                 // Randomise Arrays
  210.                 boolean Flagger;
  211.                 String engine_Name = "";
  212.                 if (new File("C:/Users/sfsga/IdeaProjects/demo/obf_rex.docx").exists()) {
  213.                     Flagger = true;
  214.                     while (Flagger) {
  215.                         Collections.shuffle(Arrays.asList(engine_Name1));
  216.                         Collections.shuffle(Arrays.asList(firstPart));
  217.                         Random engineNameChosen = new Random();
  218.                         Random firstPartC = new Random();
  219.                         int engineNameChosen_index = engineNameChosen.nextInt(engine_Name1.length);
  220.                         int firstPart_index = firstPartC.nextInt(firstPart.length);
  221.                         String engNameFinalf = " " + engine_Name1[engineNameChosen_index];
  222.                         String firstPart_f = firstPart[firstPart_index] + "-";
  223.                         // Find number
  224.                         int finalNumber = 10 + ((int) (Math.random() * 1001));
  225.                         // is it eligible for letter at end = NO!
  226.                         if (finalNumber % 8 == 0) {
  227.                             engine_Name = firstPart_f + finalNumber + engNameFinalf;
  228.                         } else {
  229.                             char randomizedCharacter;
  230.                             int uio93 = 1 + ((int) (Math.random() * 1001));
  231.                             int uio94 = 1 + ((int) (Math.random() * 11));
  232.                             Random randomLetter = new Random();
  233.                             if (uio93 % uio94 == 0) {
  234.                                 randomizedCharacter = (char) (randomLetter.nextInt(26) + 'a');
  235.                                 while (randomizedCharacter == 'o' || randomizedCharacter == 'i' || randomizedCharacter == 'q' || randomizedCharacter == 'e' || randomizedCharacter == 'h' || randomizedCharacter == 'g' || randomizedCharacter == 'c' || randomizedCharacter == 'j') {
  236.                                     randomizedCharacter = (char) (randomLetter.nextInt(26) + 'a');
  237.                                     if (randomizedCharacter == 'o' || randomizedCharacter == 'i' || randomizedCharacter == 'q' || randomizedCharacter == 'e' || randomizedCharacter == 'h' || randomizedCharacter == 'g' || randomizedCharacter == 'c' || randomizedCharacter == 'j') {
  238.                                         break;
  239.                                     }
  240.                                 }
  241.                             } else {
  242.                                 randomizedCharacter = (char) (randomLetter.nextInt(26) + 'A');
  243.                                 while (randomizedCharacter == 'O' || randomizedCharacter == 'I' || randomizedCharacter == 'Q') {
  244.                                     randomizedCharacter = (char) (randomLetter.nextInt(26) + 'A');
  245.                                     if (randomizedCharacter == 'O' || randomizedCharacter == 'I' || randomizedCharacter == 'Q') {
  246.                                         break;
  247.                                     }
  248.                                 }
  249.                             }
  250.                             engine_Name = firstPart_f + finalNumber + randomizedCharacter + engNameFinalf;
  251.                         }
  252.                         try {
  253.                             File fila = new File("C:/Users/sfsga/IdeaProjects/demo/obf_rex.docx");
  254.                             Scanner reader = new Scanner(fila);
  255.                             while (reader.hasNextLine()) {
  256.                                 String data = reader.nextLine();
  257.                                 Flagger = data.equals(engine_Name);
  258.                             }
  259.                             reader.close();
  260.  
  261.                         } catch (FileNotFoundException e) {
  262.                             e.printStackTrace();
  263.                         }
  264.                     }
  265.  
  266.                 } else {
  267.                     Collections.shuffle(Arrays.asList(engine_Name1));
  268.                     Collections.shuffle(Arrays.asList(firstPart));
  269.                     Random engineNameChosen = new Random();
  270.                     Random firstPartC = new Random();
  271.                     int engineNameChosen_index = engineNameChosen.nextInt(engine_Name1.length);
  272.                     int firstPart_index = firstPartC.nextInt(firstPart.length);
  273.                     String engNameFinalf = " " + engine_Name1[engineNameChosen_index];
  274.                     String firstPart_f = firstPart[firstPart_index] + "-";
  275.                     int finalNumber = 12 + ((int) (Math.random() * 1001));
  276.                     if (finalNumber % 8 == 0) {
  277.                         engine_Name = firstPart_f + finalNumber + engNameFinalf;
  278.                     } else {
  279.                         char randomizedCharacter;
  280.                         int uio93 = 1 + ((int) (Math.random() * 1001));
  281.                         int uio94 = 1 + ((int) (Math.random() * 11));
  282.                         Random randomLetter = new Random();
  283.                         if (uio93 % uio94 == 0) {
  284.                             randomizedCharacter = (char) (randomLetter.nextInt(26) + 'a');
  285.                             while (randomizedCharacter == 'o' || randomizedCharacter == 'i' || randomizedCharacter == 'q' || randomizedCharacter == 'e' || randomizedCharacter == 'h' || randomizedCharacter == 'g' || randomizedCharacter == 'c' || randomizedCharacter == 'j') {
  286.                                 randomizedCharacter = (char) (randomLetter.nextInt(26) + 'a');
  287.                                 if (randomizedCharacter == 'o' || randomizedCharacter == 'i' || randomizedCharacter == 'q' || randomizedCharacter == 'e' || randomizedCharacter == 'h' || randomizedCharacter == 'g' || randomizedCharacter == 'c' || randomizedCharacter == 'j') {
  288.                                     break;
  289.                                 }
  290.                             }
  291.                         } else {
  292.                             randomizedCharacter = (char) (randomLetter.nextInt(26) + 'A');
  293.                             while (randomizedCharacter == 'O' || randomizedCharacter == 'I' || randomizedCharacter == 'Q') {
  294.                                 randomizedCharacter = (char) (randomLetter.nextInt(26) + 'A');
  295.                                 if (randomizedCharacter == 'O' || randomizedCharacter == 'I' || randomizedCharacter == 'Q') {
  296.                                     break;
  297.                                 }
  298.                             }
  299.                         }
  300.                         engine_Name = firstPart_f + finalNumber + randomizedCharacter + engNameFinalf;
  301.                     }
  302.                 }
  303.                 Collections.shuffle(Arrays.asList(engine_Cycle));
  304.                 Random engineCycleChosen = new Random();
  305.                 int engineTypeChosen_index = engineCycleChosen.nextInt(engine_Cycle.length);
  306.                 String engine_Cycle_Chosen = engine_Cycle[engineTypeChosen_index];
  307.                 if (isEngineCycle) {
  308.                     repeatCommand = engine_Cycle_Chosen;
  309.                 }
  310.                 switch (engine_Cycle_Chosen) {
  311.                     case "Gas Core", "Liquid Core", "Solid Core", "Pulsed Nuclear", "Nuclear SaltWater", "Pebble-Bed Core" -> {
  312.                         String propellant_List_Chosen;
  313.                         String nuclear_Cycle_Chosen;
  314.                         String reactor_Fuel_Chosen;
  315.                         String nozzle_Type_List_Chosen;
  316.                         switch (engine_Cycle_Chosen) {
  317.                             case "Gas Core" -> {
  318.                                 String[] remass_List = {"Hydrogen (H2)", "Nitrogen (N2)", "Monoatomic Hydrogen (H)", "Ammonia (NH3)",
  319.                                         "Water (H2O)", "Oxygen (O2)", "Carbon Dioxide (CO2)", "Carbon Monoxide (CO)",
  320.                                         "Methane (CH4)"};
  321.                                 Collections.shuffle(Arrays.asList(remass_List));
  322.                                 Random remassChosen = new Random();
  323.                                 int remassChosen_index = remassChosen.nextInt(remass_List.length);
  324.                                 String remass_List_Chosen = remass_List[remassChosen_index];
  325.                                 propellant_List_Chosen = "Uranium HexaFluoride Salt (UF6) and " + remass_List_Chosen + " as remass";
  326.                                 // Nuclear Cycle (Nuclear Thermal)
  327.                                 String[] nuclear_cycle1 = {"\"Expander Bleed\"", "\"Expander Closed\"", "\"Nuclear Lightbulb\"", "\"Vortex Confined\"",
  328.                                         "\"Wheel Flow\"", "\"Magnetohydrodynamic(MHD) vortex\"", "\"Expander Open\""};
  329.                                 Collections.shuffle(Arrays.asList(nuclear_cycle1));
  330.                                 Random nuclearCycleChosen = new Random();
  331.                                 int nuclearCycleChosen_index = nuclearCycleChosen.nextInt(nuclear_cycle1.length);
  332.                                 nuclear_Cycle_Chosen = nuclear_cycle1[nuclearCycleChosen_index];
  333.                                 // Reactor Fuel (Nuclear Thermal)
  334.                                 String[] reactor_fuel = {"100-90% Uranium-235", "50% Uranium-235", "25-8% Uranium-235", "1-2% Uranium-235"};
  335.                                 Collections.shuffle(Arrays.asList(reactor_fuel));
  336.                                 Random reactorfuelChosen = new Random();
  337.                                 int reactorfuelChosen_index = reactorfuelChosen.nextInt(reactor_fuel.length);
  338.                                 reactor_Fuel_Chosen = reactor_fuel[reactorfuelChosen_index];
  339.                                 // Nozzle Type (Nuclear Thermal)
  340.                                 nozzle_Type_List_Chosen = "De Laval Bell (With Nozzle Extension)";
  341.                             }
  342.                             case "Liquid Core", "Colloid-Core", "Pebble-Bed Core" -> {
  343.                                 // Remass (Nuclear Thermal)
  344.                                 String[] remass_List2 = {"Hydrogen (H2)", "Nitrogen (N2)", "Monoatomic Hydrogen (H)", "Ammonia (NH3)",
  345.                                         "Water (H2O)", "Oxygen (O2)", "Carbon Dioxide (CO2)", "Carbon Monoxide (CO)",
  346.                                         "Methane (CH4)", "Hydrogen (H2) + Hexane (C6H14)"};
  347.                                 Collections.shuffle(Arrays.asList(remass_List2));
  348.                                 Random remassChosen = new Random();
  349.                                 int remassChosen_index = remassChosen.nextInt(remass_List2.length);
  350.                                 String remass_List_Chosen = remass_List2[remassChosen_index];
  351.                                 propellant_List_Chosen = "Uranium HexaFluoride Salt (UF6) and " + remass_List_Chosen + " as a remass";
  352.                                 // Nuclear Cycle (Nuclear Thermal)
  353.                                 String[] nuclear_cycle1 = {"\"Expander Bleed\"", "\"Expander Closed\"", "\"Vortex Confined\"", "\"Expander Open\""};
  354.                                 Collections.shuffle(Arrays.asList(nuclear_cycle1));
  355.                                 Random nuclearCycleChosen = new Random();
  356.                                 int nuclearCycleChosen_index = nuclearCycleChosen.nextInt(nuclear_cycle1.length);
  357.                                 nuclear_Cycle_Chosen = nuclear_cycle1[nuclearCycleChosen_index];
  358.                                 // Reactor Fuel (Nuclear Thermal)
  359.                                 String[] reactor_fuel = {"100-90% Uranium-235", "50% Uranium-235", "25-8% Uranium-235", "1-2% Uranium-235"};
  360.                                 Collections.shuffle(Arrays.asList(reactor_fuel));
  361.                                 Random reactorfuelChosen = new Random();
  362.                                 int reactorfuelChosen_index = reactorfuelChosen.nextInt(reactor_fuel.length);
  363.                                 reactor_Fuel_Chosen = reactor_fuel[reactorfuelChosen_index];
  364.                                 // Nozzle Type (Nuclear Thermal)
  365.                                 nozzle_Type_List_Chosen = "De Laval Bell (With Nozzle Extension)";
  366.                             }
  367.                             case "Nuclear SaltWater" -> {
  368.                                 propellant_List_Chosen = "Uranium TetraBromide (UBr4) + Water (H2O)";
  369.                                 nuclear_Cycle_Chosen = "";
  370.                                 // Reactor Fuel (Nuclear Thermal)
  371.                                 String[] reactor_fuel = {"100-90% Uranium-235", "50% Uranium-235", "25-8% Uranium-235", "1-2% Uranium-235"};
  372.                                 Collections.shuffle(Arrays.asList(reactor_fuel));
  373.                                 Random reactorfuelChosen = new Random();
  374.                                 int reactorfuelChosen_index = reactorfuelChosen.nextInt(reactor_fuel.length);
  375.                                 reactor_Fuel_Chosen = reactor_fuel[reactorfuelChosen_index];
  376.                                 // Nozzle Type (Nuclear Thermal)
  377.                                 nozzle_Type_List_Chosen = "De Laval Bell (With Nozzle Extension)";
  378.                             }
  379.                             default -> {
  380.                                 // Propellant (Nuclear Thermal)
  381.                                 Collections.shuffle(Arrays.asList(propellant_List3));
  382.                                 Random propellantChosen = new Random();
  383.                                 int propellantChosen_index = propellantChosen.nextInt(propellant_List3.length);
  384.                                 propellant_List_Chosen = propellant_List3[propellantChosen_index];
  385.                                 // Nuclear Cycle (Nuclear Thermal)
  386.                                 String[] nuclear_cycle1 = {"\"Expander Bleed\"", "\"Expander Closed\"", "\"Expander Open\""};
  387.                                 Collections.shuffle(Arrays.asList(nuclear_cycle1));
  388.                                 Random nuclearCycleChosen = new Random();
  389.                                 int nuclearCycleChosen_index = nuclearCycleChosen.nextInt(nuclear_cycle1.length);
  390.                                 nuclear_Cycle_Chosen = nuclear_cycle1[nuclearCycleChosen_index];
  391.                                 // Reactor Fuel (Nuclear Thermal)
  392.                                 String[] reactor_fuel = {"100-90% Uranium-235", "50% Uranium-235", "20-8% Uranium-235", "1-2% Uranium-235",
  393.                                         "100-90% Plutonium-238", "50% Plutonium-238", "25-8% Plutonium-238", "1-2% Plutonium-238"};
  394.                                 Collections.shuffle(Arrays.asList(reactor_fuel));
  395.                                 Random reactorfuelChosen = new Random();
  396.                                 int reactorfuelChosen_index = reactorfuelChosen.nextInt(reactor_fuel.length);
  397.                                 reactor_Fuel_Chosen = reactor_fuel[reactorfuelChosen_index];
  398.                                 // Nozzle Type (Nuclear Thermal)
  399.                                 nozzle_Type_List_Chosen = "De Laval Bell (With Nozzle Extension)";
  400.                             }
  401.                         }
  402.                         // Altitude of Operation (Nuclear Thermal)
  403.                         String altitude_Of_Operation_Chosen = "80 km+ (Vacuum)";
  404.                         // Tank Repressurisation (Nuclear Thermal)
  405.                         Collections.shuffle(Arrays.asList(tank_Repressurisation));
  406.                         Random tankRepressurisationChosen = new Random();
  407.                         int tankRepressurisationChosen_index = tankRepressurisationChosen.nextInt(tank_Repressurisation.length);
  408.                         String tank_Repressurisation_Chosen = tank_Repressurisation[tankRepressurisationChosen_index];
  409.                         // Beautiful Part (Nuclear Thermal)
  410.                         System.out.println(lbrk + "\n" + "Your Engine is called: " + engine_Name + "\n");
  411.                         System.out.println("Your Engine Cycle is: " + nuclear_Cycle_Chosen + " " + engine_Cycle_Chosen);
  412.                         System.out.println("Your Propellant is: " + propellant_List_Chosen);
  413.                         System.out.println("Your Reactor's Fuel is: " + reactor_Fuel_Chosen);
  414.                         System.out.println("Your Altitude of operation is: " + altitude_Of_Operation_Chosen);
  415.                         System.out.println("Your engine's nozzle type should be : " + nozzle_Type_List_Chosen);
  416.                         System.out.println("Tank repressurisation would be done " + tank_Repressurisation_Chosen + "\n");
  417.                         XWPFDocument docx = new XWPFDocument();
  418.                         if (new File(String.valueOf(pathn1)).exists()) {
  419.                             docx = new XWPFDocument(new FileInputStream(String.valueOf(pathn1)));
  420.                         }
  421.                         XWPFParagraph par = docx.createParagraph();
  422.                         XWPFRun run = par.createRun();
  423.                         run.setFontSize(12);
  424.                         run.setBold(true);
  425.                         run.setFontFamily("Calibri");
  426.                         run.setText("Your Engine is called: ");
  427.                         XWPFRun run2 = par.createRun();
  428.                         run2.setFontSize(12);
  429.                         run.setBold(true);
  430.                         run2.setFontFamily("Calibri");
  431.                         run2.setText(engine_Name);
  432.                         run2.addBreak();
  433.                         // -----------------------------------------------------------
  434.                         XWPFRun run3 = par.createRun();
  435.                         run3.setFontSize(10);
  436.                         run3.setBold(true);
  437.                         run3.setFontFamily("Calibri");
  438.                         run3.setText("Your Engine Cycle is: ");
  439.                         XWPFRun run4 = par.createRun();
  440.                         run4.setFontSize(10);
  441.                         run4.setFontFamily("Calibri");
  442.                         run4.setText(nuclear_Cycle_Chosen + " " + engine_Cycle_Chosen);
  443.                         run4.addBreak();
  444.                         // -----------------------------------------------------------
  445.                         XWPFRun run5 = par.createRun();
  446.                         run5.setFontSize(10);
  447.                         run5.setBold(true);
  448.                         run5.setFontFamily("Calibri");
  449.                         run5.setText("Your Propellant is: ");
  450.                         XWPFRun run6 = par.createRun();
  451.                         run6.setFontSize(10);
  452.                         run6.setFontFamily("Calibri");
  453.                         run6.setText(propellant_List_Chosen);
  454.                         run6.addBreak();
  455.                         // -----------------------------------------------------------
  456.                         XWPFRun run7 = par.createRun();
  457.                         run7.setFontSize(10);
  458.                         run7.setBold(true);
  459.                         run7.setFontFamily("Calibri");
  460.                         run7.setText("Your Reactor's Fission Fuel is: ");
  461.                         XWPFRun run8 = par.createRun();
  462.                         run8.setFontSize(10);
  463.                         run8.setFontFamily("Calibri");
  464.                         run8.setText(reactor_Fuel_Chosen);
  465.                         run8.addBreak();
  466.                         // -----------------------------------------------------------
  467.                         XWPFRun run9 = par.createRun();
  468.                         run9.setFontSize(10);
  469.                         run9.setBold(true);
  470.                         run9.setFontFamily("Calibri");
  471.                         run9.setText("Your engine's nozzle type should be: ");
  472.                         XWPFRun run0 = par.createRun();
  473.                         run0.setFontSize(10);
  474.                         run0.setFontFamily("Calibri");
  475.                         run0.setText(nozzle_Type_List_Chosen);
  476.                         run0.addBreak();
  477.                         // -----------------------------------------------------------
  478.                         XWPFRun run11 = par.createRun();
  479.                         run11.setFontSize(10);
  480.                         run11.setBold(true);
  481.                         run11.setFontFamily("Calibri");
  482.                         run11.setText("Tank repressurisation would be done ");
  483.                         XWPFRun run12 = par.createRun();
  484.                         run12.setFontSize(10);
  485.                         run12.setBold(true);
  486.                         run12.setFontFamily("Calibri");
  487.                         run12.setText(tank_Repressurisation_Chosen);
  488.                         run12.addBreak();
  489.                         // -----------------------------------------------------------
  490.                         try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  491.                             docx.write(out);
  492.                         }
  493.  
  494.                     }
  495.                     case "Monopropellant (Decomposition)" -> {
  496.                         // Propellant (Decomposing Monopropellant)
  497.                         Collections.shuffle(Arrays.asList(propellant_List1));
  498.                         Random propellantChosen = new Random();
  499.                         int propellantChosen_index = propellantChosen.nextInt(propellant_List1.length);
  500.                         String propellant_List_Chosen = propellant_List1[propellantChosen_index];
  501.                         // Altitude of Operation (Decomposing Monopropellant)
  502.                         String altitude_Of_Operation_Chosen = "80 km+ (Vacuum)";
  503.                         // Nozzle Type (Decomposing Monopropellant)
  504.                         Collections.shuffle(Arrays.asList(nozzle_Type_List1));
  505.                         Random nozzle_chosen = new Random();
  506.                         int nozzleChosen_index = nozzle_chosen.nextInt(nozzle_Type_List1.length);
  507.                         String nozzle_Type_List_Chosen = nozzle_Type_List1[nozzleChosen_index];
  508.                         // Beautiful Part (Least non-ugly)
  509.                         System.out.println(lbrk + "\n" + "Your Engine is called: " + engine_Name + "\n");
  510.                         System.out.println("Your Engine Cycle is: " + engine_Cycle_Chosen);
  511.                         System.out.println("Your Propellant is: " + propellant_List_Chosen);
  512.                         System.out.println("Your Altitude of operation is: " + altitude_Of_Operation_Chosen);
  513.                         System.out.println("Your engine's nozzle type should be : " + nozzle_Type_List_Chosen);
  514.                         System.out.println("Tank repressurisation would be impractical and unnecessary" + "\n");
  515.                         XWPFDocument docx = new XWPFDocument();
  516.                         if (new File(String.valueOf(pathn1)).exists()) {
  517.                             docx = new XWPFDocument(new FileInputStream(String.valueOf(pathn1)));
  518.                         }
  519.                         XWPFParagraph par = docx.createParagraph();
  520.                         XWPFRun run = par.createRun();
  521.                         run.setFontSize(12);
  522.                         run.setBold(true);
  523.                         run.setFontFamily("Calibri");
  524.                         run.setText("Your Engine is called: ");
  525.                         XWPFRun run2 = par.createRun();
  526.                         run2.setFontSize(12);
  527.                         run.setBold(true);
  528.                         run2.setFontFamily("Calibri");
  529.                         run2.setText(engine_Name);
  530.                         run2.addBreak();
  531.                         // -----------------------------------------------------------
  532.                         XWPFRun run3 = par.createRun();
  533.                         run3.setFontSize(10);
  534.                         run3.setBold(true);
  535.                         run3.setFontFamily("Calibri");
  536.                         run3.setText("Your Engine Cycle is: ");
  537.                         XWPFRun run4 = par.createRun();
  538.                         run4.setFontSize(10);
  539.                         run4.setFontFamily("Calibri");
  540.                         run4.setText(engine_Cycle_Chosen);
  541.                         run4.addBreak();
  542.                         // -----------------------------------------------------------
  543.                         XWPFRun run5 = par.createRun();
  544.                         run5.setFontSize(10);
  545.                         run5.setBold(true);
  546.                         run5.setFontFamily("Calibri");
  547.                         run5.setText("Your Propellant is: ");
  548.                         XWPFRun run6 = par.createRun();
  549.                         run6.setFontSize(10);
  550.                         run6.setFontFamily("Calibri");
  551.                         run6.setText(propellant_List_Chosen);
  552.                         run6.addBreak();
  553.                         // -----------------------------------------------------------
  554.                         XWPFRun run9 = par.createRun();
  555.                         run9.setFontSize(10);
  556.                         run9.setBold(true);
  557.                         run9.setFontFamily("Calibri");
  558.                         run9.setText("Your engine's nozzle type should be: ");
  559.                         XWPFRun run0 = par.createRun();
  560.                         run0.setFontSize(10);
  561.                         run0.setFontFamily("Calibri");
  562.                         run0.setText(nozzle_Type_List_Chosen);
  563.                         run0.addBreak();
  564.                         // -----------------------------------------------------------
  565.                         XWPFRun run11 = par.createRun();
  566.                         run11.setFontSize(10);
  567.                         run11.setBold(true);
  568.                         run11.setFontFamily("Calibri");
  569.                         run11.setText("Tank repressurisation would be impractical and unnecessary");
  570.                         run11.addBreak();
  571.                         // -----------------------------------------------------------
  572.                         try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  573.                             docx.write(out);
  574.                         }
  575.  
  576.                     }
  577.                     case "Monopropellant (Cold Gas)" -> {
  578.                         Collections.shuffle(Arrays.asList(propellant_List2));
  579.                         Random propellantChosen = new Random();
  580.                         int propellantChosen_index = propellantChosen.nextInt(propellant_List2.length);
  581.                         String propellant_List_Chosen = propellant_List2[propellantChosen_index];
  582.                         // Altitude of Operation (Decomposing Monopropellant)
  583.                         String altitude_Of_Operation_Chosen = "80 km+ (Vacuum)";
  584.                         // Nozzle Type (Decomposing Monopropellant)
  585.                         Collections.shuffle(Arrays.asList(nozzle_Type_List1));
  586.                         Random nozzle_chosen = new Random();
  587.                         int nozzleChosen_index = nozzle_chosen.nextInt(nozzle_Type_List1.length);
  588.                         String nozzle_Type_List_Chosen = nozzle_Type_List1[nozzleChosen_index];
  589.                         // Beautiful Part (Least non-ugly)
  590.                         System.out.println(lbrk + "\n" + "Your Engine is called: " + engine_Name + "\n");
  591.                         System.out.println("Your Engine Cycle is: " + engine_Cycle_Chosen);
  592.                         System.out.println("Your Propellant is: " + propellant_List_Chosen);
  593.                         System.out.println("Your Altitude of operation is: " + altitude_Of_Operation_Chosen);
  594.                         System.out.println("Your engine's nozzle type should be : " + nozzle_Type_List_Chosen);
  595.                         System.out.println("Tank repressurisation would be impractical and unnecessary" + "\n");
  596.                         XWPFDocument docx = new XWPFDocument();
  597.                         if (new File(String.valueOf(pathn1)).exists()) {
  598.                             docx = new XWPFDocument(new FileInputStream(String.valueOf(pathn1)));
  599.                         }
  600.                         XWPFParagraph par = docx.createParagraph();
  601.                         XWPFRun run = par.createRun();
  602.                         run.setFontSize(12);
  603.                         run.setBold(true);
  604.                         run.setFontFamily("Calibri");
  605.                         run.setText("Your Engine is called: ");
  606.                         XWPFRun run2 = par.createRun();
  607.                         run2.setFontSize(12);
  608.                         run.setBold(true);
  609.                         run2.setFontFamily("Calibri");
  610.                         run2.setText(engine_Name);
  611.                         run2.addBreak();
  612.                         // -----------------------------------------------------------
  613.                         XWPFRun run3 = par.createRun();
  614.                         run3.setFontSize(10);
  615.                         run3.setBold(true);
  616.                         run3.setFontFamily("Calibri");
  617.                         run3.setText("Your Engine Cycle is: ");
  618.                         XWPFRun run4 = par.createRun();
  619.                         run4.setFontSize(10);
  620.                         run4.setFontFamily("Calibri");
  621.                         run4.setText(engine_Cycle_Chosen);
  622.                         run4.addBreak();
  623.                         // -----------------------------------------------------------
  624.                         XWPFRun run5 = par.createRun();
  625.                         run5.setFontSize(10);
  626.                         run5.setBold(true);
  627.                         run5.setFontFamily("Calibri");
  628.                         run5.setText("Your Propellant is: ");
  629.                         XWPFRun run6 = par.createRun();
  630.                         run6.setFontSize(10);
  631.                         run6.setFontFamily("Calibri");
  632.                         run6.setText(propellant_List_Chosen);
  633.                         run6.addBreak();
  634.                         // -----------------------------------------------------------
  635.                         XWPFRun run9 = par.createRun();
  636.                         run9.setFontSize(10);
  637.                         run9.setBold(true);
  638.                         run9.setFontFamily("Calibri");
  639.                         run9.setText("Your engine's nozzle type should be: ");
  640.                         XWPFRun run0 = par.createRun();
  641.                         run0.setFontSize(10);
  642.                         run0.setFontFamily("Calibri");
  643.                         run0.setText(nozzle_Type_List_Chosen);
  644.                         run0.addBreak();
  645.                         // -----------------------------------------------------------
  646.                         XWPFRun run11 = par.createRun();
  647.                         run11.setFontSize(10);
  648.                         run11.setBold(true);
  649.                         run11.setFontFamily("Calibri");
  650.                         run11.setText("Tank repressurisation would be impractical and unnecessary");
  651.                         run11.addBreak();
  652.                         // -----------------------------------------------------------
  653.                         try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  654.                             docx.write(out);
  655.                         }
  656.  
  657.                     }
  658.                     case "Expander (Closed)", "Expander (Open)" -> {
  659.                         String[] oxidizer_List2 = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)",
  660.                                 "O3 (Ozone)"};
  661.                         Collections.shuffle(Arrays.asList(oxidizer_List2));
  662.                         Random oxidizerChosen = new Random();
  663.                         int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List2.length);
  664.                         String oxidizer_Chosen = oxidizer_List2[oxidizerChosen_index];
  665.                         String fuel_Chosen = "";
  666.                         switch (oxidizer_Chosen) {
  667.                             case "O2 (Oxygen)" -> {
  668.                                 String[] fuel_List20 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  669.                                         "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  670.                                         "CH3OH (Methanol)", "C12H24 (Kerosene)", "B2H6 (Diborane)", "B5H9 (Pentaborane)", "C2H6 (Ethane)"};
  671.                                 Collections.shuffle(Arrays.asList(fuel_List20));
  672.                                 Random fuelChosen = new Random();
  673.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List20.length);
  674.                                 fuel_Chosen = fuel_List20[fuelChosen_index];
  675.                             }
  676.                             case "F2 (Fluorine)" -> {
  677.                                 String[] fuel_List1 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  678.                                         "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "C2H8N2 (UnsymetricalDimethylHydrazine)",
  679.                                         "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)", "CH3OH (Methanol)", "C12H24 (Kerosene)",
  680.                                         "B2H6 (Diborane)", "B5H9 (Pentaborane)", "C2H6 (Ethane)"};
  681.                                 Collections.shuffle(Arrays.asList(fuel_List1));
  682.                                 Random fuelChosen = new Random();
  683.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List1.length);
  684.                                 fuel_Chosen = fuel_List1[fuelChosen_index];
  685.                             }
  686.                             case "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)" -> {
  687.                                 String[] fuel_List2 = {"H2 (Hydrogen)", "N2H4 (Hydrazine)", "CH3OH (Methanol)",
  688.                                         "C12H24 (Kerosene)", "B2H6 (Diborane)", "B5H9 (Pentaborane)", "C2H6 (Ethane)"};
  689.                                 Collections.shuffle(Arrays.asList(fuel_List2));
  690.                                 Random fuelChosen = new Random();
  691.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List2.length);
  692.                                 fuel_Chosen = fuel_List2[fuelChosen_index];
  693.                             }
  694.                         }
  695.  
  696.                         Collections.shuffle(Arrays.asList(altitude_Of_Operation));
  697.                         Random altitudeOfOperationChosen = new Random();
  698.                         int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
  699.                         String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
  700.  
  701.                         String nozzle_Type_Chosen = "";
  702.                         switch (altitude_Of_Operation_Chosen) {
  703.                             case "0-10 km (Sea Level)" -> {
  704.                                 String[] nozzle_Type_List_SL = {"De Laval Cone (Without Nozzle Extension)",
  705.                                         "De Laval Bell (Without Nozzle Extension)"};
  706.                                 Collections.shuffle(Arrays.asList(nozzle_Type_List_SL));
  707.                                 Random nozzleTypeSLspikeChosen = new Random();
  708.                                 int nozzleTypeSLspikeChosen_index = nozzleTypeSLspikeChosen.nextInt(nozzle_Type_List_SL.length);
  709.                                 nozzle_Type_Chosen = nozzle_Type_List_SL[nozzleTypeSLspikeChosen_index];
  710.                             }
  711.                             case "20-30 km (Medium Atmosphere)" -> {
  712.                                 String[] nozzle_Type_List_HA = {"De Laval Bell (Without Nozzle Extension)", "De Laval Cone (With Nozzle Extension)",
  713.                                         "De Laval Bell (With Nozzle Extension)", "Dual Bell Nozzle"};
  714.                                 Collections.shuffle(Arrays.asList(nozzle_Type_List_HA));
  715.                                 Random nozzleTypeHAspikeChosen = new Random();
  716.                                 int nozzleTypeHAspikeChosen_index = nozzleTypeHAspikeChosen.nextInt(nozzle_Type_List_HA.length);
  717.                                 nozzle_Type_Chosen = nozzle_Type_List_HA[nozzleTypeHAspikeChosen_index];
  718.                             }
  719.                             case "30-80 km (High Atmosphere)" -> {
  720.                                 String[] nozzle_Type_List_HAi = {"De Laval Cone (With Nozzle Extension)", "De Laval Bell (With Nozzle Extension)",
  721.                                         "Dual Bell Nozzle"};
  722.                                 Collections.shuffle(Arrays.asList(nozzle_Type_List_HAi));
  723.                                 Random nozzleTypeHAispikeChosen = new Random();
  724.                                 int nozzleTypeHAispikeChosen_index = nozzleTypeHAispikeChosen.nextInt(nozzle_Type_List_HAi.length);
  725.                                 nozzle_Type_Chosen = nozzle_Type_List_HAi[nozzleTypeHAispikeChosen_index];
  726.                             }
  727.                             case "80 km+ (Vacuum)" -> {
  728.                                 String[] nozzle_Type_List_VA = {"De Laval Cone (With Nozzle Extension)",
  729.                                         "De Laval Bell (With Nozzle Extension)", "Expanding Nozzle"};
  730.                                 Collections.shuffle(Arrays.asList(nozzle_Type_List_VA));
  731.                                 Random nozzleTypeVAspikeChosen = new Random();
  732.                                 int nozzleTypeVAspikeChosen_index = nozzleTypeVAspikeChosen.nextInt(nozzle_Type_List_VA.length);
  733.                                 nozzle_Type_Chosen = nozzle_Type_List_VA[nozzleTypeVAspikeChosen_index];
  734.                             }
  735.                             case "Any Altitude (0-80 km+)" -> {
  736.                                 String[] nozzle_Type_List_Aero = {"Linear Aerospike Nozzle", "Toroidal Aerospike Nozzle", "Expansion-Deflection Nozzle"};
  737.                                 Collections.shuffle(Arrays.asList(nozzle_Type_List_Aero));
  738.                                 Random nozzleTypeAerospikeChosen = new Random();
  739.                                 int nozzleTypeAerospikeChosen_index = nozzleTypeAerospikeChosen.nextInt(nozzle_Type_List_Aero.length);
  740.                                 nozzle_Type_Chosen = nozzle_Type_List_Aero[nozzleTypeAerospikeChosen_index];
  741.                             }
  742.                         }
  743.  
  744.                         System.out.println(lbrk + "\n" + "Your Engine is called: " + engine_Name + "\n");
  745.                         System.out.println("Your Engine Cycle is: " + engine_Cycle_Chosen);
  746.                         System.out.println("Your oxidizer is: " + oxidizer_Chosen);
  747.                         System.out.println("Your Fuel is: " + fuel_Chosen);
  748.                         System.out.println("Your Altitude of operation is: " + altitude_Of_Operation_Chosen);
  749.                         System.out.println("Your engine's nozzle type should be : " + nozzle_Type_Chosen);
  750.                         System.out.println("Tank repressurisation would be done Autogenously" + "\n");
  751.                         XWPFDocument docx = new XWPFDocument();
  752.                         if (new File(String.valueOf(pathn1)).exists()) {
  753.                             docx = new XWPFDocument(new FileInputStream(String.valueOf(pathn1)));
  754.                         }
  755.                         XWPFParagraph par = docx.createParagraph();
  756.                         XWPFRun run = par.createRun();
  757.                         run.setFontSize(12);
  758.                         run.setBold(true);
  759.                         run.setFontFamily("Calibri");
  760.                         run.setText("Your Engine is called: ");
  761.                         XWPFRun run2 = par.createRun();
  762.                         run2.setFontSize(12);
  763.                         run.setBold(true);
  764.                         run2.setFontFamily("Calibri");
  765.                         run2.setText(engine_Name);
  766.                         run2.addBreak();
  767.                         // -----------------------------------------------------------
  768.                         XWPFRun run3 = par.createRun();
  769.                         run3.setFontSize(10);
  770.                         run3.setBold(true);
  771.                         run3.setFontFamily("Calibri");
  772.                         run3.setText("Your Engine Cycle is: ");
  773.                         XWPFRun run4 = par.createRun();
  774.                         run4.setFontSize(10);
  775.                         run4.setFontFamily("Calibri");
  776.                         run4.setText(engine_Cycle_Chosen);
  777.                         run4.addBreak();
  778.                         // -----------------------------------------------------------
  779.                         XWPFRun run5 = par.createRun();
  780.                         run5.setFontSize(10);
  781.                         run5.setBold(true);
  782.                         run5.setFontFamily("Calibri");
  783.                         run5.setText("Your oxidizer is: ");
  784.                         XWPFRun run6 = par.createRun();
  785.                         run6.setFontSize(10);
  786.                         run6.setFontFamily("Calibri");
  787.                         run6.setText(oxidizer_Chosen);
  788.                         run6.addBreak();
  789.                         // -----------------------------------------------------------
  790.                         XWPFRun run8 = par.createRun();
  791.                         run8.setFontSize(10);
  792.                         run8.setBold(true);
  793.                         run8.setFontFamily("Calibri");
  794.                         run8.setText("Your Fuel is: ");
  795.                         XWPFRun run7 = par.createRun();
  796.                         run7.setFontSize(10);
  797.                         run7.setFontFamily("Calibri");
  798.                         run7.setText(fuel_Chosen);
  799.                         run7.addBreak();
  800.                         // -----------------------------------------------------------
  801.                         XWPFRun run9 = par.createRun();
  802.                         run9.setFontSize(10);
  803.                         run9.setBold(true);
  804.                         run9.setFontFamily("Calibri");
  805.                         run9.setText("Your engine's nozzle type should be: ");
  806.                         XWPFRun run0 = par.createRun();
  807.                         run0.setFontSize(10);
  808.                         run0.setFontFamily("Calibri");
  809.                         run0.setText(nozzle_Type_Chosen);
  810.                         run0.addBreak();
  811.                         // -----------------------------------------------------------
  812.                         XWPFRun run11 = par.createRun();
  813.                         run11.setFontSize(10);
  814.                         run11.setBold(true);
  815.                         run11.setFontFamily("Calibri");
  816.                         run11.setText("Tank repressurisation would be done ");
  817.                         XWPFRun run12 = par.createRun();
  818.                         run12.setFontSize(10);
  819.                         run12.setBold(true);
  820.                         run12.setFontFamily("Calibri");
  821.                         run12.setText("Autogenously");
  822.                         run12.addBreak();
  823.                         // -----------------------------------------------------------
  824.                         try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  825.                             docx.write(out);
  826.                         }
  827.                     }
  828.                     case "Dual Expander (Closed)", "Dual Expander (Open)" -> {
  829.                         String[] oxidizer_List3 = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)"};
  830.                         Collections.shuffle(Arrays.asList(oxidizer_List3));
  831.                         Random oxidizerChosen = new Random();
  832.                         int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List3.length);
  833.                         String oxidizer_Chosen = oxidizer_List3[oxidizerChosen_index];
  834.  
  835.                         String fuel_Chosen = "";
  836.                         String[] fuel_List3 = {"H2 (Hydrogen)", "CH4 (Methane)"};
  837.                         switch (oxidizer_Chosen) {
  838.                             case "O2 (Oxygen)", "F2 (Fluorine)" -> {
  839.                                 Collections.shuffle(Arrays.asList(fuel_List3));
  840.                                 Random fuelChosen = new Random();
  841.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List3.length);
  842.                                 fuel_Chosen = fuel_List3[fuelChosen_index];
  843.                             }
  844.                             case "F2 (Fluorine) + O2 (Oxygen)" -> fuel_Chosen = "H2 (Hydrogen)";
  845.                         }
  846.  
  847.                         Collections.shuffle(Arrays.asList(altitude_Of_Operation));
  848.                         Random altitudeOfOperationChosen = new Random();
  849.                         int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
  850.                         String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
  851.  
  852.                         String nozzle_Type_Chosen = "";
  853.                         switch (altitude_Of_Operation_Chosen) {
  854.                             case "0-10 km (Sea Level)" -> {
  855.                                 String[] nozzle_Type_List_SL = {"De Laval Cone (Without Nozzle Extension)",
  856.                                         "De Laval Bell (Without Nozzle Extension)"};
  857.                                 Collections.shuffle(Arrays.asList(nozzle_Type_List_SL));
  858.                                 Random nozzleTypeSLspikeChosen = new Random();
  859.                                 int nozzleTypeSLspikeChosen_index = nozzleTypeSLspikeChosen.nextInt(nozzle_Type_List_SL.length);
  860.                                 nozzle_Type_Chosen = nozzle_Type_List_SL[nozzleTypeSLspikeChosen_index];
  861.                             }
  862.                             case "20-30 km (Medium Atmosphere)" -> {
  863.                                 String[] nozzle_Type_List_HA = {"De Laval Bell (Without Nozzle Extension)", "De Laval Cone (With Nozzle Extension)",
  864.                                         "De Laval Bell (With Nozzle Extension)", "Dual Bell Nozzle"};
  865.                                 Collections.shuffle(Arrays.asList(nozzle_Type_List_HA));
  866.                                 Random nozzleTypeHAspikeChosen = new Random();
  867.                                 int nozzleTypeHAspikeChosen_index = nozzleTypeHAspikeChosen.nextInt(nozzle_Type_List_HA.length);
  868.                                 nozzle_Type_Chosen = nozzle_Type_List_HA[nozzleTypeHAspikeChosen_index];
  869.                             }
  870.                             case "30-80 km (High Atmosphere)" -> {
  871.                                 String[] nozzle_Type_List_HAi = {"De Laval Cone (With Nozzle Extension)", "De Laval Bell (With Nozzle Extension)",
  872.                                         "Dual Bell Nozzle"};
  873.                                 Collections.shuffle(Arrays.asList(nozzle_Type_List_HAi));
  874.                                 Random nozzleTypeHAispikeChosen = new Random();
  875.                                 int nozzleTypeHAispikeChosen_index = nozzleTypeHAispikeChosen.nextInt(nozzle_Type_List_HAi.length);
  876.                                 nozzle_Type_Chosen = nozzle_Type_List_HAi[nozzleTypeHAispikeChosen_index];
  877.                             }
  878.                             case "80 km+ (Vacuum)" -> {
  879.                                 String[] nozzle_Type_List_VA = {"De Laval Cone (With Nozzle Extension)",
  880.                                         "De Laval Bell (With Nozzle Extension)", "Expanding Nozzle"};
  881.                                 Collections.shuffle(Arrays.asList(nozzle_Type_List_VA));
  882.                                 Random nozzleTypeVAspikeChosen = new Random();
  883.                                 int nozzleTypeVAspikeChosen_index = nozzleTypeVAspikeChosen.nextInt(nozzle_Type_List_VA.length);
  884.                                 nozzle_Type_Chosen = nozzle_Type_List_VA[nozzleTypeVAspikeChosen_index];
  885.                             }
  886.                             case "Any Altitude (0-80 km+)" -> {
  887.                                 String[] nozzle_Type_List_Aero = {"Linear Aerospike Nozzle", "Toroidal Aerospike Nozzle", "Expansion-Deflection Nozzle"};
  888.                                 Collections.shuffle(Arrays.asList(nozzle_Type_List_Aero));
  889.                                 Random nozzleTypeAerospikeChosen = new Random();
  890.                                 int nozzleTypeAerospikeChosen_index = nozzleTypeAerospikeChosen.nextInt(nozzle_Type_List_Aero.length);
  891.                                 nozzle_Type_Chosen = nozzle_Type_List_Aero[nozzleTypeAerospikeChosen_index];
  892.                             }
  893.                         }
  894.  
  895.                         System.out.println(lbrk + "\n" + "Your Engine is called: " + engine_Name + "\n");
  896.                         System.out.println("Your Engine Cycle is: " + engine_Cycle_Chosen);
  897.                         System.out.println("Your oxidizer is: " + oxidizer_Chosen);
  898.                         System.out.println("Your Fuel is: " + fuel_Chosen);
  899.                         System.out.println("Your Altitude of operation is: " + altitude_Of_Operation_Chosen);
  900.                         System.out.println("Your engine's nozzle type should be : " + nozzle_Type_Chosen);
  901.                         System.out.println("Tank repressurisation would be done Autogenously" + "\n");
  902.                         XWPFDocument docx = new XWPFDocument();
  903.                         if (new File(String.valueOf(pathn1)).exists()) {
  904.                             docx = new XWPFDocument(new FileInputStream(String.valueOf(pathn1)));
  905.                         }
  906.                         XWPFParagraph par = docx.createParagraph();
  907.                         XWPFRun run = par.createRun();
  908.                         run.setFontSize(12);
  909.                         run.setBold(true);
  910.                         run.setFontFamily("Calibri");
  911.                         run.setText("Your Engine is called: ");
  912.                         XWPFRun run2 = par.createRun();
  913.                         run2.setFontSize(12);
  914.                         run.setBold(true);
  915.                         run2.setFontFamily("Calibri");
  916.                         run2.setText(engine_Name);
  917.                         run2.addBreak();
  918.                         // -----------------------------------------------------------
  919.                         XWPFRun run3 = par.createRun();
  920.                         run3.setFontSize(10);
  921.                         run3.setBold(true);
  922.                         run3.setFontFamily("Calibri");
  923.                         run3.setText("Your Engine Cycle is: ");
  924.                         XWPFRun run4 = par.createRun();
  925.                         run4.setFontSize(10);
  926.                         run4.setFontFamily("Calibri");
  927.                         run4.setText(engine_Cycle_Chosen);
  928.                         run4.addBreak();
  929.                         // -----------------------------------------------------------
  930.                         XWPFRun run5 = par.createRun();
  931.                         run5.setFontSize(10);
  932.                         run5.setBold(true);
  933.                         run5.setFontFamily("Calibri");
  934.                         run5.setText("Your oxidizer is: ");
  935.                         XWPFRun run6 = par.createRun();
  936.                         run6.setFontSize(10);
  937.                         run6.setFontFamily("Calibri");
  938.                         run6.setText(oxidizer_Chosen);
  939.                         run6.addBreak();
  940.                         // -----------------------------------------------------------
  941.                         XWPFRun run8 = par.createRun();
  942.                         run8.setFontSize(10);
  943.                         run8.setBold(true);
  944.                         run8.setFontFamily("Calibri");
  945.                         run8.setText("Your Fuel is: ");
  946.                         XWPFRun run7 = par.createRun();
  947.                         run7.setFontSize(10);
  948.                         run7.setFontFamily("Calibri");
  949.                         run7.setText(fuel_Chosen);
  950.                         run7.addBreak();
  951.                         // -----------------------------------------------------------
  952.                         XWPFRun run9 = par.createRun();
  953.                         run9.setFontSize(10);
  954.                         run9.setBold(true);
  955.                         run9.setFontFamily("Calibri");
  956.                         run9.setText("Your engine's nozzle type should be: ");
  957.                         XWPFRun run0 = par.createRun();
  958.                         run0.setFontSize(10);
  959.                         run0.setFontFamily("Calibri");
  960.                         run0.setText(nozzle_Type_Chosen);
  961.                         run0.addBreak();
  962.                         // -----------------------------------------------------------
  963.                         XWPFRun run11 = par.createRun();
  964.                         run11.setFontSize(10);
  965.                         run11.setBold(true);
  966.                         run11.setFontFamily("Calibri");
  967.                         run11.setText("Tank repressurisation would be done ");
  968.                         XWPFRun run12 = par.createRun();
  969.                         run12.setFontSize(10);
  970.                         run12.setBold(true);
  971.                         run12.setFontFamily("Calibri");
  972.                         run12.setText("Autogenously");
  973.                         run12.addBreak();
  974.                         // -----------------------------------------------------------
  975.                         try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  976.                             docx.write(out);
  977.                         }
  978.                     }
  979.                     case "Staged Combustion (Fuel Rich)" -> {
  980.                         String[] oxidizer_List4 = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)",
  981.                                 "N2H4 (Hydrazine)", "O3 (Ozone)"};
  982.                         Collections.shuffle(Arrays.asList(oxidizer_List4));
  983.                         Random oxidizerChosen = new Random();
  984.                         int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List4.length);
  985.                         String oxidizer_Chosen = oxidizer_List4[oxidizerChosen_index];
  986.  
  987.                         String fuel_Chosen = "";
  988.                         switch (oxidizer_Chosen) {
  989.                             case "O2 (Oxygen)", "F2 (Fluorine)" -> {
  990.                                 String[] fuel_List4 = {"H2 (Hydrogen)", "NH3 (Ammonia)", "N2H4 (Hydrazine)", "B2H6 (Diborane)",
  991.                                         "B5H9 (Pentaborane)"};
  992.                                 Collections.shuffle(Arrays.asList(fuel_List4));
  993.                                 Random fuelChosen = new Random();
  994.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List4.length);
  995.                                 fuel_Chosen = fuel_List4[fuelChosen_index];
  996.                             }
  997.                             case "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)" -> {
  998.                                 String[] fuel_List6 = {"H2 (Hydrogen)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
  999.                                 Collections.shuffle(Arrays.asList(fuel_List6));
  1000.                                 Random fuelChosen = new Random();
  1001.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List6.length);
  1002.                                 fuel_Chosen = fuel_List6[fuelChosen_index];
  1003.                             }
  1004.                             case "N2H4 (Hydrazine)" -> {
  1005.                                 String[] fuel_List7 = {"H2 (Hydrogen)", "B2H6 (Diborane)"};
  1006.                                 Collections.shuffle(Arrays.asList(fuel_List7));
  1007.                                 Random fuelChosen = new Random();
  1008.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List7.length);
  1009.                                 fuel_Chosen = fuel_List7[fuelChosen_index];
  1010.                             }
  1011.                         }
  1012.                         Collections.shuffle(Arrays.asList(tank_Repressurisation));
  1013.                         Random tankRepressurisationChosen = new Random();
  1014.                         int tankRepressurisationChosen_index = tankRepressurisationChosen.nextInt(tank_Repressurisation.length);
  1015.                         String tank_Repressurisation_Chosen = tank_Repressurisation[tankRepressurisationChosen_index];
  1016.  
  1017.                         Collections.shuffle(Arrays.asList(altitude_Of_Operation));
  1018.                         Random altitudeOfOperationChosen = new Random();
  1019.                         int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
  1020.                         String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
  1021.  
  1022.                         String nozzle_Type_Chosen = "";
  1023.                         switch (altitude_Of_Operation_Chosen) {
  1024.                             case "0-10 km (Sea Level)" -> {
  1025.                                 String[] nozzle_Type_List_SL = {"De Laval Cone (Without Nozzle Extension)",
  1026.                                         "De Laval Bell (Without Nozzle Extension)"};
  1027.                                 Collections.shuffle(Arrays.asList(nozzle_Type_List_SL));
  1028.                                 Random nozzleTypeSLspikeChosen = new Random();
  1029.                                 int nozzleTypeSLspikeChosen_index = nozzleTypeSLspikeChosen.nextInt(nozzle_Type_List_SL.length);
  1030.                                 nozzle_Type_Chosen = nozzle_Type_List_SL[nozzleTypeSLspikeChosen_index];
  1031.                             }
  1032.                             case "20-30 km (Medium Atmosphere)" -> {
  1033.                                 String[] nozzle_Type_List_HA = {"De Laval Bell (Without Nozzle Extension)", "De Laval Cone (With Nozzle Extension)",
  1034.                                         "De Laval Bell (With Nozzle Extension)", "Dual Bell Nozzle"};
  1035.                                 Collections.shuffle(Arrays.asList(nozzle_Type_List_HA));
  1036.                                 Random nozzleTypeHAspikeChosen = new Random();
  1037.                                 int nozzleTypeHAspikeChosen_index = nozzleTypeHAspikeChosen.nextInt(nozzle_Type_List_HA.length);
  1038.                                 nozzle_Type_Chosen = nozzle_Type_List_HA[nozzleTypeHAspikeChosen_index];
  1039.                             }
  1040.                             case "30-80 km (High Atmosphere)" -> {
  1041.                                 String[] nozzle_Type_List_HAi = {"De Laval Cone (With Nozzle Extension)", "De Laval Bell (With Nozzle Extension)",
  1042.                                         "Dual Bell Nozzle"};
  1043.                                 Collections.shuffle(Arrays.asList(nozzle_Type_List_HAi));
  1044.                                 Random nozzleTypeHAispikeChosen = new Random();
  1045.                                 int nozzleTypeHAispikeChosen_index = nozzleTypeHAispikeChosen.nextInt(nozzle_Type_List_HAi.length);
  1046.                                 nozzle_Type_Chosen = nozzle_Type_List_HAi[nozzleTypeHAispikeChosen_index];
  1047.                             }
  1048.                             case "80 km+ (Vacuum)" -> {
  1049.                                 String[] nozzle_Type_List_VA = {"De Laval Cone (With Nozzle Extension)",
  1050.                                         "De Laval Bell (With Nozzle Extension)", "Expanding Nozzle"};
  1051.                                 Collections.shuffle(Arrays.asList(nozzle_Type_List_VA));
  1052.                                 Random nozzleTypeVAspikeChosen = new Random();
  1053.                                 int nozzleTypeVAspikeChosen_index = nozzleTypeVAspikeChosen.nextInt(nozzle_Type_List_VA.length);
  1054.                                 nozzle_Type_Chosen = nozzle_Type_List_VA[nozzleTypeVAspikeChosen_index];
  1055.                             }
  1056.                             case "Any Altitude (0-80 km+)" -> {
  1057.                                 String[] nozzle_Type_List_Aero = {"Linear Aerospike Nozzle", "Toroidal Aerospike Nozzle", "Expansion-Deflection Nozzle"};
  1058.                                 Collections.shuffle(Arrays.asList(nozzle_Type_List_Aero));
  1059.                                 Random nozzleTypeAerospikeChosen = new Random();
  1060.                                 int nozzleTypeAerospikeChosen_index = nozzleTypeAerospikeChosen.nextInt(nozzle_Type_List_Aero.length);
  1061.                                 nozzle_Type_Chosen = nozzle_Type_List_Aero[nozzleTypeAerospikeChosen_index];
  1062.                             }
  1063.                         }
  1064.  
  1065.                         System.out.println(lbrk + "\n" + "Your Engine is called: " + engine_Name + "\n");
  1066.                         System.out.println("Your Engine Cycle is: " + engine_Cycle_Chosen);
  1067.                         System.out.println("Your oxidizer is: " + oxidizer_Chosen);
  1068.                         System.out.println("Your Fuel is: " + fuel_Chosen);
  1069.                         System.out.println("Your Altitude of operation is: " + altitude_Of_Operation_Chosen);
  1070.                         System.out.println("Your engine's nozzle type should be : " + nozzle_Type_Chosen);
  1071.                         System.out.println("Tank repressurisation would be done " + tank_Repressurisation_Chosen + "\n");
  1072.                         XWPFDocument docx = new XWPFDocument();
  1073.                         if (new File(String.valueOf(pathn1)).exists()) {
  1074.                             docx = new XWPFDocument(new FileInputStream(String.valueOf(pathn1)));
  1075.                         }
  1076.                         XWPFParagraph par = docx.createParagraph();
  1077.                         XWPFRun run = par.createRun();
  1078.                         run.setFontSize(12);
  1079.                         run.setBold(true);
  1080.                         run.setFontFamily("Calibri");
  1081.                         run.setText("Your Engine is called: ");
  1082.                         XWPFRun run2 = par.createRun();
  1083.                         run2.setFontSize(12);
  1084.                         run.setBold(true);
  1085.                         run2.setFontFamily("Calibri");
  1086.                         run2.setText(engine_Name);
  1087.                         run2.addBreak();
  1088.                         // -----------------------------------------------------------
  1089.                         XWPFRun run3 = par.createRun();
  1090.                         run3.setFontSize(10);
  1091.                         run3.setBold(true);
  1092.                         run3.setFontFamily("Calibri");
  1093.                         run3.setText("Your Engine Cycle is: ");
  1094.                         XWPFRun run4 = par.createRun();
  1095.                         run4.setFontSize(10);
  1096.                         run4.setFontFamily("Calibri");
  1097.                         run4.setText(engine_Cycle_Chosen);
  1098.                         run4.addBreak();
  1099.                         // -----------------------------------------------------------
  1100.                         XWPFRun run5 = par.createRun();
  1101.                         run5.setFontSize(10);
  1102.                         run5.setBold(true);
  1103.                         run5.setFontFamily("Calibri");
  1104.                         run5.setText("Your oxidizer is: ");
  1105.                         XWPFRun run6 = par.createRun();
  1106.                         run6.setFontSize(10);
  1107.                         run6.setFontFamily("Calibri");
  1108.                         run6.setText(oxidizer_Chosen);
  1109.                         run6.addBreak();
  1110.                         // -----------------------------------------------------------
  1111.                         XWPFRun run8 = par.createRun();
  1112.                         run8.setFontSize(10);
  1113.                         run8.setBold(true);
  1114.                         run8.setFontFamily("Calibri");
  1115.                         run8.setText("Your Fuel is: ");
  1116.                         XWPFRun run7 = par.createRun();
  1117.                         run7.setFontSize(10);
  1118.                         run7.setFontFamily("Calibri");
  1119.                         run7.setText(fuel_Chosen);
  1120.                         run7.addBreak();
  1121.                         // -----------------------------------------------------------
  1122.                         XWPFRun run9 = par.createRun();
  1123.                         run9.setFontSize(10);
  1124.                         run9.setBold(true);
  1125.                         run9.setFontFamily("Calibri");
  1126.                         run9.setText("Your engine's nozzle type should be: ");
  1127.                         XWPFRun run0 = par.createRun();
  1128.                         run0.setFontSize(10);
  1129.                         run0.setFontFamily("Calibri");
  1130.                         run0.setText(nozzle_Type_Chosen);
  1131.                         run0.addBreak();
  1132.                         // -----------------------------------------------------------
  1133.                         XWPFRun run11 = par.createRun();
  1134.                         run11.setFontSize(10);
  1135.                         run11.setBold(true);
  1136.                         run11.setFontFamily("Calibri");
  1137.                         run11.setText("Tank repressurisation would be done ");
  1138.                         XWPFRun run12 = par.createRun();
  1139.                         run12.setFontSize(10);
  1140.                         run12.setBold(true);
  1141.                         run12.setFontFamily("Calibri");
  1142.                         run12.setText(tank_Repressurisation_Chosen);
  1143.                         run12.addBreak();
  1144.                         // -----------------------------------------------------------
  1145.                         try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  1146.                             docx.write(out);
  1147.                         }
  1148.                     }
  1149.                     case "Full Flow Staged Combustion", "Combustion Tap Off" -> {
  1150.                         String[] oxidizer_List4 = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)",
  1151.                                 "N2H4 (Hydrazine)", "O3 (Ozone)"};
  1152.                         Collections.shuffle(Arrays.asList(oxidizer_List4));
  1153.                         Random oxidizerChosen = new Random();
  1154.                         int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List4.length);
  1155.                         String oxidizer_Chosen = oxidizer_List4[oxidizerChosen_index];
  1156.  
  1157.                         String fuel_Chosen = "";
  1158.                         switch (oxidizer_Chosen) {
  1159.                             case "O2 (Oxygen)" -> {
  1160.                                 String[] fuel_List4 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  1161.                                         "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  1162.                                         "CH3OH (Methanol)", "B2H6 (Diborane)", "B5H9 (Pentaborane)", "C2H6 (Ethane)"};
  1163.                                 Collections.shuffle(Arrays.asList(fuel_List4));
  1164.                                 Random fuelChosen = new Random();
  1165.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List4.length);
  1166.                                 fuel_Chosen = fuel_List4[fuelChosen_index];
  1167.                             }
  1168.                             case "F2 (Fluorine)" -> {
  1169.                                 String[] fuel_List5 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  1170.                                         "NH3 (Ammonia)", "C2H8N2 (UnsymetricalDimethylHydrazine)", "CH6N2 (MonomethylHydrazine)",
  1171.                                         "N2H4 (Hydrazine)", "CH3OH (Methanol)", "B2H6 (Diborane)", "B5H9 (Pentaborane)", "C2H6 (Ethane)"};
  1172.                                 Collections.shuffle(Arrays.asList(fuel_List5));
  1173.                                 Random fuelChosen = new Random();
  1174.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List5.length);
  1175.                                 fuel_Chosen = fuel_List5[fuelChosen_index];
  1176.                             }
  1177.                             case "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)" -> {
  1178.                                 String[] fuel_List6 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  1179.                                         "C6H5NH2 (Aniline)", "75% CH6N2 + 25% N2H4 (UH-25)", "50% CH6N2 + 50% N2H4 (Aerosine-50)",
  1180.                                         "CH6N2 (MonomethylHydrazine)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
  1181.                                 Collections.shuffle(Arrays.asList(fuel_List6));
  1182.                                 Random fuelChosen = new Random();
  1183.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List6.length);
  1184.                                 fuel_Chosen = fuel_List6[fuelChosen_index];
  1185.                             }
  1186.                             case "N2H4 (Hydrazine)" -> {
  1187.                                 String[] fuel_List7 = {"H2 (Hydrogen)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  1188.                                         "C6H5NH2 (Aniline)", "75% CH6N2 + 25% N2H4 (UH-25)", "50% CH6N2 + 50% N2H4 (Aerosine-50)",
  1189.                                         "C2H8N2 (UnsymetricalDimethylHydrazine)", "CH3OH (Methanol)", "B2H6 (Diborane)"};
  1190.                                 Collections.shuffle(Arrays.asList(fuel_List7));
  1191.                                 Random fuelChosen = new Random();
  1192.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List7.length);
  1193.                                 fuel_Chosen = fuel_List7[fuelChosen_index];
  1194.                             }
  1195.                         }
  1196.                         Collections.shuffle(Arrays.asList(tank_Repressurisation));
  1197.                         Random tankRepressurisationChosen = new Random();
  1198.                         int tankRepressurisationChosen_index = tankRepressurisationChosen.nextInt(tank_Repressurisation.length);
  1199.                         String tank_Repressurisation_Chosen = tank_Repressurisation[tankRepressurisationChosen_index];
  1200.  
  1201.                         Collections.shuffle(Arrays.asList(altitude_Of_Operation));
  1202.                         Random altitudeOfOperationChosen = new Random();
  1203.                         int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
  1204.                         String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
  1205.  
  1206.                         String nozzle_Type_Chosen = "";
  1207.                         switch (altitude_Of_Operation_Chosen) {
  1208.                             case "0-10 km (Sea Level)" -> {
  1209.                                 String[] nozzle_Type_List_SL = {"De Laval Cone (Without Nozzle Extension)",
  1210.                                         "De Laval Bell (Without Nozzle Extension)"};
  1211.                                 Collections.shuffle(Arrays.asList(nozzle_Type_List_SL));
  1212.                                 Random nozzleTypeSLspikeChosen = new Random();
  1213.                                 int nozzleTypeSLspikeChosen_index = nozzleTypeSLspikeChosen.nextInt(nozzle_Type_List_SL.length);
  1214.                                 nozzle_Type_Chosen = nozzle_Type_List_SL[nozzleTypeSLspikeChosen_index];
  1215.                             }
  1216.                             case "20-30 km (Medium Atmosphere)" -> {
  1217.                                 String[] nozzle_Type_List_HA = {"De Laval Bell (Without Nozzle Extension)", "De Laval Cone (With Nozzle Extension)",
  1218.                                         "De Laval Bell (With Nozzle Extension)", "Dual Bell Nozzle"};
  1219.                                 Collections.shuffle(Arrays.asList(nozzle_Type_List_HA));
  1220.                                 Random nozzleTypeHAspikeChosen = new Random();
  1221.                                 int nozzleTypeHAspikeChosen_index = nozzleTypeHAspikeChosen.nextInt(nozzle_Type_List_HA.length);
  1222.                                 nozzle_Type_Chosen = nozzle_Type_List_HA[nozzleTypeHAspikeChosen_index];
  1223.                             }
  1224.                             case "30-80 km (High Atmosphere)" -> {
  1225.                                 String[] nozzle_Type_List_HAi = {"De Laval Cone (With Nozzle Extension)", "De Laval Bell (With Nozzle Extension)",
  1226.                                         "Dual Bell Nozzle"};
  1227.                                 Collections.shuffle(Arrays.asList(nozzle_Type_List_HAi));
  1228.                                 Random nozzleTypeHAispikeChosen = new Random();
  1229.                                 int nozzleTypeHAispikeChosen_index = nozzleTypeHAispikeChosen.nextInt(nozzle_Type_List_HAi.length);
  1230.                                 nozzle_Type_Chosen = nozzle_Type_List_HAi[nozzleTypeHAispikeChosen_index];
  1231.                             }
  1232.                             case "80 km+ (Vacuum)" -> {
  1233.                                 String[] nozzle_Type_List_VA = {"De Laval Cone (With Nozzle Extension)",
  1234.                                         "De Laval Bell (With Nozzle Extension)", "Expanding Nozzle"};
  1235.                                 Collections.shuffle(Arrays.asList(nozzle_Type_List_VA));
  1236.                                 Random nozzleTypeVAspikeChosen = new Random();
  1237.                                 int nozzleTypeVAspikeChosen_index = nozzleTypeVAspikeChosen.nextInt(nozzle_Type_List_VA.length);
  1238.                                 nozzle_Type_Chosen = nozzle_Type_List_VA[nozzleTypeVAspikeChosen_index];
  1239.                             }
  1240.                             case "Any Altitude (0-80 km+)" -> {
  1241.                                 String[] nozzle_Type_List_Aero = {"Linear Aerospike Nozzle", "Toroidal Aerospike Nozzle", "Expansion-Deflection Nozzle"};
  1242.                                 Collections.shuffle(Arrays.asList(nozzle_Type_List_Aero));
  1243.                                 Random nozzleTypeAerospikeChosen = new Random();
  1244.                                 int nozzleTypeAerospikeChosen_index = nozzleTypeAerospikeChosen.nextInt(nozzle_Type_List_Aero.length);
  1245.                                 nozzle_Type_Chosen = nozzle_Type_List_Aero[nozzleTypeAerospikeChosen_index];
  1246.                             }
  1247.                         }
  1248.  
  1249.                         System.out.println(lbrk + "\n" + "Your Engine is called: " + engine_Name + "\n");
  1250.                         System.out.println("Your Engine Cycle is: " + engine_Cycle_Chosen);
  1251.                         System.out.println("Your oxidizer is: " + oxidizer_Chosen);
  1252.                         System.out.println("Your Fuel is: " + fuel_Chosen);
  1253.                         System.out.println("Your Altitude of operation is: " + altitude_Of_Operation_Chosen);
  1254.                         System.out.println("Your engine's nozzle type should be : " + nozzle_Type_Chosen);
  1255.                         System.out.println("Tank repressurisation would be done " + tank_Repressurisation_Chosen + "\n");
  1256.                         XWPFDocument docx = new XWPFDocument();
  1257.                         if (new File(String.valueOf(pathn1)).exists()) {
  1258.                             docx = new XWPFDocument(new FileInputStream(String.valueOf(pathn1)));
  1259.                         }
  1260.                         XWPFParagraph par = docx.createParagraph();
  1261.                         XWPFRun run = par.createRun();
  1262.                         run.setFontSize(12);
  1263.                         run.setBold(true);
  1264.                         run.setFontFamily("Calibri");
  1265.                         run.setText("Your Engine is called: ");
  1266.                         XWPFRun run2 = par.createRun();
  1267.                         run2.setFontSize(12);
  1268.                         run.setBold(true);
  1269.                         run2.setFontFamily("Calibri");
  1270.                         run2.setText(engine_Name);
  1271.                         run2.addBreak();
  1272.                         // -----------------------------------------------------------
  1273.                         XWPFRun run3 = par.createRun();
  1274.                         run3.setFontSize(10);
  1275.                         run3.setBold(true);
  1276.                         run3.setFontFamily("Calibri");
  1277.                         run3.setText("Your Engine Cycle is: ");
  1278.                         XWPFRun run4 = par.createRun();
  1279.                         run4.setFontSize(10);
  1280.                         run4.setFontFamily("Calibri");
  1281.                         run4.setText(engine_Cycle_Chosen);
  1282.                         run4.addBreak();
  1283.                         // -----------------------------------------------------------
  1284.                         XWPFRun run5 = par.createRun();
  1285.                         run5.setFontSize(10);
  1286.                         run5.setBold(true);
  1287.                         run5.setFontFamily("Calibri");
  1288.                         run5.setText("Your oxidizer is: ");
  1289.                         XWPFRun run6 = par.createRun();
  1290.                         run6.setFontSize(10);
  1291.                         run6.setFontFamily("Calibri");
  1292.                         run6.setText(oxidizer_Chosen);
  1293.                         run6.addBreak();
  1294.                         // -----------------------------------------------------------
  1295.                         XWPFRun run8 = par.createRun();
  1296.                         run8.setFontSize(10);
  1297.                         run8.setBold(true);
  1298.                         run8.setFontFamily("Calibri");
  1299.                         run8.setText("Your Fuel is: ");
  1300.                         XWPFRun run7 = par.createRun();
  1301.                         run7.setFontSize(10);
  1302.                         run7.setFontFamily("Calibri");
  1303.                         run7.setText(fuel_Chosen);
  1304.                         run7.addBreak();
  1305.                         // -----------------------------------------------------------
  1306.                         XWPFRun run9 = par.createRun();
  1307.                         run9.setFontSize(10);
  1308.                         run9.setBold(true);
  1309.                         run9.setFontFamily("Calibri");
  1310.                         run9.setText("Your engine's nozzle type should be: ");
  1311.                         XWPFRun run0 = par.createRun();
  1312.                         run0.setFontSize(10);
  1313.                         run0.setFontFamily("Calibri");
  1314.                         run0.setText(nozzle_Type_Chosen);
  1315.                         run0.addBreak();
  1316.                         // -----------------------------------------------------------
  1317.                         XWPFRun run11 = par.createRun();
  1318.                         run11.setFontSize(10);
  1319.                         run11.setBold(true);
  1320.                         run11.setFontFamily("Calibri");
  1321.                         run11.setText("Tank repressurisation would be done ");
  1322.                         XWPFRun run12 = par.createRun();
  1323.                         run12.setFontSize(10);
  1324.                         run12.setBold(true);
  1325.                         run12.setFontFamily("Calibri");
  1326.                         run12.setText(tank_Repressurisation_Chosen);
  1327.                         run12.addBreak();
  1328.                         // -----------------------------------------------------------
  1329.                         try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  1330.                             docx.write(out);
  1331.                         }
  1332.                     }
  1333.                     default -> {
  1334.                         String[] oxidizer_List6 = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)",
  1335.                                 "N2O4 (Nitrogen Tetroxide)", "N2H4 (Hydrazine)", "H2O2 (Hydrogen Peroxide) 95%",
  1336.                                 "H2O2 (Hydrogen Peroxide) 85%", "O3 (Ozone)", "AK20F: 80% HNO3 + 20% N2O4 (Nitric Acid)",
  1337.                                 "AK20I: 80% HNO3 + 20% N2O4 (Nitric Acid)", "AK20K: 80% HNO3 + 20% N2O4 (Nitric Acid)",
  1338.                                 "AK27I: 73% HNO3 + 27% N2O4 (Nitric Acid)", "AK27P: 73% HNO3 + 27% N2O4 (Nitric Acid)",
  1339.                                 "ClF3 (Chlorine Trifluoride)", "ClF5 (Chlorine Pentafluoride)"};
  1340.                         Collections.shuffle(Arrays.asList(oxidizer_List6));
  1341.                         Random oxidizerChosen = new Random();
  1342.                         int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List6.length);
  1343.                         String oxidizer_Chosen = oxidizer_List6[oxidizerChosen_index];
  1344.  
  1345.                         String fuel_Chosen = "";
  1346.                         switch (oxidizer_Chosen) {
  1347.                             case "O2 (Oxygen)" -> {
  1348.                                 String[] fuel_List8 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  1349.                                         "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "CH6N2 (MonomethylHydrazine)",
  1350.                                         "N2H4 (Hydrazine)", "CH3OH (Methanol)", "C12H24 (Kerosene)", "B2H6 (Diborane)", "B5H9 (Pentaborane)",
  1351.                                         "C2H6 (Ethane)"};
  1352.                                 Collections.shuffle(Arrays.asList(fuel_List8));
  1353.                                 Random fuelChosen = new Random();
  1354.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List8.length);
  1355.                                 fuel_Chosen = fuel_List8[fuelChosen_index];
  1356.                             }
  1357.                             case "F2 (Fluorine)" -> {
  1358.                                 String[] fuel_List9 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  1359.                                         "C6H5NH2 (Aniline)", "NH3 (Ammonia)",
  1360.                                         "C2H8N2 (UnsymetricalDimethylHydrazine)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  1361.                                         "CH3OH (Methanol)", "C12H24 (Kerosene)", "B2H6 (Diborane)", "B5H9 (Pentaborane)", "C2H6 (Ethane)"};
  1362.                                 Collections.shuffle(Arrays.asList(fuel_List9));
  1363.                                 Random fuelChosen = new Random();
  1364.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List9.length);
  1365.                                 fuel_Chosen = fuel_List9[fuelChosen_index];
  1366.                             }
  1367.                             case "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)" -> {
  1368.                                 String[] fuel_List10 = {"H2 (Hydrogen)", "CH3OH (Methanol)", "C12H24 (Kerosene)", "B2H6 (Diborane)",
  1369.                                         "B5H9 (Pentaborane)", "C2H6 (Ethane)"};
  1370.                                 Collections.shuffle(Arrays.asList(fuel_List10));
  1371.                                 Random fuelChosen = new Random();
  1372.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List10.length);
  1373.                                 fuel_Chosen = fuel_List10[fuelChosen_index];
  1374.                             }
  1375.                             case "AK20F: 80% HNO3 + 20% N2O4 (Nitric Acid)", "AK20I: 80% HNO3 + 20% N2O4 (Nitric Acid)",
  1376.                                     "AK20K: 80% HNO3 + 20% N2O4 (Nitric Acid)", "AK27I: 73% HNO3 + 27% N2O4 (Nitric Acid)",
  1377.                                     "AK27P: 73% HNO3 + 27% N2O4 (Nitric Acid)", "ClF3 (Chlorine Trifluoride)",
  1378.                                     "ClF5 (Chlorine Pentafluoride)" -> {
  1379.                                 String[] fuel_List11 = {"C2H5OH(Ethanol) 85%", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  1380.                                         "CH3OH (Methanol)"};
  1381.                                 Collections.shuffle(Arrays.asList(fuel_List11));
  1382.                                 Random fuelChosen = new Random();
  1383.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List11.length);
  1384.                                 fuel_Chosen = fuel_List11[fuelChosen_index];
  1385.                             }
  1386.                             case "N2O4 (Nitrogen Tetroxide)", "H2O2 (Hydrogen Peroxide) 95%", "H2O2 (Hydrogen Peroxide) 85%" -> {
  1387.                                 String[] fuel_List12 = {"H2 (Hydrogen)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  1388.                                         "C6H5NH2 (Aniline)", "75% CH6N2 + 25% N2H4 (UH-25)", "50% CH6N2 + 50% N2H4 (Aerosine-50)",
  1389.                                         "C2H8N2 (UnsymmetricalDimethylHydrazine)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  1390.                                         "CH3OH (Methanol)", "C12H24 (Kerosene)", "C2H6 (Ethane)"};
  1391.                                 Collections.shuffle(Arrays.asList(fuel_List12));
  1392.                                 Random fuelChosen = new Random();
  1393.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List12.length);
  1394.                                 fuel_Chosen = fuel_List12[fuelChosen_index];
  1395.                             }
  1396.                             case "N2H4 (Hydrazine)" -> {
  1397.                                 String[] fuel_List13 = {"B2H6 (Diborane)", "B5H9 (Pentaborane)"};
  1398.                                 Collections.shuffle(Arrays.asList(fuel_List13));
  1399.                                 Random fuelChosen = new Random();
  1400.                                 int fuelChosen_index = fuelChosen.nextInt(fuel_List13.length);
  1401.                                 fuel_Chosen = fuel_List13[fuelChosen_index];
  1402.                             }
  1403.                         }
  1404.  
  1405.                         Collections.shuffle(Arrays.asList(tank_Repressurisation));
  1406.                         Random tankRepressurisationChosen = new Random();
  1407.                         int tankRepressurisationChosen_index = tankRepressurisationChosen.nextInt(tank_Repressurisation.length);
  1408.                         String tank_Repressurisation_Chosen = tank_Repressurisation[tankRepressurisationChosen_index];
  1409.  
  1410.                         Collections.shuffle(Arrays.asList(altitude_Of_Operation));
  1411.                         Random altitudeOfOperationChosen = new Random();
  1412.                         int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
  1413.                         String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
  1414.  
  1415.                         String nozzle_Type_Chosen = "";
  1416.                         switch (altitude_Of_Operation_Chosen) {
  1417.                             case "0-10 km (Sea Level)" -> {
  1418.                                 String[] nozzle_Type_List_SL = {"De Laval Cone (Without Nozzle Extension)",
  1419.                                         "De Laval Bell (Without Nozzle Extension)"};
  1420.                                 Collections.shuffle(Arrays.asList(nozzle_Type_List_SL));
  1421.                                 Random nozzleTypeSLspikeChosen = new Random();
  1422.                                 int nozzleTypeSLspikeChosen_index = nozzleTypeSLspikeChosen.nextInt(nozzle_Type_List_SL.length);
  1423.                                 nozzle_Type_Chosen = nozzle_Type_List_SL[nozzleTypeSLspikeChosen_index];
  1424.                             }
  1425.                             case "20-30 km (Medium Atmosphere)" -> {
  1426.                                 String[] nozzle_Type_List_HA = {"De Laval Bell (Without Nozzle Extension)", "De Laval Cone (With Nozzle Extension)",
  1427.                                         "De Laval Bell (With Nozzle Extension)", "Dual Bell Nozzle"};
  1428.                                 Collections.shuffle(Arrays.asList(nozzle_Type_List_HA));
  1429.                                 Random nozzleTypeHAspikeChosen = new Random();
  1430.                                 int nozzleTypeHAspikeChosen_index = nozzleTypeHAspikeChosen.nextInt(nozzle_Type_List_HA.length);
  1431.                                 nozzle_Type_Chosen = nozzle_Type_List_HA[nozzleTypeHAspikeChosen_index];
  1432.                             }
  1433.                             case "30-80 km (High Atmosphere)" -> {
  1434.                                 String[] nozzle_Type_List_HAi = {"De Laval Cone (With Nozzle Extension)", "De Laval Bell (With Nozzle Extension)",
  1435.                                         "Dual Bell Nozzle"};
  1436.                                 Collections.shuffle(Arrays.asList(nozzle_Type_List_HAi));
  1437.                                 Random nozzleTypeHAispikeChosen = new Random();
  1438.                                 int nozzleTypeHAispikeChosen_index = nozzleTypeHAispikeChosen.nextInt(nozzle_Type_List_HAi.length);
  1439.                                 nozzle_Type_Chosen = nozzle_Type_List_HAi[nozzleTypeHAispikeChosen_index];
  1440.                             }
  1441.                             case "80 km+ (Vacuum)" -> {
  1442.                                 String[] nozzle_Type_List_VA = {"De Laval Cone (With Nozzle Extension)",
  1443.                                         "De Laval Bell (With Nozzle Extension)", "Expanding Nozzle"};
  1444.                                 Collections.shuffle(Arrays.asList(nozzle_Type_List_VA));
  1445.                                 Random nozzleTypeVAspikeChosen = new Random();
  1446.                                 int nozzleTypeVAspikeChosen_index = nozzleTypeVAspikeChosen.nextInt(nozzle_Type_List_VA.length);
  1447.                                 nozzle_Type_Chosen = nozzle_Type_List_VA[nozzleTypeVAspikeChosen_index];
  1448.                             }
  1449.                             case "Any Altitude (0-80 km+)" -> {
  1450.                                 String[] nozzle_Type_List_Aero = {"Linear Aerospike Nozzle", "Toroidal Aerospike Nozzle", "Expansion-Deflection Nozzle"};
  1451.                                 Collections.shuffle(Arrays.asList(nozzle_Type_List_Aero));
  1452.                                 Random nozzleTypeAerospikeChosen = new Random();
  1453.                                 int nozzleTypeAerospikeChosen_index = nozzleTypeAerospikeChosen.nextInt(nozzle_Type_List_Aero.length);
  1454.                                 nozzle_Type_Chosen = nozzle_Type_List_Aero[nozzleTypeAerospikeChosen_index];
  1455.                             }
  1456.                         }
  1457.                         System.out.println(lbrk + "\n" + "Your Engine is called: " + engine_Name + "\n");
  1458.                         System.out.println("Your Engine Cycle is: " + engine_Cycle_Chosen);
  1459.                         System.out.println("Your oxidizer is: " + oxidizer_Chosen);
  1460.                         System.out.println("Your Fuel is: " + fuel_Chosen);
  1461.                         System.out.println("Your Altitude of operation is: " + altitude_Of_Operation_Chosen);
  1462.                         System.out.println("Your engine's nozzle type should be : " + nozzle_Type_Chosen);
  1463.                         System.out.println("Tank repressurisation would be done " + tank_Repressurisation_Chosen + "\n");
  1464.                         XWPFDocument docx = new XWPFDocument();
  1465.                         if (new File(String.valueOf(pathn1)).exists()) {
  1466.                             docx = new XWPFDocument(new FileInputStream(String.valueOf(pathn1)));
  1467.                         }
  1468.                         XWPFParagraph par = docx.createParagraph();
  1469.                         XWPFRun run = par.createRun();
  1470.                         run.setFontSize(12);
  1471.                         run.setBold(true);
  1472.                         run.setFontFamily("Calibri");
  1473.                         run.setText("Your Engine is called: ");
  1474.                         XWPFRun run2 = par.createRun();
  1475.                         run2.setFontSize(12);
  1476.                         run.setBold(true);
  1477.                         run2.setFontFamily("Calibri");
  1478.                         run2.setText(engine_Name);
  1479.                         run2.addBreak();
  1480.                         // -----------------------------------------------------------
  1481.                         XWPFRun run3 = par.createRun();
  1482.                         run3.setFontSize(10);
  1483.                         run3.setBold(true);
  1484.                         run3.setFontFamily("Calibri");
  1485.                         run3.setText("Your Engine Cycle is: ");
  1486.                         XWPFRun run4 = par.createRun();
  1487.                         run4.setFontSize(10);
  1488.                         run4.setFontFamily("Calibri");
  1489.                         run4.setText(engine_Cycle_Chosen);
  1490.                         run4.addBreak();
  1491.                         // -----------------------------------------------------------
  1492.                         XWPFRun run5 = par.createRun();
  1493.                         run5.setFontSize(10);
  1494.                         run5.setBold(true);
  1495.                         run5.setFontFamily("Calibri");
  1496.                         run5.setText("Your oxidizer is: ");
  1497.                         XWPFRun run6 = par.createRun();
  1498.                         run6.setFontSize(10);
  1499.                         run6.setFontFamily("Calibri");
  1500.                         run6.setText(oxidizer_Chosen);
  1501.                         run6.addBreak();
  1502.                         // -----------------------------------------------------------
  1503.                         XWPFRun run8 = par.createRun();
  1504.                         run8.setFontSize(10);
  1505.                         run8.setBold(true);
  1506.                         run8.setFontFamily("Calibri");
  1507.                         run8.setText("Your Fuel is: ");
  1508.                         XWPFRun run7 = par.createRun();
  1509.                         run7.setFontSize(10);
  1510.                         run7.setFontFamily("Calibri");
  1511.                         run7.setText(fuel_Chosen);
  1512.                         run7.addBreak();
  1513.                         // -----------------------------------------------------------
  1514.                         XWPFRun run9 = par.createRun();
  1515.                         run9.setFontSize(10);
  1516.                         run9.setBold(true);
  1517.                         run9.setFontFamily("Calibri");
  1518.                         run9.setText("Your engine's nozzle type should be: ");
  1519.                         XWPFRun run0 = par.createRun();
  1520.                         run0.setFontSize(10);
  1521.                         run0.setFontFamily("Calibri");
  1522.                         run0.setText(nozzle_Type_Chosen);
  1523.                         run0.addBreak();
  1524.                         // -----------------------------------------------------------
  1525.                         XWPFRun run11 = par.createRun();
  1526.                         run11.setFontSize(10);
  1527.                         run11.setBold(true);
  1528.                         run11.setFontFamily("Calibri");
  1529.                         run11.setText("Tank repressurisation would be done ");
  1530.                         XWPFRun run12 = par.createRun();
  1531.                         run12.setFontSize(10);
  1532.                         run12.setBold(true);
  1533.                         run12.setFontFamily("Calibri");
  1534.                         run12.setText(tank_Repressurisation_Chosen);
  1535.                         run12.addBreak();
  1536.                         // -----------------------------------------------------------
  1537.                         try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  1538.                             docx.write(out);
  1539.                         }
  1540.                     }
  1541.                 }
  1542.             } else {
  1543.                 while (!(repeatCommand.equalsIgnoreCase("Y") && repeatCommand.equalsIgnoreCase("N")) && repeatCommand.equalsIgnoreCase("YES") && repeatCommand.equalsIgnoreCase("NO") && !isEngineCycle) {
  1544.                     System.out.println("wrong input!");
  1545.                     System.out.print("> ");
  1546.                     repeatCommand = scanner.next();
  1547.                     if (repeatCommand.equalsIgnoreCase("Y") || repeatCommand.equalsIgnoreCase("N") || repeatCommand.equalsIgnoreCase("YES") || repeatCommand.equalsIgnoreCase("NO") || isEngineCycle) {
  1548.                         break;
  1549.                     }
  1550.                 }
  1551.             }
  1552.         } else if (std_cmd.equalsIgnoreCase("Standard")) {
  1553.             int i = 1;
  1554.             Scanner scanner = new Scanner(System.in);
  1555.             String repeatCommand = "";
  1556.             // First Logic
  1557.             while (!repeatCommand.equals("N")) {
  1558.                 System.out.println("Do you want to generate a new engine? [Y/N]");
  1559.                 System.out.print("> ");
  1560.                 repeatCommand = scanner.next();
  1561.                 boolean isEngineCycle = false;
  1562.                 for (String s : engine_Cycle) {
  1563.                     if (Objects.equals(repeatCommand, s)) {
  1564.                         isEngineCycle = true;
  1565.                         break;
  1566.                     }
  1567.                 }
  1568.                 if (repeatCommand.equalsIgnoreCase("N") || repeatCommand.equalsIgnoreCase("NO")) {
  1569.                     System.exit(0);
  1570.                 } else if (repeatCommand.equalsIgnoreCase("Y") || repeatCommand.equalsIgnoreCase("YES")) {
  1571.                     double sizeInbytes = pathn1.length();
  1572.                     double sizeInKilobytes = (sizeInbytes / 1000);
  1573.                     if (sizeInKilobytes < 80) {
  1574.                         System.out.println("size" + "------>" + pathn1.length());
  1575.                     } else {
  1576.                         File logM = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/Data");
  1577.                         logM.mkdir();
  1578.                         // ------------------------------
  1579.                         if ((new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/Data/obf_rex[Full].docx")).exists()) {
  1580.                             Path logPF = Paths.get("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/Data/obf_rex[Full]" + i + ".docx");
  1581.                             Files.copy(of, logPF);
  1582.                             i++;
  1583.                         } else {
  1584.                             Files.copy(of, path);
  1585.                         }
  1586.                         XWPFDocument docx1 = new XWPFDocument();
  1587.                         XWPFParagraph par1 = docx1.createParagraph();
  1588.                         par1.setAlignment(ParagraphAlignment.CENTER);
  1589.                         XWPFRun run1 = par1.createRun();
  1590.                         run1.setText("Rocket Engine Generator");
  1591.                         run1.setFontFamily("Calibri");
  1592.                         run1.setBold(true);
  1593.                         run1.setFontSize(33);
  1594.                         run1.setTextPosition(60);
  1595.                         // -----------------------------------------------------------------------------
  1596.                         XWPFParagraph par2 = docx1.createParagraph();
  1597.                         par2.setAlignment(ParagraphAlignment.RIGHT);
  1598.                         XWPFRun run2 = par2.createRun();
  1599.                         LocalDateTime date = LocalDateTime.now();
  1600.                         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd MMM yyyy, HH:mm:ss");
  1601.                         String dt = date.format(formatter);
  1602.                         run2.setText("Created on: " + dt);
  1603.                         run2.setFontFamily("Calibri");
  1604.                         run2.setBold(true);
  1605.                         run2.setFontSize(10);
  1606.                         run2.setTextPosition(60);
  1607.                         // ----------------------------------------------------------------------------------------------------
  1608.                         FileOutputStream out1 = new FileOutputStream(String.valueOf(pathn1));
  1609.                         docx1.write(out1);
  1610.                         out1.close();
  1611.                         docx1.close();
  1612.                     }
  1613.                     // Randomise Arrays
  1614.                     boolean Flagger;
  1615.                     String engine_Name = "";
  1616.                     if (new File("C:/Users/sfsga/IdeaProjects/demo/obf_rex.docx").exists()) {
  1617.                         Flagger = true;
  1618.                         while (Flagger) {
  1619.                             Collections.shuffle(Arrays.asList(engine_Name1));
  1620.                             Collections.shuffle(Arrays.asList(firstPart));
  1621.                             Random engineNameChosen = new Random();
  1622.                             Random firstPartC = new Random();
  1623.                             int engineNameChosen_index = engineNameChosen.nextInt(engine_Name1.length);
  1624.                             int firstPart_index = firstPartC.nextInt(firstPart.length);
  1625.                             String engNameFinalf = " " + engine_Name1[engineNameChosen_index];
  1626.                             String firstPart_f = firstPart[firstPart_index] + "-";
  1627.                             // Find number
  1628.                             int finalNumber = 10 + ((int) (Math.random() * 1001));
  1629.                             // is it eligible for letter at end = NO!
  1630.                             if (finalNumber % 8 == 0) {
  1631.                                 engine_Name = firstPart_f + finalNumber + engNameFinalf;
  1632.                             } else {
  1633.                                 char randomizedCharacter;
  1634.                                 int uio93 = 1 + ((int) (Math.random() * 1001));
  1635.                                 int uio94 = 1 + ((int) (Math.random() * 11));
  1636.                                 Random randomLetter = new Random();
  1637.                                 if (uio93 % uio94 == 0) {
  1638.                                     randomizedCharacter = (char) (randomLetter.nextInt(26) + 'a');
  1639.                                     while (randomizedCharacter == 'o' || randomizedCharacter == 'i' || randomizedCharacter == 'q' || randomizedCharacter == 'e' || randomizedCharacter == 'h' || randomizedCharacter == 'g' || randomizedCharacter == 'c' || randomizedCharacter == 'j') {
  1640.                                         randomizedCharacter = (char) (randomLetter.nextInt(26) + 'a');
  1641.                                         if (randomizedCharacter == 'o' || randomizedCharacter == 'i' || randomizedCharacter == 'q' || randomizedCharacter == 'e' || randomizedCharacter == 'h' || randomizedCharacter == 'g' || randomizedCharacter == 'c' || randomizedCharacter == 'j') {
  1642.                                             break;
  1643.                                         }
  1644.                                     }
  1645.                                 } else {
  1646.                                     randomizedCharacter = (char) (randomLetter.nextInt(26) + 'A');
  1647.                                     while (randomizedCharacter == 'O' || randomizedCharacter == 'I' || randomizedCharacter == 'Q') {
  1648.                                         randomizedCharacter = (char) (randomLetter.nextInt(26) + 'A');
  1649.                                         if (randomizedCharacter == 'O' || randomizedCharacter == 'I' || randomizedCharacter == 'Q') {
  1650.                                             break;
  1651.                                         }
  1652.                                     }
  1653.                                 }
  1654.                                 engine_Name = firstPart_f + finalNumber + randomizedCharacter + engNameFinalf;
  1655.                             }
  1656.                             try {
  1657.                                 File fila = new File("C:/Users/sfsga/IdeaProjects/demo/obf_rex.docx");
  1658.                                 Scanner reader = new Scanner(fila);
  1659.                                 while (reader.hasNextLine()) {
  1660.                                     String data = reader.nextLine();
  1661.                                     Flagger = data.equals(engine_Name);
  1662.                                 }
  1663.                                 reader.close();
  1664.  
  1665.                             } catch (FileNotFoundException e) {
  1666.                                 e.printStackTrace();
  1667.                             }
  1668.                         }
  1669.  
  1670.                     } else {
  1671.                         Collections.shuffle(Arrays.asList(engine_Name1));
  1672.                         Collections.shuffle(Arrays.asList(firstPart));
  1673.                         Random engineNameChosen = new Random();
  1674.                         Random firstPartC = new Random();
  1675.                         int engineNameChosen_index = engineNameChosen.nextInt(engine_Name1.length);
  1676.                         int firstPart_index = firstPartC.nextInt(firstPart.length);
  1677.                         String engNameFinalf = " " + engine_Name1[engineNameChosen_index];
  1678.                         String firstPart_f = firstPart[firstPart_index] + "-";
  1679.                         int finalNumber = 12 + ((int) (Math.random() * 1001));
  1680.                         if (finalNumber % 8 == 0) {
  1681.                             engine_Name = firstPart_f + finalNumber + engNameFinalf;
  1682.                         } else {
  1683.                             char randomizedCharacter;
  1684.                             int uio93 = 1 + ((int) (Math.random() * 1001));
  1685.                             int uio94 = 1 + ((int) (Math.random() * 11));
  1686.                             Random randomLetter = new Random();
  1687.                             if (uio93 % uio94 == 0) {
  1688.                                 randomizedCharacter = (char) (randomLetter.nextInt(26) + 'a');
  1689.                                 while (randomizedCharacter == 'o' || randomizedCharacter == 'i' || randomizedCharacter == 'q' || randomizedCharacter == 'e' || randomizedCharacter == 'h' || randomizedCharacter == 'g' || randomizedCharacter == 'c' || randomizedCharacter == 'j') {
  1690.                                     randomizedCharacter = (char) (randomLetter.nextInt(26) + 'a');
  1691.                                     if (randomizedCharacter == 'o' || randomizedCharacter == 'i' || randomizedCharacter == 'q' || randomizedCharacter == 'e' || randomizedCharacter == 'h' || randomizedCharacter == 'g' || randomizedCharacter == 'c' || randomizedCharacter == 'j') {
  1692.                                         break;
  1693.                                     }
  1694.                                 }
  1695.                             } else {
  1696.                                 randomizedCharacter = (char) (randomLetter.nextInt(26) + 'A');
  1697.                                 while (randomizedCharacter == 'O' || randomizedCharacter == 'I' || randomizedCharacter == 'Q') {
  1698.                                     randomizedCharacter = (char) (randomLetter.nextInt(26) + 'A');
  1699.                                     if (randomizedCharacter == 'O' || randomizedCharacter == 'I' || randomizedCharacter == 'Q') {
  1700.                                         break;
  1701.                                     }
  1702.                                 }
  1703.                             }
  1704.                             engine_Name = firstPart_f + finalNumber + randomizedCharacter + engNameFinalf;
  1705.                         }
  1706.                     }
  1707.                     Collections.shuffle(Arrays.asList(engine_Cycle));
  1708.                     Random engineCycleChosen = new Random();
  1709.                     int engineTypeChosen_index = engineCycleChosen.nextInt(engine_Cycle.length);
  1710.                     String engine_Cycle_Chosen = engine_Cycle[engineTypeChosen_index];
  1711.                     if (isEngineCycle) {
  1712.                         repeatCommand = engine_Cycle_Chosen;
  1713.                     }
  1714.                     switch (engine_Cycle_Chosen) {
  1715.                         case "Gas Core", "Liquid Core", "Solid Core", "Pulsed Nuclear", "Nuclear SaltWater", "Pebble-Bed Core" -> {
  1716.                             String propellant_List_Chosen;
  1717.                             String nuclear_Cycle_Chosen;
  1718.                             String reactor_Fuel_Chosen;
  1719.                             String nozzle_Type_List_Chosen;
  1720.                             switch (engine_Cycle_Chosen) {
  1721.                                 case "Gas Core" -> {
  1722.                                     String[] remass_List = {"Hydrogen (H2)", "Nitrogen (N2)", "Monoatomic Hydrogen (H)", "Ammonia (NH3)",
  1723.                                             "Water (H2O)", "Oxygen (O2)", "Carbon Dioxide (CO2)", "Carbon Monoxide (CO)",
  1724.                                             "Methane (CH4)"};
  1725.                                     Collections.shuffle(Arrays.asList(remass_List));
  1726.                                     Random remassChosen = new Random();
  1727.                                     int remassChosen_index = remassChosen.nextInt(remass_List.length);
  1728.                                     String remass_List_Chosen = remass_List[remassChosen_index];
  1729.                                     propellant_List_Chosen = "Uranium HexaFluoride Salt (UF6) and " + remass_List_Chosen + " as remass";
  1730.                                     // Nuclear Cycle (Nuclear Thermal)
  1731.                                     String[] nuclear_cycle1 = {"\"Expander Bleed\"", "\"Expander Closed\"", "\"Nuclear Lightbulb\"", "\"Vortex Confined\"",
  1732.                                             "\"Wheel Flow\"", "\"Magnetohydrodynamic(MHD) vortex\"", "\"Expander Open\""};
  1733.                                     Collections.shuffle(Arrays.asList(nuclear_cycle1));
  1734.                                     Random nuclearCycleChosen = new Random();
  1735.                                     int nuclearCycleChosen_index = nuclearCycleChosen.nextInt(nuclear_cycle1.length);
  1736.                                     nuclear_Cycle_Chosen = nuclear_cycle1[nuclearCycleChosen_index];
  1737.                                     // Reactor Fuel (Nuclear Thermal)
  1738.                                     String[] reactor_fuel = {"100-90% Uranium-235", "50% Uranium-235", "25-8% Uranium-235", "1-2% Uranium-235"};
  1739.                                     Collections.shuffle(Arrays.asList(reactor_fuel));
  1740.                                     Random reactorfuelChosen = new Random();
  1741.                                     int reactorfuelChosen_index = reactorfuelChosen.nextInt(reactor_fuel.length);
  1742.                                     reactor_Fuel_Chosen = reactor_fuel[reactorfuelChosen_index];
  1743.                                     // Nozzle Type (Nuclear Thermal)
  1744.                                     nozzle_Type_List_Chosen = "De Laval Bell (With Nozzle Extension)";
  1745.                                 }
  1746.                                 case "Liquid Core", "Colloid-Core", "Pebble-Bed Core" -> {
  1747.                                     // Remass (Nuclear Thermal)
  1748.                                     String[] remass_List2 = {"Hydrogen (H2)", "Nitrogen (N2)", "Monoatomic Hydrogen (H)", "Ammonia (NH3)",
  1749.                                             "Water (H2O)", "Oxygen (O2)", "Carbon Dioxide (CO2)", "Carbon Monoxide (CO)",
  1750.                                             "Methane (CH4)", "Hydrogen (H2) + Hexane (C6H14)"};
  1751.                                     Collections.shuffle(Arrays.asList(remass_List2));
  1752.                                     Random remassChosen = new Random();
  1753.                                     int remassChosen_index = remassChosen.nextInt(remass_List2.length);
  1754.                                     String remass_List_Chosen = remass_List2[remassChosen_index];
  1755.                                     propellant_List_Chosen = "Uranium HexaFluoride Salt (UF6) and " + remass_List_Chosen + " as a remass";
  1756.                                     // Nuclear Cycle (Nuclear Thermal)
  1757.                                     String[] nuclear_cycle1 = {"\"Expander Bleed\"", "\"Expander Closed\"", "\"Vortex Confined\"", "\"Expander Open\""};
  1758.                                     Collections.shuffle(Arrays.asList(nuclear_cycle1));
  1759.                                     Random nuclearCycleChosen = new Random();
  1760.                                     int nuclearCycleChosen_index = nuclearCycleChosen.nextInt(nuclear_cycle1.length);
  1761.                                     nuclear_Cycle_Chosen = nuclear_cycle1[nuclearCycleChosen_index];
  1762.                                     // Reactor Fuel (Nuclear Thermal)
  1763.                                     String[] reactor_fuel = {"100-90% Uranium-235", "50% Uranium-235", "25-8% Uranium-235", "1-2% Uranium-235"};
  1764.                                     Collections.shuffle(Arrays.asList(reactor_fuel));
  1765.                                     Random reactorfuelChosen = new Random();
  1766.                                     int reactorfuelChosen_index = reactorfuelChosen.nextInt(reactor_fuel.length);
  1767.                                     reactor_Fuel_Chosen = reactor_fuel[reactorfuelChosen_index];
  1768.                                     // Nozzle Type (Nuclear Thermal)
  1769.                                     nozzle_Type_List_Chosen = "De Laval Bell (With Nozzle Extension)";
  1770.                                 }
  1771.                                 case "Nuclear SaltWater" -> {
  1772.                                     propellant_List_Chosen = "Uranium TetraBromide (UBr4) + Water (H2O)";
  1773.                                     nuclear_Cycle_Chosen = "";
  1774.                                     // Reactor Fuel (Nuclear Thermal)
  1775.                                     String[] reactor_fuel = {"100-90% Uranium-235", "50% Uranium-235", "25-8% Uranium-235", "1-2% Uranium-235"};
  1776.                                     Collections.shuffle(Arrays.asList(reactor_fuel));
  1777.                                     Random reactorfuelChosen = new Random();
  1778.                                     int reactorfuelChosen_index = reactorfuelChosen.nextInt(reactor_fuel.length);
  1779.                                     reactor_Fuel_Chosen = reactor_fuel[reactorfuelChosen_index];
  1780.                                     // Nozzle Type (Nuclear Thermal)
  1781.                                     nozzle_Type_List_Chosen = "De Laval Bell (With Nozzle Extension)";
  1782.                                 }
  1783.                                 default -> {
  1784.                                     // Propellant (Nuclear Thermal)
  1785.                                     Collections.shuffle(Arrays.asList(propellant_List3));
  1786.                                     Random propellantChosen = new Random();
  1787.                                     int propellantChosen_index = propellantChosen.nextInt(propellant_List3.length);
  1788.                                     propellant_List_Chosen = propellant_List3[propellantChosen_index];
  1789.                                     // Nuclear Cycle (Nuclear Thermal)
  1790.                                     String[] nuclear_cycle1 = {"\"Expander Bleed\"", "\"Expander Closed\"", "\"Expander Open\""};
  1791.                                     Collections.shuffle(Arrays.asList(nuclear_cycle1));
  1792.                                     Random nuclearCycleChosen = new Random();
  1793.                                     int nuclearCycleChosen_index = nuclearCycleChosen.nextInt(nuclear_cycle1.length);
  1794.                                     nuclear_Cycle_Chosen = nuclear_cycle1[nuclearCycleChosen_index];
  1795.                                     // Reactor Fuel (Nuclear Thermal)
  1796.                                     String[] reactor_fuel = {"100-90% Uranium-235", "50% Uranium-235", "20-8% Uranium-235", "1-2% Uranium-235",
  1797.                                             "100-90% Plutonium-238", "50% Plutonium-238", "25-8% Plutonium-238", "1-2% Plutonium-238"};
  1798.                                     Collections.shuffle(Arrays.asList(reactor_fuel));
  1799.                                     Random reactorfuelChosen = new Random();
  1800.                                     int reactorfuelChosen_index = reactorfuelChosen.nextInt(reactor_fuel.length);
  1801.                                     reactor_Fuel_Chosen = reactor_fuel[reactorfuelChosen_index];
  1802.                                     // Nozzle Type (Nuclear Thermal)
  1803.                                     nozzle_Type_List_Chosen = "De Laval Bell (With Nozzle Extension)";
  1804.                                 }
  1805.                             }
  1806.                             // Altitude of Operation (Nuclear Thermal)
  1807.                             String altitude_Of_Operation_Chosen = "80 km+ (Vacuum)";
  1808.                             // Tank Repressurisation (Nuclear Thermal)
  1809.                             Collections.shuffle(Arrays.asList(tank_Repressurisation));
  1810.                             Random tankRepressurisationChosen = new Random();
  1811.                             int tankRepressurisationChosen_index = tankRepressurisationChosen.nextInt(tank_Repressurisation.length);
  1812.                             String tank_Repressurisation_Chosen = tank_Repressurisation[tankRepressurisationChosen_index];
  1813.                             // Beautiful Part (Nuclear Thermal)
  1814.                             System.out.println(lbrk + "\n" + "Your Engine is called: " + engine_Name + "\n");
  1815.                             System.out.println("Your Engine Cycle is: " + nuclear_Cycle_Chosen + " " + engine_Cycle_Chosen);
  1816.                             System.out.println("Your Propellant is: " + propellant_List_Chosen);
  1817.                             System.out.println("Your Reactor's Fuel is: " + reactor_Fuel_Chosen);
  1818.                             System.out.println("Your Altitude of operation is: " + altitude_Of_Operation_Chosen);
  1819.                             System.out.println("Your engine's nozzle type should be : " + nozzle_Type_List_Chosen);
  1820.                             System.out.println("Tank repressurisation would be done " + tank_Repressurisation_Chosen + "\n");
  1821.                             XWPFDocument docx = new XWPFDocument();
  1822.                             if (new File(String.valueOf(pathn1)).exists()) {
  1823.                                 docx = new XWPFDocument(new FileInputStream(String.valueOf(pathn1)));
  1824.                             }
  1825.                             XWPFParagraph par = docx.createParagraph();
  1826.                             XWPFRun run = par.createRun();
  1827.                             run.setFontSize(12);
  1828.                             run.setBold(true);
  1829.                             run.setFontFamily("Calibri");
  1830.                             run.setText("Your Engine is called: ");
  1831.                             XWPFRun run2 = par.createRun();
  1832.                             run2.setFontSize(12);
  1833.                             run.setBold(true);
  1834.                             run2.setFontFamily("Calibri");
  1835.                             run2.setText(engine_Name);
  1836.                             run2.addBreak();
  1837.                             // -----------------------------------------------------------
  1838.                             XWPFRun run3 = par.createRun();
  1839.                             run3.setFontSize(10);
  1840.                             run3.setBold(true);
  1841.                             run3.setFontFamily("Calibri");
  1842.                             run3.setText("Your Engine Cycle is: ");
  1843.                             XWPFRun run4 = par.createRun();
  1844.                             run4.setFontSize(10);
  1845.                             run4.setFontFamily("Calibri");
  1846.                             run4.setText(nuclear_Cycle_Chosen + " " + engine_Cycle_Chosen);
  1847.                             run4.addBreak();
  1848.                             // -----------------------------------------------------------
  1849.                             XWPFRun run5 = par.createRun();
  1850.                             run5.setFontSize(10);
  1851.                             run5.setBold(true);
  1852.                             run5.setFontFamily("Calibri");
  1853.                             run5.setText("Your Propellant is: ");
  1854.                             XWPFRun run6 = par.createRun();
  1855.                             run6.setFontSize(10);
  1856.                             run6.setFontFamily("Calibri");
  1857.                             run6.setText(propellant_List_Chosen);
  1858.                             run6.addBreak();
  1859.                             // -----------------------------------------------------------
  1860.                             XWPFRun run7 = par.createRun();
  1861.                             run7.setFontSize(10);
  1862.                             run7.setBold(true);
  1863.                             run7.setFontFamily("Calibri");
  1864.                             run7.setText("Your Reactor's Fission Fuel is: ");
  1865.                             XWPFRun run8 = par.createRun();
  1866.                             run8.setFontSize(10);
  1867.                             run8.setFontFamily("Calibri");
  1868.                             run8.setText(reactor_Fuel_Chosen);
  1869.                             run8.addBreak();
  1870.                             // -----------------------------------------------------------
  1871.                             XWPFRun run9 = par.createRun();
  1872.                             run9.setFontSize(10);
  1873.                             run9.setBold(true);
  1874.                             run9.setFontFamily("Calibri");
  1875.                             run9.setText("Your engine's nozzle type should be: ");
  1876.                             XWPFRun run0 = par.createRun();
  1877.                             run0.setFontSize(10);
  1878.                             run0.setFontFamily("Calibri");
  1879.                             run0.setText(nozzle_Type_List_Chosen);
  1880.                             run0.addBreak();
  1881.                             // -----------------------------------------------------------
  1882.                             XWPFRun run11 = par.createRun();
  1883.                             run11.setFontSize(10);
  1884.                             run11.setBold(true);
  1885.                             run11.setFontFamily("Calibri");
  1886.                             run11.setText("Tank repressurisation would be done ");
  1887.                             XWPFRun run12 = par.createRun();
  1888.                             run12.setFontSize(10);
  1889.                             run12.setBold(true);
  1890.                             run12.setFontFamily("Calibri");
  1891.                             run12.setText(tank_Repressurisation_Chosen);
  1892.                             run12.addBreak();
  1893.                             // -----------------------------------------------------------
  1894.                             try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  1895.                                 docx.write(out);
  1896.                             }
  1897.  
  1898.                         }
  1899.                         case "Monopropellant (Decomposition)" -> {
  1900.                             // Propellant (Decomposing Monopropellant)
  1901.                             Collections.shuffle(Arrays.asList(propellant_List1));
  1902.                             Random propellantChosen = new Random();
  1903.                             int propellantChosen_index = propellantChosen.nextInt(propellant_List1.length);
  1904.                             String propellant_List_Chosen = propellant_List1[propellantChosen_index];
  1905.                             // Altitude of Operation (Decomposing Monopropellant)
  1906.                             String altitude_Of_Operation_Chosen = "80 km+ (Vacuum)";
  1907.                             // Nozzle Type (Decomposing Monopropellant)
  1908.                             Collections.shuffle(Arrays.asList(nozzle_Type_List1));
  1909.                             Random nozzle_chosen = new Random();
  1910.                             int nozzleChosen_index = nozzle_chosen.nextInt(nozzle_Type_List1.length);
  1911.                             String nozzle_Type_List_Chosen = nozzle_Type_List1[nozzleChosen_index];
  1912.                             // Beautiful Part (Least non-ugly)
  1913.                             System.out.println(lbrk + "\n" + "Your Engine is called: " + engine_Name + "\n");
  1914.                             System.out.println("Your Engine Cycle is: " + engine_Cycle_Chosen);
  1915.                             System.out.println("Your Propellant is: " + propellant_List_Chosen);
  1916.                             System.out.println("Your Altitude of operation is: " + altitude_Of_Operation_Chosen);
  1917.                             System.out.println("Your engine's nozzle type should be : " + nozzle_Type_List_Chosen);
  1918.                             System.out.println("Tank repressurisation would be impractical and unnecessary" + "\n");
  1919.                             XWPFDocument docx = new XWPFDocument();
  1920.                             if (new File(String.valueOf(pathn1)).exists()) {
  1921.                                 docx = new XWPFDocument(new FileInputStream(String.valueOf(pathn1)));
  1922.                             }
  1923.                             XWPFParagraph par = docx.createParagraph();
  1924.                             XWPFRun run = par.createRun();
  1925.                             run.setFontSize(12);
  1926.                             run.setBold(true);
  1927.                             run.setFontFamily("Calibri");
  1928.                             run.setText("Your Engine is called: ");
  1929.                             XWPFRun run2 = par.createRun();
  1930.                             run2.setFontSize(12);
  1931.                             run.setBold(true);
  1932.                             run2.setFontFamily("Calibri");
  1933.                             run2.setText(engine_Name);
  1934.                             run2.addBreak();
  1935.                             // -----------------------------------------------------------
  1936.                             XWPFRun run3 = par.createRun();
  1937.                             run3.setFontSize(10);
  1938.                             run3.setBold(true);
  1939.                             run3.setFontFamily("Calibri");
  1940.                             run3.setText("Your Engine Cycle is: ");
  1941.                             XWPFRun run4 = par.createRun();
  1942.                             run4.setFontSize(10);
  1943.                             run4.setFontFamily("Calibri");
  1944.                             run4.setText(engine_Cycle_Chosen);
  1945.                             run4.addBreak();
  1946.                             // -----------------------------------------------------------
  1947.                             XWPFRun run5 = par.createRun();
  1948.                             run5.setFontSize(10);
  1949.                             run5.setBold(true);
  1950.                             run5.setFontFamily("Calibri");
  1951.                             run5.setText("Your Propellant is: ");
  1952.                             XWPFRun run6 = par.createRun();
  1953.                             run6.setFontSize(10);
  1954.                             run6.setFontFamily("Calibri");
  1955.                             run6.setText(propellant_List_Chosen);
  1956.                             run6.addBreak();
  1957.                             // -----------------------------------------------------------
  1958.                             XWPFRun run9 = par.createRun();
  1959.                             run9.setFontSize(10);
  1960.                             run9.setBold(true);
  1961.                             run9.setFontFamily("Calibri");
  1962.                             run9.setText("Your engine's nozzle type should be: ");
  1963.                             XWPFRun run0 = par.createRun();
  1964.                             run0.setFontSize(10);
  1965.                             run0.setFontFamily("Calibri");
  1966.                             run0.setText(nozzle_Type_List_Chosen);
  1967.                             run0.addBreak();
  1968.                             // -----------------------------------------------------------
  1969.                             XWPFRun run11 = par.createRun();
  1970.                             run11.setFontSize(10);
  1971.                             run11.setBold(true);
  1972.                             run11.setFontFamily("Calibri");
  1973.                             run11.setText("Tank repressurisation would be impractical and unnecessary");
  1974.                             run11.addBreak();
  1975.                             // -----------------------------------------------------------
  1976.                             try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  1977.                                 docx.write(out);
  1978.                             }
  1979.  
  1980.                         }
  1981.                         case "Monopropellant (Cold Gas)" -> {
  1982.                             Collections.shuffle(Arrays.asList(propellant_List2));
  1983.                             Random propellantChosen = new Random();
  1984.                             int propellantChosen_index = propellantChosen.nextInt(propellant_List2.length);
  1985.                             String propellant_List_Chosen = propellant_List2[propellantChosen_index];
  1986.                             // Altitude of Operation (Decomposing Monopropellant)
  1987.                             String altitude_Of_Operation_Chosen = "80 km+ (Vacuum)";
  1988.                             // Nozzle Type (Decomposing Monopropellant)
  1989.                             Collections.shuffle(Arrays.asList(nozzle_Type_List1));
  1990.                             Random nozzle_chosen = new Random();
  1991.                             int nozzleChosen_index = nozzle_chosen.nextInt(nozzle_Type_List1.length);
  1992.                             String nozzle_Type_List_Chosen = nozzle_Type_List1[nozzleChosen_index];
  1993.                             // Beautiful Part (Least non-ugly)
  1994.                             System.out.println(lbrk + "\n" + "Your Engine is called: " + engine_Name + "\n");
  1995.                             System.out.println("Your Engine Cycle is: " + engine_Cycle_Chosen);
  1996.                             System.out.println("Your Propellant is: " + propellant_List_Chosen);
  1997.                             System.out.println("Your Altitude of operation is: " + altitude_Of_Operation_Chosen);
  1998.                             System.out.println("Your engine's nozzle type should be : " + nozzle_Type_List_Chosen);
  1999.                             System.out.println("Tank repressurisation would be impractical and unnecessary" + "\n");
  2000.                             XWPFDocument docx = new XWPFDocument();
  2001.                             if (new File(String.valueOf(pathn1)).exists()) {
  2002.                                 docx = new XWPFDocument(new FileInputStream(String.valueOf(pathn1)));
  2003.                             }
  2004.                             XWPFParagraph par = docx.createParagraph();
  2005.                             XWPFRun run = par.createRun();
  2006.                             run.setFontSize(12);
  2007.                             run.setBold(true);
  2008.                             run.setFontFamily("Calibri");
  2009.                             run.setText("Your Engine is called: ");
  2010.                             XWPFRun run2 = par.createRun();
  2011.                             run2.setFontSize(12);
  2012.                             run.setBold(true);
  2013.                             run2.setFontFamily("Calibri");
  2014.                             run2.setText(engine_Name);
  2015.                             run2.addBreak();
  2016.                             // -----------------------------------------------------------
  2017.                             XWPFRun run3 = par.createRun();
  2018.                             run3.setFontSize(10);
  2019.                             run3.setBold(true);
  2020.                             run3.setFontFamily("Calibri");
  2021.                             run3.setText("Your Engine Cycle is: ");
  2022.                             XWPFRun run4 = par.createRun();
  2023.                             run4.setFontSize(10);
  2024.                             run4.setFontFamily("Calibri");
  2025.                             run4.setText(engine_Cycle_Chosen);
  2026.                             run4.addBreak();
  2027.                             // -----------------------------------------------------------
  2028.                             XWPFRun run5 = par.createRun();
  2029.                             run5.setFontSize(10);
  2030.                             run5.setBold(true);
  2031.                             run5.setFontFamily("Calibri");
  2032.                             run5.setText("Your Propellant is: ");
  2033.                             XWPFRun run6 = par.createRun();
  2034.                             run6.setFontSize(10);
  2035.                             run6.setFontFamily("Calibri");
  2036.                             run6.setText(propellant_List_Chosen);
  2037.                             run6.addBreak();
  2038.                             // -----------------------------------------------------------
  2039.                             XWPFRun run9 = par.createRun();
  2040.                             run9.setFontSize(10);
  2041.                             run9.setBold(true);
  2042.                             run9.setFontFamily("Calibri");
  2043.                             run9.setText("Your engine's nozzle type should be: ");
  2044.                             XWPFRun run0 = par.createRun();
  2045.                             run0.setFontSize(10);
  2046.                             run0.setFontFamily("Calibri");
  2047.                             run0.setText(nozzle_Type_List_Chosen);
  2048.                             run0.addBreak();
  2049.                             // -----------------------------------------------------------
  2050.                             XWPFRun run11 = par.createRun();
  2051.                             run11.setFontSize(10);
  2052.                             run11.setBold(true);
  2053.                             run11.setFontFamily("Calibri");
  2054.                             run11.setText("Tank repressurisation would be impractical and unnecessary");
  2055.                             run11.addBreak();
  2056.                             // -----------------------------------------------------------
  2057.                             try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  2058.                                 docx.write(out);
  2059.                             }
  2060.  
  2061.                         }
  2062.                         case "Expander (Closed)", "Expander (Open)" -> {
  2063.                             String[] oxidizer_List2 = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)",
  2064.                                     "O3 (Ozone)"};
  2065.                             Collections.shuffle(Arrays.asList(oxidizer_List2));
  2066.                             Random oxidizerChosen = new Random();
  2067.                             int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List2.length);
  2068.                             String oxidizer_Chosen = oxidizer_List2[oxidizerChosen_index];
  2069.                             String fuel_Chosen = "";
  2070.                             switch (oxidizer_Chosen) {
  2071.                                 case "O2 (Oxygen)" -> {
  2072.                                     String[] fuel_List20 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  2073.                                             "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  2074.                                             "CH3OH (Methanol)", "C12H24 (Kerosene)", "B2H6 (Diborane)", "B5H9 (Pentaborane)", "C2H6 (Ethane)"};
  2075.                                     Collections.shuffle(Arrays.asList(fuel_List20));
  2076.                                     Random fuelChosen = new Random();
  2077.                                     int fuelChosen_index = fuelChosen.nextInt(fuel_List20.length);
  2078.                                     fuel_Chosen = fuel_List20[fuelChosen_index];
  2079.                                 }
  2080.                                 case "F2 (Fluorine)" -> {
  2081.                                     String[] fuel_List1 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  2082.                                             "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "C2H8N2 (UnsymetricalDimethylHydrazine)",
  2083.                                             "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)", "CH3OH (Methanol)", "C12H24 (Kerosene)",
  2084.                                             "B2H6 (Diborane)", "B5H9 (Pentaborane)", "C2H6 (Ethane)"};
  2085.                                     Collections.shuffle(Arrays.asList(fuel_List1));
  2086.                                     Random fuelChosen = new Random();
  2087.                                     int fuelChosen_index = fuelChosen.nextInt(fuel_List1.length);
  2088.                                     fuel_Chosen = fuel_List1[fuelChosen_index];
  2089.                                 }
  2090.                                 case "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)" -> {
  2091.                                     String[] fuel_List2 = {"H2 (Hydrogen)", "N2H4 (Hydrazine)", "CH3OH (Methanol)",
  2092.                                             "C12H24 (Kerosene)", "B2H6 (Diborane)", "B5H9 (Pentaborane)", "C2H6 (Ethane)"};
  2093.                                     Collections.shuffle(Arrays.asList(fuel_List2));
  2094.                                     Random fuelChosen = new Random();
  2095.                                     int fuelChosen_index = fuelChosen.nextInt(fuel_List2.length);
  2096.                                     fuel_Chosen = fuel_List2[fuelChosen_index];
  2097.                                 }
  2098.                             }
  2099.  
  2100.                             Collections.shuffle(Arrays.asList(altitude_Of_Operation));
  2101.                             Random altitudeOfOperationChosen = new Random();
  2102.                             int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
  2103.                             String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
  2104.  
  2105.                             String nozzle_Type_Chosen = "";
  2106.                             switch (altitude_Of_Operation_Chosen) {
  2107.                                 case "0-10 km (Sea Level)" -> {
  2108.                                     String[] nozzle_Type_List_SL = {"De Laval Cone (Without Nozzle Extension)",
  2109.                                             "De Laval Bell (Without Nozzle Extension)"};
  2110.                                     Collections.shuffle(Arrays.asList(nozzle_Type_List_SL));
  2111.                                     Random nozzleTypeSLspikeChosen = new Random();
  2112.                                     int nozzleTypeSLspikeChosen_index = nozzleTypeSLspikeChosen.nextInt(nozzle_Type_List_SL.length);
  2113.                                     nozzle_Type_Chosen = nozzle_Type_List_SL[nozzleTypeSLspikeChosen_index];
  2114.                                 }
  2115.                                 case "20-30 km (Medium Atmosphere)" -> {
  2116.                                     String[] nozzle_Type_List_HA = {"De Laval Bell (Without Nozzle Extension)", "De Laval Cone (With Nozzle Extension)",
  2117.                                             "De Laval Bell (With Nozzle Extension)", "Dual Bell Nozzle"};
  2118.                                     Collections.shuffle(Arrays.asList(nozzle_Type_List_HA));
  2119.                                     Random nozzleTypeHAspikeChosen = new Random();
  2120.                                     int nozzleTypeHAspikeChosen_index = nozzleTypeHAspikeChosen.nextInt(nozzle_Type_List_HA.length);
  2121.                                     nozzle_Type_Chosen = nozzle_Type_List_HA[nozzleTypeHAspikeChosen_index];
  2122.                                 }
  2123.                                 case "30-80 km (High Atmosphere)" -> {
  2124.                                     String[] nozzle_Type_List_HAi = {"De Laval Cone (With Nozzle Extension)", "De Laval Bell (With Nozzle Extension)",
  2125.                                             "Dual Bell Nozzle"};
  2126.                                     Collections.shuffle(Arrays.asList(nozzle_Type_List_HAi));
  2127.                                     Random nozzleTypeHAispikeChosen = new Random();
  2128.                                     int nozzleTypeHAispikeChosen_index = nozzleTypeHAispikeChosen.nextInt(nozzle_Type_List_HAi.length);
  2129.                                     nozzle_Type_Chosen = nozzle_Type_List_HAi[nozzleTypeHAispikeChosen_index];
  2130.                                 }
  2131.                                 case "80 km+ (Vacuum)" -> {
  2132.                                     String[] nozzle_Type_List_VA = {"De Laval Cone (With Nozzle Extension)",
  2133.                                             "De Laval Bell (With Nozzle Extension)", "Expanding Nozzle"};
  2134.                                     Collections.shuffle(Arrays.asList(nozzle_Type_List_VA));
  2135.                                     Random nozzleTypeVAspikeChosen = new Random();
  2136.                                     int nozzleTypeVAspikeChosen_index = nozzleTypeVAspikeChosen.nextInt(nozzle_Type_List_VA.length);
  2137.                                     nozzle_Type_Chosen = nozzle_Type_List_VA[nozzleTypeVAspikeChosen_index];
  2138.                                 }
  2139.                                 case "Any Altitude (0-80 km+)" -> {
  2140.                                     String[] nozzle_Type_List_Aero = {"Linear Aerospike Nozzle", "Toroidal Aerospike Nozzle", "Expansion-Deflection Nozzle"};
  2141.                                     Collections.shuffle(Arrays.asList(nozzle_Type_List_Aero));
  2142.                                     Random nozzleTypeAerospikeChosen = new Random();
  2143.                                     int nozzleTypeAerospikeChosen_index = nozzleTypeAerospikeChosen.nextInt(nozzle_Type_List_Aero.length);
  2144.                                     nozzle_Type_Chosen = nozzle_Type_List_Aero[nozzleTypeAerospikeChosen_index];
  2145.                                 }
  2146.                             }
  2147.  
  2148.                             System.out.println(lbrk + "\n" + "Your Engine is called: " + engine_Name + "\n");
  2149.                             System.out.println("Your Engine Cycle is: " + engine_Cycle_Chosen);
  2150.                             System.out.println("Your oxidizer is: " + oxidizer_Chosen);
  2151.                             System.out.println("Your Fuel is: " + fuel_Chosen);
  2152.                             System.out.println("Your Altitude of operation is: " + altitude_Of_Operation_Chosen);
  2153.                             System.out.println("Your engine's nozzle type should be : " + nozzle_Type_Chosen);
  2154.                             System.out.println("Tank repressurisation would be done Autogenously" + "\n");
  2155.                             XWPFDocument docx = new XWPFDocument();
  2156.                             if (new File(String.valueOf(pathn1)).exists()) {
  2157.                                 docx = new XWPFDocument(new FileInputStream(String.valueOf(pathn1)));
  2158.                             }
  2159.                             XWPFParagraph par = docx.createParagraph();
  2160.                             XWPFRun run = par.createRun();
  2161.                             run.setFontSize(12);
  2162.                             run.setBold(true);
  2163.                             run.setFontFamily("Calibri");
  2164.                             run.setText("Your Engine is called: ");
  2165.                             XWPFRun run2 = par.createRun();
  2166.                             run2.setFontSize(12);
  2167.                             run.setBold(true);
  2168.                             run2.setFontFamily("Calibri");
  2169.                             run2.setText(engine_Name);
  2170.                             run2.addBreak();
  2171.                             // -----------------------------------------------------------
  2172.                             XWPFRun run3 = par.createRun();
  2173.                             run3.setFontSize(10);
  2174.                             run3.setBold(true);
  2175.                             run3.setFontFamily("Calibri");
  2176.                             run3.setText("Your Engine Cycle is: ");
  2177.                             XWPFRun run4 = par.createRun();
  2178.                             run4.setFontSize(10);
  2179.                             run4.setFontFamily("Calibri");
  2180.                             run4.setText(engine_Cycle_Chosen);
  2181.                             run4.addBreak();
  2182.                             // -----------------------------------------------------------
  2183.                             XWPFRun run5 = par.createRun();
  2184.                             run5.setFontSize(10);
  2185.                             run5.setBold(true);
  2186.                             run5.setFontFamily("Calibri");
  2187.                             run5.setText("Your oxidizer is: ");
  2188.                             XWPFRun run6 = par.createRun();
  2189.                             run6.setFontSize(10);
  2190.                             run6.setFontFamily("Calibri");
  2191.                             run6.setText(oxidizer_Chosen);
  2192.                             run6.addBreak();
  2193.                             // -----------------------------------------------------------
  2194.                             XWPFRun run8 = par.createRun();
  2195.                             run8.setFontSize(10);
  2196.                             run8.setBold(true);
  2197.                             run8.setFontFamily("Calibri");
  2198.                             run8.setText("Your Fuel is: ");
  2199.                             XWPFRun run7 = par.createRun();
  2200.                             run7.setFontSize(10);
  2201.                             run7.setFontFamily("Calibri");
  2202.                             run7.setText(fuel_Chosen);
  2203.                             run7.addBreak();
  2204.                             // -----------------------------------------------------------
  2205.                             XWPFRun run9 = par.createRun();
  2206.                             run9.setFontSize(10);
  2207.                             run9.setBold(true);
  2208.                             run9.setFontFamily("Calibri");
  2209.                             run9.setText("Your engine's nozzle type should be: ");
  2210.                             XWPFRun run0 = par.createRun();
  2211.                             run0.setFontSize(10);
  2212.                             run0.setFontFamily("Calibri");
  2213.                             run0.setText(nozzle_Type_Chosen);
  2214.                             run0.addBreak();
  2215.                             // -----------------------------------------------------------
  2216.                             XWPFRun run11 = par.createRun();
  2217.                             run11.setFontSize(10);
  2218.                             run11.setBold(true);
  2219.                             run11.setFontFamily("Calibri");
  2220.                             run11.setText("Tank repressurisation would be done ");
  2221.                             XWPFRun run12 = par.createRun();
  2222.                             run12.setFontSize(10);
  2223.                             run12.setBold(true);
  2224.                             run12.setFontFamily("Calibri");
  2225.                             run12.setText("Autogenously");
  2226.                             run12.addBreak();
  2227.                             // -----------------------------------------------------------
  2228.                             try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  2229.                                 docx.write(out);
  2230.                             }
  2231.                         }
  2232.                         case "Dual Expander (Closed)", "Dual Expander (Open)" -> {
  2233.                             String[] oxidizer_List3 = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)"};
  2234.                             Collections.shuffle(Arrays.asList(oxidizer_List3));
  2235.                             Random oxidizerChosen = new Random();
  2236.                             int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List3.length);
  2237.                             String oxidizer_Chosen = oxidizer_List3[oxidizerChosen_index];
  2238.  
  2239.                             String fuel_Chosen = "";
  2240.                             String[] fuel_List3 = {"H2 (Hydrogen)", "CH4 (Methane)"};
  2241.                             switch (oxidizer_Chosen) {
  2242.                                 case "O2 (Oxygen)", "F2 (Fluorine)" -> {
  2243.                                     Collections.shuffle(Arrays.asList(fuel_List3));
  2244.                                     Random fuelChosen = new Random();
  2245.                                     int fuelChosen_index = fuelChosen.nextInt(fuel_List3.length);
  2246.                                     fuel_Chosen = fuel_List3[fuelChosen_index];
  2247.                                 }
  2248.                                 case "F2 (Fluorine) + O2 (Oxygen)" -> fuel_Chosen = "H2 (Hydrogen)";
  2249.                             }
  2250.  
  2251.                             Collections.shuffle(Arrays.asList(altitude_Of_Operation));
  2252.                             Random altitudeOfOperationChosen = new Random();
  2253.                             int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
  2254.                             String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
  2255.  
  2256.                             String nozzle_Type_Chosen = "";
  2257.                             switch (altitude_Of_Operation_Chosen) {
  2258.                                 case "0-10 km (Sea Level)" -> {
  2259.                                     String[] nozzle_Type_List_SL = {"De Laval Cone (Without Nozzle Extension)",
  2260.                                             "De Laval Bell (Without Nozzle Extension)"};
  2261.                                     Collections.shuffle(Arrays.asList(nozzle_Type_List_SL));
  2262.                                     Random nozzleTypeSLspikeChosen = new Random();
  2263.                                     int nozzleTypeSLspikeChosen_index = nozzleTypeSLspikeChosen.nextInt(nozzle_Type_List_SL.length);
  2264.                                     nozzle_Type_Chosen = nozzle_Type_List_SL[nozzleTypeSLspikeChosen_index];
  2265.                                 }
  2266.                                 case "20-30 km (Medium Atmosphere)" -> {
  2267.                                     String[] nozzle_Type_List_HA = {"De Laval Bell (Without Nozzle Extension)", "De Laval Cone (With Nozzle Extension)",
  2268.                                             "De Laval Bell (With Nozzle Extension)", "Dual Bell Nozzle"};
  2269.                                     Collections.shuffle(Arrays.asList(nozzle_Type_List_HA));
  2270.                                     Random nozzleTypeHAspikeChosen = new Random();
  2271.                                     int nozzleTypeHAspikeChosen_index = nozzleTypeHAspikeChosen.nextInt(nozzle_Type_List_HA.length);
  2272.                                     nozzle_Type_Chosen = nozzle_Type_List_HA[nozzleTypeHAspikeChosen_index];
  2273.                                 }
  2274.                                 case "30-80 km (High Atmosphere)" -> {
  2275.                                     String[] nozzle_Type_List_HAi = {"De Laval Cone (With Nozzle Extension)", "De Laval Bell (With Nozzle Extension)",
  2276.                                             "Dual Bell Nozzle"};
  2277.                                     Collections.shuffle(Arrays.asList(nozzle_Type_List_HAi));
  2278.                                     Random nozzleTypeHAispikeChosen = new Random();
  2279.                                     int nozzleTypeHAispikeChosen_index = nozzleTypeHAispikeChosen.nextInt(nozzle_Type_List_HAi.length);
  2280.                                     nozzle_Type_Chosen = nozzle_Type_List_HAi[nozzleTypeHAispikeChosen_index];
  2281.                                 }
  2282.                                 case "80 km+ (Vacuum)" -> {
  2283.                                     String[] nozzle_Type_List_VA = {"De Laval Cone (With Nozzle Extension)",
  2284.                                             "De Laval Bell (With Nozzle Extension)", "Expanding Nozzle"};
  2285.                                     Collections.shuffle(Arrays.asList(nozzle_Type_List_VA));
  2286.                                     Random nozzleTypeVAspikeChosen = new Random();
  2287.                                     int nozzleTypeVAspikeChosen_index = nozzleTypeVAspikeChosen.nextInt(nozzle_Type_List_VA.length);
  2288.                                     nozzle_Type_Chosen = nozzle_Type_List_VA[nozzleTypeVAspikeChosen_index];
  2289.                                 }
  2290.                                 case "Any Altitude (0-80 km+)" -> {
  2291.                                     String[] nozzle_Type_List_Aero = {"Linear Aerospike Nozzle", "Toroidal Aerospike Nozzle", "Expansion-Deflection Nozzle"};
  2292.                                     Collections.shuffle(Arrays.asList(nozzle_Type_List_Aero));
  2293.                                     Random nozzleTypeAerospikeChosen = new Random();
  2294.                                     int nozzleTypeAerospikeChosen_index = nozzleTypeAerospikeChosen.nextInt(nozzle_Type_List_Aero.length);
  2295.                                     nozzle_Type_Chosen = nozzle_Type_List_Aero[nozzleTypeAerospikeChosen_index];
  2296.                                 }
  2297.                             }
  2298.  
  2299.                             System.out.println(lbrk + "\n" + "Your Engine is called: " + engine_Name + "\n");
  2300.                             System.out.println("Your Engine Cycle is: " + engine_Cycle_Chosen);
  2301.                             System.out.println("Your oxidizer is: " + oxidizer_Chosen);
  2302.                             System.out.println("Your Fuel is: " + fuel_Chosen);
  2303.                             System.out.println("Your Altitude of operation is: " + altitude_Of_Operation_Chosen);
  2304.                             System.out.println("Your engine's nozzle type should be : " + nozzle_Type_Chosen);
  2305.                             System.out.println("Tank repressurisation would be done Autogenously" + "\n");
  2306.                             XWPFDocument docx = new XWPFDocument();
  2307.                             if (new File(String.valueOf(pathn1)).exists()) {
  2308.                                 docx = new XWPFDocument(new FileInputStream(String.valueOf(pathn1)));
  2309.                             }
  2310.                             XWPFParagraph par = docx.createParagraph();
  2311.                             XWPFRun run = par.createRun();
  2312.                             run.setFontSize(12);
  2313.                             run.setBold(true);
  2314.                             run.setFontFamily("Calibri");
  2315.                             run.setText("Your Engine is called: ");
  2316.                             XWPFRun run2 = par.createRun();
  2317.                             run2.setFontSize(12);
  2318.                             run.setBold(true);
  2319.                             run2.setFontFamily("Calibri");
  2320.                             run2.setText(engine_Name);
  2321.                             run2.addBreak();
  2322.                             // -----------------------------------------------------------
  2323.                             XWPFRun run3 = par.createRun();
  2324.                             run3.setFontSize(10);
  2325.                             run3.setBold(true);
  2326.                             run3.setFontFamily("Calibri");
  2327.                             run3.setText("Your Engine Cycle is: ");
  2328.                             XWPFRun run4 = par.createRun();
  2329.                             run4.setFontSize(10);
  2330.                             run4.setFontFamily("Calibri");
  2331.                             run4.setText(engine_Cycle_Chosen);
  2332.                             run4.addBreak();
  2333.                             // -----------------------------------------------------------
  2334.                             XWPFRun run5 = par.createRun();
  2335.                             run5.setFontSize(10);
  2336.                             run5.setBold(true);
  2337.                             run5.setFontFamily("Calibri");
  2338.                             run5.setText("Your oxidizer is: ");
  2339.                             XWPFRun run6 = par.createRun();
  2340.                             run6.setFontSize(10);
  2341.                             run6.setFontFamily("Calibri");
  2342.                             run6.setText(oxidizer_Chosen);
  2343.                             run6.addBreak();
  2344.                             // -----------------------------------------------------------
  2345.                             XWPFRun run8 = par.createRun();
  2346.                             run8.setFontSize(10);
  2347.                             run8.setBold(true);
  2348.                             run8.setFontFamily("Calibri");
  2349.                             run8.setText("Your Fuel is: ");
  2350.                             XWPFRun run7 = par.createRun();
  2351.                             run7.setFontSize(10);
  2352.                             run7.setFontFamily("Calibri");
  2353.                             run7.setText(fuel_Chosen);
  2354.                             run7.addBreak();
  2355.                             // -----------------------------------------------------------
  2356.                             XWPFRun run9 = par.createRun();
  2357.                             run9.setFontSize(10);
  2358.                             run9.setBold(true);
  2359.                             run9.setFontFamily("Calibri");
  2360.                             run9.setText("Your engine's nozzle type should be: ");
  2361.                             XWPFRun run0 = par.createRun();
  2362.                             run0.setFontSize(10);
  2363.                             run0.setFontFamily("Calibri");
  2364.                             run0.setText(nozzle_Type_Chosen);
  2365.                             run0.addBreak();
  2366.                             // -----------------------------------------------------------
  2367.                             XWPFRun run11 = par.createRun();
  2368.                             run11.setFontSize(10);
  2369.                             run11.setBold(true);
  2370.                             run11.setFontFamily("Calibri");
  2371.                             run11.setText("Tank repressurisation would be done ");
  2372.                             XWPFRun run12 = par.createRun();
  2373.                             run12.setFontSize(10);
  2374.                             run12.setBold(true);
  2375.                             run12.setFontFamily("Calibri");
  2376.                             run12.setText("Autogenously");
  2377.                             run12.addBreak();
  2378.                             // -----------------------------------------------------------
  2379.                             try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  2380.                                 docx.write(out);
  2381.                             }
  2382.                         }
  2383.                         case "Staged Combustion (Fuel Rich)" -> {
  2384.                             String[] oxidizer_List4 = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)",
  2385.                                     "N2H4 (Hydrazine)", "O3 (Ozone)"};
  2386.                             Collections.shuffle(Arrays.asList(oxidizer_List4));
  2387.                             Random oxidizerChosen = new Random();
  2388.                             int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List4.length);
  2389.                             String oxidizer_Chosen = oxidizer_List4[oxidizerChosen_index];
  2390.  
  2391.                             String fuel_Chosen = "";
  2392.                             switch (oxidizer_Chosen) {
  2393.                                 case "O2 (Oxygen)", "F2 (Fluorine)" -> {
  2394.                                     String[] fuel_List4 = {"H2 (Hydrogen)", "NH3 (Ammonia)", "N2H4 (Hydrazine)", "B2H6 (Diborane)",
  2395.                                             "B5H9 (Pentaborane)"};
  2396.                                     Collections.shuffle(Arrays.asList(fuel_List4));
  2397.                                     Random fuelChosen = new Random();
  2398.                                     int fuelChosen_index = fuelChosen.nextInt(fuel_List4.length);
  2399.                                     fuel_Chosen = fuel_List4[fuelChosen_index];
  2400.                                 }
  2401.                                 case "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)" -> {
  2402.                                     String[] fuel_List6 = {"H2 (Hydrogen)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
  2403.                                     Collections.shuffle(Arrays.asList(fuel_List6));
  2404.                                     Random fuelChosen = new Random();
  2405.                                     int fuelChosen_index = fuelChosen.nextInt(fuel_List6.length);
  2406.                                     fuel_Chosen = fuel_List6[fuelChosen_index];
  2407.                                 }
  2408.                                 case "N2H4 (Hydrazine)" -> {
  2409.                                     String[] fuel_List7 = {"H2 (Hydrogen)", "B2H6 (Diborane)"};
  2410.                                     Collections.shuffle(Arrays.asList(fuel_List7));
  2411.                                     Random fuelChosen = new Random();
  2412.                                     int fuelChosen_index = fuelChosen.nextInt(fuel_List7.length);
  2413.                                     fuel_Chosen = fuel_List7[fuelChosen_index];
  2414.                                 }
  2415.                             }
  2416.                             Collections.shuffle(Arrays.asList(tank_Repressurisation));
  2417.                             Random tankRepressurisationChosen = new Random();
  2418.                             int tankRepressurisationChosen_index = tankRepressurisationChosen.nextInt(tank_Repressurisation.length);
  2419.                             String tank_Repressurisation_Chosen = tank_Repressurisation[tankRepressurisationChosen_index];
  2420.  
  2421.                             Collections.shuffle(Arrays.asList(altitude_Of_Operation));
  2422.                             Random altitudeOfOperationChosen = new Random();
  2423.                             int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
  2424.                             String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
  2425.  
  2426.                             String nozzle_Type_Chosen = "";
  2427.                             switch (altitude_Of_Operation_Chosen) {
  2428.                                 case "0-10 km (Sea Level)" -> {
  2429.                                     String[] nozzle_Type_List_SL = {"De Laval Cone (Without Nozzle Extension)",
  2430.                                             "De Laval Bell (Without Nozzle Extension)"};
  2431.                                     Collections.shuffle(Arrays.asList(nozzle_Type_List_SL));
  2432.                                     Random nozzleTypeSLspikeChosen = new Random();
  2433.                                     int nozzleTypeSLspikeChosen_index = nozzleTypeSLspikeChosen.nextInt(nozzle_Type_List_SL.length);
  2434.                                     nozzle_Type_Chosen = nozzle_Type_List_SL[nozzleTypeSLspikeChosen_index];
  2435.                                 }
  2436.                                 case "20-30 km (Medium Atmosphere)" -> {
  2437.                                     String[] nozzle_Type_List_HA = {"De Laval Bell (Without Nozzle Extension)", "De Laval Cone (With Nozzle Extension)",
  2438.                                             "De Laval Bell (With Nozzle Extension)", "Dual Bell Nozzle"};
  2439.                                     Collections.shuffle(Arrays.asList(nozzle_Type_List_HA));
  2440.                                     Random nozzleTypeHAspikeChosen = new Random();
  2441.                                     int nozzleTypeHAspikeChosen_index = nozzleTypeHAspikeChosen.nextInt(nozzle_Type_List_HA.length);
  2442.                                     nozzle_Type_Chosen = nozzle_Type_List_HA[nozzleTypeHAspikeChosen_index];
  2443.                                 }
  2444.                                 case "30-80 km (High Atmosphere)" -> {
  2445.                                     String[] nozzle_Type_List_HAi = {"De Laval Cone (With Nozzle Extension)", "De Laval Bell (With Nozzle Extension)",
  2446.                                             "Dual Bell Nozzle"};
  2447.                                     Collections.shuffle(Arrays.asList(nozzle_Type_List_HAi));
  2448.                                     Random nozzleTypeHAispikeChosen = new Random();
  2449.                                     int nozzleTypeHAispikeChosen_index = nozzleTypeHAispikeChosen.nextInt(nozzle_Type_List_HAi.length);
  2450.                                     nozzle_Type_Chosen = nozzle_Type_List_HAi[nozzleTypeHAispikeChosen_index];
  2451.                                 }
  2452.                                 case "80 km+ (Vacuum)" -> {
  2453.                                     String[] nozzle_Type_List_VA = {"De Laval Cone (With Nozzle Extension)",
  2454.                                             "De Laval Bell (With Nozzle Extension)", "Expanding Nozzle"};
  2455.                                     Collections.shuffle(Arrays.asList(nozzle_Type_List_VA));
  2456.                                     Random nozzleTypeVAspikeChosen = new Random();
  2457.                                     int nozzleTypeVAspikeChosen_index = nozzleTypeVAspikeChosen.nextInt(nozzle_Type_List_VA.length);
  2458.                                     nozzle_Type_Chosen = nozzle_Type_List_VA[nozzleTypeVAspikeChosen_index];
  2459.                                 }
  2460.                                 case "Any Altitude (0-80 km+)" -> {
  2461.                                     String[] nozzle_Type_List_Aero = {"Linear Aerospike Nozzle", "Toroidal Aerospike Nozzle", "Expansion-Deflection Nozzle"};
  2462.                                     Collections.shuffle(Arrays.asList(nozzle_Type_List_Aero));
  2463.                                     Random nozzleTypeAerospikeChosen = new Random();
  2464.                                     int nozzleTypeAerospikeChosen_index = nozzleTypeAerospikeChosen.nextInt(nozzle_Type_List_Aero.length);
  2465.                                     nozzle_Type_Chosen = nozzle_Type_List_Aero[nozzleTypeAerospikeChosen_index];
  2466.                                 }
  2467.                             }
  2468.  
  2469.                             System.out.println(lbrk + "\n" + "Your Engine is called: " + engine_Name + "\n");
  2470.                             System.out.println("Your Engine Cycle is: " + engine_Cycle_Chosen);
  2471.                             System.out.println("Your oxidizer is: " + oxidizer_Chosen);
  2472.                             System.out.println("Your Fuel is: " + fuel_Chosen);
  2473.                             System.out.println("Your Altitude of operation is: " + altitude_Of_Operation_Chosen);
  2474.                             System.out.println("Your engine's nozzle type should be : " + nozzle_Type_Chosen);
  2475.                             System.out.println("Tank repressurisation would be done " + tank_Repressurisation_Chosen + "\n");
  2476.                             XWPFDocument docx = new XWPFDocument();
  2477.                             if (new File(String.valueOf(pathn1)).exists()) {
  2478.                                 docx = new XWPFDocument(new FileInputStream(String.valueOf(pathn1)));
  2479.                             }
  2480.                             XWPFParagraph par = docx.createParagraph();
  2481.                             XWPFRun run = par.createRun();
  2482.                             run.setFontSize(12);
  2483.                             run.setBold(true);
  2484.                             run.setFontFamily("Calibri");
  2485.                             run.setText("Your Engine is called: ");
  2486.                             XWPFRun run2 = par.createRun();
  2487.                             run2.setFontSize(12);
  2488.                             run.setBold(true);
  2489.                             run2.setFontFamily("Calibri");
  2490.                             run2.setText(engine_Name);
  2491.                             run2.addBreak();
  2492.                             // -----------------------------------------------------------
  2493.                             XWPFRun run3 = par.createRun();
  2494.                             run3.setFontSize(10);
  2495.                             run3.setBold(true);
  2496.                             run3.setFontFamily("Calibri");
  2497.                             run3.setText("Your Engine Cycle is: ");
  2498.                             XWPFRun run4 = par.createRun();
  2499.                             run4.setFontSize(10);
  2500.                             run4.setFontFamily("Calibri");
  2501.                             run4.setText(engine_Cycle_Chosen);
  2502.                             run4.addBreak();
  2503.                             // -----------------------------------------------------------
  2504.                             XWPFRun run5 = par.createRun();
  2505.                             run5.setFontSize(10);
  2506.                             run5.setBold(true);
  2507.                             run5.setFontFamily("Calibri");
  2508.                             run5.setText("Your oxidizer is: ");
  2509.                             XWPFRun run6 = par.createRun();
  2510.                             run6.setFontSize(10);
  2511.                             run6.setFontFamily("Calibri");
  2512.                             run6.setText(oxidizer_Chosen);
  2513.                             run6.addBreak();
  2514.                             // -----------------------------------------------------------
  2515.                             XWPFRun run8 = par.createRun();
  2516.                             run8.setFontSize(10);
  2517.                             run8.setBold(true);
  2518.                             run8.setFontFamily("Calibri");
  2519.                             run8.setText("Your Fuel is: ");
  2520.                             XWPFRun run7 = par.createRun();
  2521.                             run7.setFontSize(10);
  2522.                             run7.setFontFamily("Calibri");
  2523.                             run7.setText(fuel_Chosen);
  2524.                             run7.addBreak();
  2525.                             // -----------------------------------------------------------
  2526.                             XWPFRun run9 = par.createRun();
  2527.                             run9.setFontSize(10);
  2528.                             run9.setBold(true);
  2529.                             run9.setFontFamily("Calibri");
  2530.                             run9.setText("Your engine's nozzle type should be: ");
  2531.                             XWPFRun run0 = par.createRun();
  2532.                             run0.setFontSize(10);
  2533.                             run0.setFontFamily("Calibri");
  2534.                             run0.setText(nozzle_Type_Chosen);
  2535.                             run0.addBreak();
  2536.                             // -----------------------------------------------------------
  2537.                             XWPFRun run11 = par.createRun();
  2538.                             run11.setFontSize(10);
  2539.                             run11.setBold(true);
  2540.                             run11.setFontFamily("Calibri");
  2541.                             run11.setText("Tank repressurisation would be done ");
  2542.                             XWPFRun run12 = par.createRun();
  2543.                             run12.setFontSize(10);
  2544.                             run12.setBold(true);
  2545.                             run12.setFontFamily("Calibri");
  2546.                             run12.setText(tank_Repressurisation_Chosen);
  2547.                             run12.addBreak();
  2548.                             // -----------------------------------------------------------
  2549.                             try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  2550.                                 docx.write(out);
  2551.                             }
  2552.                         }
  2553.                         case "Full Flow Staged Combustion", "Combustion Tap Off" -> {
  2554.                             String[] oxidizer_List4 = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)",
  2555.                                     "N2H4 (Hydrazine)", "O3 (Ozone)"};
  2556.                             Collections.shuffle(Arrays.asList(oxidizer_List4));
  2557.                             Random oxidizerChosen = new Random();
  2558.                             int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List4.length);
  2559.                             String oxidizer_Chosen = oxidizer_List4[oxidizerChosen_index];
  2560.  
  2561.                             String fuel_Chosen = "";
  2562.                             switch (oxidizer_Chosen) {
  2563.                                 case "O2 (Oxygen)" -> {
  2564.                                     String[] fuel_List4 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  2565.                                             "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  2566.                                             "CH3OH (Methanol)", "B2H6 (Diborane)", "B5H9 (Pentaborane)", "C2H6 (Ethane)"};
  2567.                                     Collections.shuffle(Arrays.asList(fuel_List4));
  2568.                                     Random fuelChosen = new Random();
  2569.                                     int fuelChosen_index = fuelChosen.nextInt(fuel_List4.length);
  2570.                                     fuel_Chosen = fuel_List4[fuelChosen_index];
  2571.                                 }
  2572.                                 case "F2 (Fluorine)" -> {
  2573.                                     String[] fuel_List5 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  2574.                                             "NH3 (Ammonia)", "C2H8N2 (UnsymetricalDimethylHydrazine)", "CH6N2 (MonomethylHydrazine)",
  2575.                                             "N2H4 (Hydrazine)", "CH3OH (Methanol)", "B2H6 (Diborane)", "B5H9 (Pentaborane)", "C2H6 (Ethane)"};
  2576.                                     Collections.shuffle(Arrays.asList(fuel_List5));
  2577.                                     Random fuelChosen = new Random();
  2578.                                     int fuelChosen_index = fuelChosen.nextInt(fuel_List5.length);
  2579.                                     fuel_Chosen = fuel_List5[fuelChosen_index];
  2580.                                 }
  2581.                                 case "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)" -> {
  2582.                                     String[] fuel_List6 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  2583.                                             "C6H5NH2 (Aniline)", "75% CH6N2 + 25% N2H4 (UH-25)", "50% CH6N2 + 50% N2H4 (Aerosine-50)",
  2584.                                             "CH6N2 (MonomethylHydrazine)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
  2585.                                     Collections.shuffle(Arrays.asList(fuel_List6));
  2586.                                     Random fuelChosen = new Random();
  2587.                                     int fuelChosen_index = fuelChosen.nextInt(fuel_List6.length);
  2588.                                     fuel_Chosen = fuel_List6[fuelChosen_index];
  2589.                                 }
  2590.                                 case "N2H4 (Hydrazine)" -> {
  2591.                                     String[] fuel_List7 = {"H2 (Hydrogen)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  2592.                                             "C6H5NH2 (Aniline)", "75% CH6N2 + 25% N2H4 (UH-25)", "50% CH6N2 + 50% N2H4 (Aerosine-50)",
  2593.                                             "C2H8N2 (UnsymetricalDimethylHydrazine)", "CH3OH (Methanol)", "B2H6 (Diborane)"};
  2594.                                     Collections.shuffle(Arrays.asList(fuel_List7));
  2595.                                     Random fuelChosen = new Random();
  2596.                                     int fuelChosen_index = fuelChosen.nextInt(fuel_List7.length);
  2597.                                     fuel_Chosen = fuel_List7[fuelChosen_index];
  2598.                                 }
  2599.                             }
  2600.                             Collections.shuffle(Arrays.asList(tank_Repressurisation));
  2601.                             Random tankRepressurisationChosen = new Random();
  2602.                             int tankRepressurisationChosen_index = tankRepressurisationChosen.nextInt(tank_Repressurisation.length);
  2603.                             String tank_Repressurisation_Chosen = tank_Repressurisation[tankRepressurisationChosen_index];
  2604.  
  2605.                             Collections.shuffle(Arrays.asList(altitude_Of_Operation));
  2606.                             Random altitudeOfOperationChosen = new Random();
  2607.                             int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
  2608.                             String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
  2609.  
  2610.                             String nozzle_Type_Chosen = "";
  2611.                             switch (altitude_Of_Operation_Chosen) {
  2612.                                 case "0-10 km (Sea Level)" -> {
  2613.                                     String[] nozzle_Type_List_SL = {"De Laval Cone (Without Nozzle Extension)",
  2614.                                             "De Laval Bell (Without Nozzle Extension)"};
  2615.                                     Collections.shuffle(Arrays.asList(nozzle_Type_List_SL));
  2616.                                     Random nozzleTypeSLspikeChosen = new Random();
  2617.                                     int nozzleTypeSLspikeChosen_index = nozzleTypeSLspikeChosen.nextInt(nozzle_Type_List_SL.length);
  2618.                                     nozzle_Type_Chosen = nozzle_Type_List_SL[nozzleTypeSLspikeChosen_index];
  2619.                                 }
  2620.                                 case "20-30 km (Medium Atmosphere)" -> {
  2621.                                     String[] nozzle_Type_List_HA = {"De Laval Bell (Without Nozzle Extension)", "De Laval Cone (With Nozzle Extension)",
  2622.                                             "De Laval Bell (With Nozzle Extension)", "Dual Bell Nozzle"};
  2623.                                     Collections.shuffle(Arrays.asList(nozzle_Type_List_HA));
  2624.                                     Random nozzleTypeHAspikeChosen = new Random();
  2625.                                     int nozzleTypeHAspikeChosen_index = nozzleTypeHAspikeChosen.nextInt(nozzle_Type_List_HA.length);
  2626.                                     nozzle_Type_Chosen = nozzle_Type_List_HA[nozzleTypeHAspikeChosen_index];
  2627.                                 }
  2628.                                 case "30-80 km (High Atmosphere)" -> {
  2629.                                     String[] nozzle_Type_List_HAi = {"De Laval Cone (With Nozzle Extension)", "De Laval Bell (With Nozzle Extension)",
  2630.                                             "Dual Bell Nozzle"};
  2631.                                     Collections.shuffle(Arrays.asList(nozzle_Type_List_HAi));
  2632.                                     Random nozzleTypeHAispikeChosen = new Random();
  2633.                                     int nozzleTypeHAispikeChosen_index = nozzleTypeHAispikeChosen.nextInt(nozzle_Type_List_HAi.length);
  2634.                                     nozzle_Type_Chosen = nozzle_Type_List_HAi[nozzleTypeHAispikeChosen_index];
  2635.                                 }
  2636.                                 case "80 km+ (Vacuum)" -> {
  2637.                                     String[] nozzle_Type_List_VA = {"De Laval Cone (With Nozzle Extension)",
  2638.                                             "De Laval Bell (With Nozzle Extension)", "Expanding Nozzle"};
  2639.                                     Collections.shuffle(Arrays.asList(nozzle_Type_List_VA));
  2640.                                     Random nozzleTypeVAspikeChosen = new Random();
  2641.                                     int nozzleTypeVAspikeChosen_index = nozzleTypeVAspikeChosen.nextInt(nozzle_Type_List_VA.length);
  2642.                                     nozzle_Type_Chosen = nozzle_Type_List_VA[nozzleTypeVAspikeChosen_index];
  2643.                                 }
  2644.                                 case "Any Altitude (0-80 km+)" -> {
  2645.                                     String[] nozzle_Type_List_Aero = {"Linear Aerospike Nozzle", "Toroidal Aerospike Nozzle", "Expansion-Deflection Nozzle"};
  2646.                                     Collections.shuffle(Arrays.asList(nozzle_Type_List_Aero));
  2647.                                     Random nozzleTypeAerospikeChosen = new Random();
  2648.                                     int nozzleTypeAerospikeChosen_index = nozzleTypeAerospikeChosen.nextInt(nozzle_Type_List_Aero.length);
  2649.                                     nozzle_Type_Chosen = nozzle_Type_List_Aero[nozzleTypeAerospikeChosen_index];
  2650.                                 }
  2651.                             }
  2652.  
  2653.                             System.out.println(lbrk + "\n" + "Your Engine is called: " + engine_Name + "\n");
  2654.                             System.out.println("Your Engine Cycle is: " + engine_Cycle_Chosen);
  2655.                             System.out.println("Your oxidizer is: " + oxidizer_Chosen);
  2656.                             System.out.println("Your Fuel is: " + fuel_Chosen);
  2657.                             System.out.println("Your Altitude of operation is: " + altitude_Of_Operation_Chosen);
  2658.                             System.out.println("Your engine's nozzle type should be : " + nozzle_Type_Chosen);
  2659.                             System.out.println("Tank repressurisation would be done " + tank_Repressurisation_Chosen + "\n");
  2660.                             XWPFDocument docx = new XWPFDocument();
  2661.                             if (new File(String.valueOf(pathn1)).exists()) {
  2662.                                 docx = new XWPFDocument(new FileInputStream(String.valueOf(pathn1)));
  2663.                             }
  2664.                             XWPFParagraph par = docx.createParagraph();
  2665.                             XWPFRun run = par.createRun();
  2666.                             run.setFontSize(12);
  2667.                             run.setBold(true);
  2668.                             run.setFontFamily("Calibri");
  2669.                             run.setText("Your Engine is called: ");
  2670.                             XWPFRun run2 = par.createRun();
  2671.                             run2.setFontSize(12);
  2672.                             run.setBold(true);
  2673.                             run2.setFontFamily("Calibri");
  2674.                             run2.setText(engine_Name);
  2675.                             run2.addBreak();
  2676.                             // -----------------------------------------------------------
  2677.                             XWPFRun run3 = par.createRun();
  2678.                             run3.setFontSize(10);
  2679.                             run3.setBold(true);
  2680.                             run3.setFontFamily("Calibri");
  2681.                             run3.setText("Your Engine Cycle is: ");
  2682.                             XWPFRun run4 = par.createRun();
  2683.                             run4.setFontSize(10);
  2684.                             run4.setFontFamily("Calibri");
  2685.                             run4.setText(engine_Cycle_Chosen);
  2686.                             run4.addBreak();
  2687.                             // -----------------------------------------------------------
  2688.                             XWPFRun run5 = par.createRun();
  2689.                             run5.setFontSize(10);
  2690.                             run5.setBold(true);
  2691.                             run5.setFontFamily("Calibri");
  2692.                             run5.setText("Your oxidizer is: ");
  2693.                             XWPFRun run6 = par.createRun();
  2694.                             run6.setFontSize(10);
  2695.                             run6.setFontFamily("Calibri");
  2696.                             run6.setText(oxidizer_Chosen);
  2697.                             run6.addBreak();
  2698.                             // -----------------------------------------------------------
  2699.                             XWPFRun run8 = par.createRun();
  2700.                             run8.setFontSize(10);
  2701.                             run8.setBold(true);
  2702.                             run8.setFontFamily("Calibri");
  2703.                             run8.setText("Your Fuel is: ");
  2704.                             XWPFRun run7 = par.createRun();
  2705.                             run7.setFontSize(10);
  2706.                             run7.setFontFamily("Calibri");
  2707.                             run7.setText(fuel_Chosen);
  2708.                             run7.addBreak();
  2709.                             // -----------------------------------------------------------
  2710.                             XWPFRun run9 = par.createRun();
  2711.                             run9.setFontSize(10);
  2712.                             run9.setBold(true);
  2713.                             run9.setFontFamily("Calibri");
  2714.                             run9.setText("Your engine's nozzle type should be: ");
  2715.                             XWPFRun run0 = par.createRun();
  2716.                             run0.setFontSize(10);
  2717.                             run0.setFontFamily("Calibri");
  2718.                             run0.setText(nozzle_Type_Chosen);
  2719.                             run0.addBreak();
  2720.                             // -----------------------------------------------------------
  2721.                             XWPFRun run11 = par.createRun();
  2722.                             run11.setFontSize(10);
  2723.                             run11.setBold(true);
  2724.                             run11.setFontFamily("Calibri");
  2725.                             run11.setText("Tank repressurisation would be done ");
  2726.                             XWPFRun run12 = par.createRun();
  2727.                             run12.setFontSize(10);
  2728.                             run12.setBold(true);
  2729.                             run12.setFontFamily("Calibri");
  2730.                             run12.setText(tank_Repressurisation_Chosen);
  2731.                             run12.addBreak();
  2732.                             // -----------------------------------------------------------
  2733.                             try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  2734.                                 docx.write(out);
  2735.                             }
  2736.                         }
  2737.                         default -> {
  2738.                             String[] oxidizer_List6 = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)",
  2739.                                     "N2O4 (Nitrogen Tetroxide)", "N2H4 (Hydrazine)", "H2O2 (Hydrogen Peroxide) 95%",
  2740.                                     "H2O2 (Hydrogen Peroxide) 85%", "O3 (Ozone)", "AK20F: 80% HNO3 + 20% N2O4 (Nitric Acid)",
  2741.                                     "AK20I: 80% HNO3 + 20% N2O4 (Nitric Acid)", "AK20K: 80% HNO3 + 20% N2O4 (Nitric Acid)",
  2742.                                     "AK27I: 73% HNO3 + 27% N2O4 (Nitric Acid)", "AK27P: 73% HNO3 + 27% N2O4 (Nitric Acid)",
  2743.                                     "ClF3 (Chlorine Trifluoride)", "ClF5 (Chlorine Pentafluoride)"};
  2744.                             Collections.shuffle(Arrays.asList(oxidizer_List6));
  2745.                             Random oxidizerChosen = new Random();
  2746.                             int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List6.length);
  2747.                             String oxidizer_Chosen = oxidizer_List6[oxidizerChosen_index];
  2748.  
  2749.                             String fuel_Chosen = "";
  2750.                             switch (oxidizer_Chosen) {
  2751.                                 case "O2 (Oxygen)" -> {
  2752.                                     String[] fuel_List8 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  2753.                                             "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "CH6N2 (MonomethylHydrazine)",
  2754.                                             "N2H4 (Hydrazine)", "CH3OH (Methanol)", "C12H24 (Kerosene)", "B2H6 (Diborane)", "B5H9 (Pentaborane)",
  2755.                                             "C2H6 (Ethane)"};
  2756.                                     Collections.shuffle(Arrays.asList(fuel_List8));
  2757.                                     Random fuelChosen = new Random();
  2758.                                     int fuelChosen_index = fuelChosen.nextInt(fuel_List8.length);
  2759.                                     fuel_Chosen = fuel_List8[fuelChosen_index];
  2760.                                 }
  2761.                                 case "F2 (Fluorine)" -> {
  2762.                                     String[] fuel_List9 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  2763.                                             "C6H5NH2 (Aniline)", "NH3 (Ammonia)",
  2764.                                             "C2H8N2 (UnsymetricalDimethylHydrazine)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  2765.                                             "CH3OH (Methanol)", "C12H24 (Kerosene)", "B2H6 (Diborane)", "B5H9 (Pentaborane)", "C2H6 (Ethane)"};
  2766.                                     Collections.shuffle(Arrays.asList(fuel_List9));
  2767.                                     Random fuelChosen = new Random();
  2768.                                     int fuelChosen_index = fuelChosen.nextInt(fuel_List9.length);
  2769.                                     fuel_Chosen = fuel_List9[fuelChosen_index];
  2770.                                 }
  2771.                                 case "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)" -> {
  2772.                                     String[] fuel_List10 = {"H2 (Hydrogen)", "CH3OH (Methanol)", "C12H24 (Kerosene)", "B2H6 (Diborane)",
  2773.                                             "B5H9 (Pentaborane)", "C2H6 (Ethane)"};
  2774.                                     Collections.shuffle(Arrays.asList(fuel_List10));
  2775.                                     Random fuelChosen = new Random();
  2776.                                     int fuelChosen_index = fuelChosen.nextInt(fuel_List10.length);
  2777.                                     fuel_Chosen = fuel_List10[fuelChosen_index];
  2778.                                 }
  2779.                                 case "AK20F: 80% HNO3 + 20% N2O4 (Nitric Acid)", "AK20I: 80% HNO3 + 20% N2O4 (Nitric Acid)",
  2780.                                         "AK20K: 80% HNO3 + 20% N2O4 (Nitric Acid)", "AK27I: 73% HNO3 + 27% N2O4 (Nitric Acid)",
  2781.                                         "AK27P: 73% HNO3 + 27% N2O4 (Nitric Acid)", "ClF3 (Chlorine Trifluoride)",
  2782.                                         "ClF5 (Chlorine Pentafluoride)" -> {
  2783.                                     String[] fuel_List11 = {"C2H5OH(Ethanol) 85%", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  2784.                                             "CH3OH (Methanol)"};
  2785.                                     Collections.shuffle(Arrays.asList(fuel_List11));
  2786.                                     Random fuelChosen = new Random();
  2787.                                     int fuelChosen_index = fuelChosen.nextInt(fuel_List11.length);
  2788.                                     fuel_Chosen = fuel_List11[fuelChosen_index];
  2789.                                 }
  2790.                                 case "N2O4 (Nitrogen Tetroxide)", "H2O2 (Hydrogen Peroxide) 95%", "H2O2 (Hydrogen Peroxide) 85%" -> {
  2791.                                     String[] fuel_List12 = {"H2 (Hydrogen)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  2792.                                             "C6H5NH2 (Aniline)", "75% CH6N2 + 25% N2H4 (UH-25)", "50% CH6N2 + 50% N2H4 (Aerosine-50)",
  2793.                                             "C2H8N2 (UnsymmetricalDimethylHydrazine)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  2794.                                             "CH3OH (Methanol)", "C12H24 (Kerosene)", "C2H6 (Ethane)"};
  2795.                                     Collections.shuffle(Arrays.asList(fuel_List12));
  2796.                                     Random fuelChosen = new Random();
  2797.                                     int fuelChosen_index = fuelChosen.nextInt(fuel_List12.length);
  2798.                                     fuel_Chosen = fuel_List12[fuelChosen_index];
  2799.                                 }
  2800.                                 case "N2H4 (Hydrazine)" -> {
  2801.                                     String[] fuel_List13 = {"B2H6 (Diborane)", "B5H9 (Pentaborane)"};
  2802.                                     Collections.shuffle(Arrays.asList(fuel_List13));
  2803.                                     Random fuelChosen = new Random();
  2804.                                     int fuelChosen_index = fuelChosen.nextInt(fuel_List13.length);
  2805.                                     fuel_Chosen = fuel_List13[fuelChosen_index];
  2806.                                 }
  2807.                             }
  2808.  
  2809.                             Collections.shuffle(Arrays.asList(tank_Repressurisation));
  2810.                             Random tankRepressurisationChosen = new Random();
  2811.                             int tankRepressurisationChosen_index = tankRepressurisationChosen.nextInt(tank_Repressurisation.length);
  2812.                             String tank_Repressurisation_Chosen = tank_Repressurisation[tankRepressurisationChosen_index];
  2813.  
  2814.                             Collections.shuffle(Arrays.asList(altitude_Of_Operation));
  2815.                             Random altitudeOfOperationChosen = new Random();
  2816.                             int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
  2817.                             String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
  2818.  
  2819.                             String nozzle_Type_Chosen = "";
  2820.                             switch (altitude_Of_Operation_Chosen) {
  2821.                                 case "0-10 km (Sea Level)" -> {
  2822.                                     String[] nozzle_Type_List_SL = {"De Laval Cone (Without Nozzle Extension)",
  2823.                                             "De Laval Bell (Without Nozzle Extension)"};
  2824.                                     Collections.shuffle(Arrays.asList(nozzle_Type_List_SL));
  2825.                                     Random nozzleTypeSLspikeChosen = new Random();
  2826.                                     int nozzleTypeSLspikeChosen_index = nozzleTypeSLspikeChosen.nextInt(nozzle_Type_List_SL.length);
  2827.                                     nozzle_Type_Chosen = nozzle_Type_List_SL[nozzleTypeSLspikeChosen_index];
  2828.                                 }
  2829.                                 case "20-30 km (Medium Atmosphere)" -> {
  2830.                                     String[] nozzle_Type_List_HA = {"De Laval Bell (Without Nozzle Extension)", "De Laval Cone (With Nozzle Extension)",
  2831.                                             "De Laval Bell (With Nozzle Extension)", "Dual Bell Nozzle"};
  2832.                                     Collections.shuffle(Arrays.asList(nozzle_Type_List_HA));
  2833.                                     Random nozzleTypeHAspikeChosen = new Random();
  2834.                                     int nozzleTypeHAspikeChosen_index = nozzleTypeHAspikeChosen.nextInt(nozzle_Type_List_HA.length);
  2835.                                     nozzle_Type_Chosen = nozzle_Type_List_HA[nozzleTypeHAspikeChosen_index];
  2836.                                 }
  2837.                                 case "30-80 km (High Atmosphere)" -> {
  2838.                                     String[] nozzle_Type_List_HAi = {"De Laval Cone (With Nozzle Extension)", "De Laval Bell (With Nozzle Extension)",
  2839.                                             "Dual Bell Nozzle"};
  2840.                                     Collections.shuffle(Arrays.asList(nozzle_Type_List_HAi));
  2841.                                     Random nozzleTypeHAispikeChosen = new Random();
  2842.                                     int nozzleTypeHAispikeChosen_index = nozzleTypeHAispikeChosen.nextInt(nozzle_Type_List_HAi.length);
  2843.                                     nozzle_Type_Chosen = nozzle_Type_List_HAi[nozzleTypeHAispikeChosen_index];
  2844.                                 }
  2845.                                 case "80 km+ (Vacuum)" -> {
  2846.                                     String[] nozzle_Type_List_VA = {"De Laval Cone (With Nozzle Extension)",
  2847.                                             "De Laval Bell (With Nozzle Extension)", "Expanding Nozzle"};
  2848.                                     Collections.shuffle(Arrays.asList(nozzle_Type_List_VA));
  2849.                                     Random nozzleTypeVAspikeChosen = new Random();
  2850.                                     int nozzleTypeVAspikeChosen_index = nozzleTypeVAspikeChosen.nextInt(nozzle_Type_List_VA.length);
  2851.                                     nozzle_Type_Chosen = nozzle_Type_List_VA[nozzleTypeVAspikeChosen_index];
  2852.                                 }
  2853.                                 case "Any Altitude (0-80 km+)" -> {
  2854.                                     String[] nozzle_Type_List_Aero = {"Linear Aerospike Nozzle", "Toroidal Aerospike Nozzle", "Expansion-Deflection Nozzle"};
  2855.                                     Collections.shuffle(Arrays.asList(nozzle_Type_List_Aero));
  2856.                                     Random nozzleTypeAerospikeChosen = new Random();
  2857.                                     int nozzleTypeAerospikeChosen_index = nozzleTypeAerospikeChosen.nextInt(nozzle_Type_List_Aero.length);
  2858.                                     nozzle_Type_Chosen = nozzle_Type_List_Aero[nozzleTypeAerospikeChosen_index];
  2859.                                 }
  2860.                             }
  2861.                             System.out.println(lbrk + "\n" + "Your Engine is called: " + engine_Name + "\n");
  2862.                             System.out.println("Your Engine Cycle is: " + engine_Cycle_Chosen);
  2863.                             System.out.println("Your oxidizer is: " + oxidizer_Chosen);
  2864.                             System.out.println("Your Fuel is: " + fuel_Chosen);
  2865.                             System.out.println("Your Altitude of operation is: " + altitude_Of_Operation_Chosen);
  2866.                             System.out.println("Your engine's nozzle type should be : " + nozzle_Type_Chosen);
  2867.                             System.out.println("Tank repressurisation would be done " + tank_Repressurisation_Chosen + "\n");
  2868.                             XWPFDocument docx = new XWPFDocument();
  2869.                             if (new File(String.valueOf(pathn1)).exists()) {
  2870.                                 docx = new XWPFDocument(new FileInputStream(String.valueOf(pathn1)));
  2871.                             }
  2872.                             XWPFParagraph par = docx.createParagraph();
  2873.                             XWPFRun run = par.createRun();
  2874.                             run.setFontSize(12);
  2875.                             run.setBold(true);
  2876.                             run.setFontFamily("Calibri");
  2877.                             run.setText("Your Engine is called: ");
  2878.                             XWPFRun run2 = par.createRun();
  2879.                             run2.setFontSize(12);
  2880.                             run.setBold(true);
  2881.                             run2.setFontFamily("Calibri");
  2882.                             run2.setText(engine_Name);
  2883.                             run2.addBreak();
  2884.                             // -----------------------------------------------------------
  2885.                             XWPFRun run3 = par.createRun();
  2886.                             run3.setFontSize(10);
  2887.                             run3.setBold(true);
  2888.                             run3.setFontFamily("Calibri");
  2889.                             run3.setText("Your Engine Cycle is: ");
  2890.                             XWPFRun run4 = par.createRun();
  2891.                             run4.setFontSize(10);
  2892.                             run4.setFontFamily("Calibri");
  2893.                             run4.setText(engine_Cycle_Chosen);
  2894.                             run4.addBreak();
  2895.                             // -----------------------------------------------------------
  2896.                             XWPFRun run5 = par.createRun();
  2897.                             run5.setFontSize(10);
  2898.                             run5.setBold(true);
  2899.                             run5.setFontFamily("Calibri");
  2900.                             run5.setText("Your oxidizer is: ");
  2901.                             XWPFRun run6 = par.createRun();
  2902.                             run6.setFontSize(10);
  2903.                             run6.setFontFamily("Calibri");
  2904.                             run6.setText(oxidizer_Chosen);
  2905.                             run6.addBreak();
  2906.                             // -----------------------------------------------------------
  2907.                             XWPFRun run8 = par.createRun();
  2908.                             run8.setFontSize(10);
  2909.                             run8.setBold(true);
  2910.                             run8.setFontFamily("Calibri");
  2911.                             run8.setText("Your Fuel is: ");
  2912.                             XWPFRun run7 = par.createRun();
  2913.                             run7.setFontSize(10);
  2914.                             run7.setFontFamily("Calibri");
  2915.                             run7.setText(fuel_Chosen);
  2916.                             run7.addBreak();
  2917.                             // -----------------------------------------------------------
  2918.                             XWPFRun run9 = par.createRun();
  2919.                             run9.setFontSize(10);
  2920.                             run9.setBold(true);
  2921.                             run9.setFontFamily("Calibri");
  2922.                             run9.setText("Your engine's nozzle type should be: ");
  2923.                             XWPFRun run0 = par.createRun();
  2924.                             run0.setFontSize(10);
  2925.                             run0.setFontFamily("Calibri");
  2926.                             run0.setText(nozzle_Type_Chosen);
  2927.                             run0.addBreak();
  2928.                             // -----------------------------------------------------------
  2929.                             XWPFRun run11 = par.createRun();
  2930.                             run11.setFontSize(10);
  2931.                             run11.setBold(true);
  2932.                             run11.setFontFamily("Calibri");
  2933.                             run11.setText("Tank repressurisation would be done ");
  2934.                             XWPFRun run12 = par.createRun();
  2935.                             run12.setFontSize(10);
  2936.                             run12.setBold(true);
  2937.                             run12.setFontFamily("Calibri");
  2938.                             run12.setText(tank_Repressurisation_Chosen);
  2939.                             run12.addBreak();
  2940.                             // -----------------------------------------------------------
  2941.                             try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  2942.                                 docx.write(out);
  2943.                             }
  2944.                         }
  2945.                     }
  2946.                 } else {
  2947.                     while (!(repeatCommand.equalsIgnoreCase("Y") && repeatCommand.equalsIgnoreCase("N")) && repeatCommand.equalsIgnoreCase("YES") && repeatCommand.equalsIgnoreCase("NO") && !isEngineCycle) {
  2948.                         System.out.println("wrong input!");
  2949.                         System.out.print("> ");
  2950.                         repeatCommand = scanner.next();
  2951.                         if (repeatCommand.equalsIgnoreCase("Y") || repeatCommand.equalsIgnoreCase("N") || repeatCommand.equalsIgnoreCase("YES") || repeatCommand.equalsIgnoreCase("NO") || isEngineCycle) {
  2952.                             break;
  2953.                         }
  2954.                     }
  2955.                 }
  2956.             }
  2957.         }
  2958.     }
  2959. }    
  2960.  
Advertisement
Add Comment
Please, Sign In to add comment