MAKS_Enjoyer

I hate literature so much, why do i need to analyse a book from 300+ years ago

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