MAKS_Enjoyer

i have been convicted of several counts of aggravated assault (of golems in minecraft)

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