MAKS_Enjoyer

i want to use a R-28 Sarmat Nuclear MIRV capable ICBM (in Minecraft)

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