MAKS_Enjoyer

one phish, two phish, red phish and blue phish

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