Advertisement
Guest User

1910-UnicornCS-LC2

a guest
Oct 23rd, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2. import java.util.Arrays;
  3. public class Vacation {
  4.  
  5. //dream perfect paradise like a welcome board, then press a button to start
  6. //ideal destinations include
  7. //italy eastern hemisphere
  8. //usa western hemisphere
  9. //puerto rico near USA
  10. // egypt eastern hemisphere
  11.     //show continents for them to choose
  12.     //italy climate?
  13.     //tropical climate only warmth no snow
  14.     //usa has snow
  15.     //egypt is hot
  16.     // should they go in order? kind of like telling a story?
  17.     // should the prices be involved? what currency would they be in?
  18.     //language?
  19.     // include at the end a description of the final destination that summarizes their choices
  20.  
  21.     public static void main(String[] args) {
  22.         Integer[] answers = new Integer[14];
  23.  
  24.         String[] climates = new String[4];
  25.  
  26.         climates[0] = "Tropical Climate";
  27.         climates[1] = "Cold Climate";
  28.         climates[2] = "Dry Climate";
  29.         climates[3] = "Arid Climate";
  30.  
  31.         for (int i = 0; i < climates.length; i++) {
  32.             System.out.println(i + " " + climates[i]);
  33.         }
  34.         System.out.println("Pick a Climate");
  35.         Scanner keyboard1 = new Scanner(System.in);
  36.         int answerclimate = keyboard1.nextInt();
  37.  
  38.         answers[0] = answerclimate;
  39.  
  40.  
  41.         String[] foods = new String[4];
  42.  
  43.         foods[0] = "Spaghetti";
  44.         foods[1] = "Hamburger";
  45.         foods[2] = "Rice and Beans";
  46.         foods[3] = "Falafel";
  47.  
  48.         for (int i = 0; i < foods.length; i++) {
  49.             System.out.println(i + " " + foods[i]);
  50.         }
  51.         System.out.println("Pick a food");
  52.         Scanner keyboard2 = new Scanner(System.in);
  53.         int answerfood = keyboard2.nextInt();
  54.  
  55.         answers[1] = answerfood;
  56.  
  57.         String[] beverages = new String[4];
  58.  
  59.         beverages[0] = "Tea";
  60.         beverages[1] = "Coffee";
  61.         beverages[2] = "Piña Colada";
  62.         beverages[3] = "Egyptian Flask";
  63.  
  64.         for (int i = 0; i < beverages.length; i++) {
  65.             System.out.println(i + " " + beverages[i]);
  66.         }
  67.         System.out.println("Pick a beverage");
  68.         Scanner keyboard3 = new Scanner(System.in);
  69.         int answerbeverages = keyboard3.nextInt();
  70.  
  71.         answers[2] = answerbeverages;
  72.  
  73.         String[] transportations = new String[4];
  74.  
  75.         transportations[0] = "Airplane";
  76.         transportations[1] = "Car";
  77.         transportations[2] = "Boat";
  78.         transportations[3] = "Tuk Tuks";
  79.  
  80.         for (int i = 0; i < transportations.length; i++) {
  81.             System.out.println(i + " " + transportations[i]);
  82.         }
  83.         System.out.println("Which mode of transportation would you ideally use?");
  84.         Scanner keyboard4 = new Scanner(System.in);
  85.         int answertransportations = keyboard4.nextInt();
  86.  
  87.         answers[3] = answertransportations;
  88.  
  89.         // this choice has no value
  90.         String[] durations = new String[4];
  91.  
  92.         durations[0] = "about a week";
  93.         durations[1] = "about a month";
  94.         durations[2] = "about a year";
  95.         durations[3] = "about a day";
  96.  
  97.         for (int i = 0; i < durations.length; i++) {
  98.             System.out.println(i + " " + durations[i]);
  99.         }
  100.         System.out.println("How long would you like to travel?");
  101.         Scanner keyboard5 = new Scanner(System.in);
  102.         int answerdurations = keyboard5.nextInt();
  103.         answers[4] = answerdurations;
  104.  
  105.         String[] animals = new String[4];
  106.  
  107.         animals[0] = "pigeon";
  108.         animals[1] = "wolf";
  109.         animals[2] = "parrot";
  110.         animals[3] = "camel";
  111.  
  112.         for (int i = 0; i < animals.length; i++) {
  113.             System.out.println(i + " " + animals[i]);
  114.         }
  115.         System.out.println("Pick the animal you would like to see");
  116.         Scanner keyboard6 = new Scanner(System.in);
  117.         int answeranimals = keyboard6.nextInt();
  118.         answers[5] = answeranimals;
  119.  
  120.         String[] guides = new String[4];
  121.  
  122.         guides[0] = "italian artist with the hat";
  123.         guides[1] = "usa guide";
  124.         guides[2] = "hawaiian shirt";
  125.         guides[3] = "egyptian turbante";
  126.  
  127.         for (int i = 0; i < guides.length; i++) {
  128.             System.out.println(i + " " + guides[i]);
  129.         }
  130.         System.out.println("Select which you would want as a tour guide");
  131.         Scanner keyboard7 = new Scanner(System.in);
  132.         int answerguides = keyboard7.nextInt();
  133.         answers[6] = answerguides;
  134.  
  135.         String[] sculptures = new String[4];
  136.  
  137.         sculptures[0] = "European statue Venus de Milo";
  138.         sculptures[1] = "Civil War Artifact";
  139.         sculptures[2] = "Caribbean Underwater sculpture of Coral Reef or Atalantis";
  140.         sculptures[3] = "Egyptian statue of Tutankhamon";
  141.  
  142.         for (int i = 0; i < sculptures.length; i++) {
  143.             System.out.println(i + " " + sculptures[i]);
  144.         }
  145.         System.out.println("Select your favorite sculpture");
  146.         Scanner keyboard8 = new Scanner(System.in);
  147.         int answersculptures = keyboard8.nextInt();
  148.         answers[7] = answersculptures;
  149.  
  150.  
  151.         String[] landscapes = new String[4];
  152.  
  153.         landscapes[0] = "Mountains";
  154.         landscapes[1] = "big house in usa";
  155.         landscapes[2] = "Ocean";
  156.         landscapes[3] = "Desert";
  157.  
  158.         for (int i = 0; i < landscapes.length; i++) {
  159.             System.out.println(i + " " + landscapes[i]);
  160.         }
  161.         System.out.println("Select your favorite landscape");
  162.         Scanner keyboard9 = new Scanner(System.in);
  163.         int answerlandscapes = keyboard9.nextInt();
  164.         answers[8] = answerlandscapes;
  165.  
  166.  
  167.         String[] landmarks = new String[4];
  168.  
  169.         landmarks[0] = "Tower of Pisa";
  170.         landmarks[1] = "US Presidents";
  171.         landmarks[2] = "Playa Bioluminicente Vieques";
  172.         landmarks[3] = "Pyramids en Egypt";
  173.  
  174.         for (int i = 0; i < landmarks.length; i++) {
  175.             System.out.println(i + " " + landmarks[i]);
  176.         }
  177.         System.out.println("Select your favorite landmark");
  178.         Scanner keyboard10 = new Scanner(System.in);
  179.         int answerlandmarks = keyboard10.nextInt();
  180.         answers[9] = answerlandmarks;
  181.  
  182.  
  183.         String[] presidents = new String[4];
  184.  
  185.         presidents[0] = "Quirinal Palace";
  186.         presidents[1] = "White House";
  187.         presidents[2] = "Fortaleza en Viejo San Juan";
  188.         presidents[3] = "Africa Presidents Place";
  189.  
  190.         for (int i = 0; i < presidents.length; i++) {
  191.             System.out.println(i + " " + presidents[i]);
  192.         }
  193.         System.out.println("Select the one you like the best");
  194.         Scanner keyboard11 = new Scanner(System.in);
  195.         int answerpresidents = keyboard11.nextInt();
  196.         answers[10] = answerpresidents;
  197.  
  198. // the outcome  of this question has no value
  199.         String[] luggages = new String[4];
  200.  
  201.         luggages[0] = "Simple Backpack";
  202.         luggages[1] = "Light suitcase";
  203.         luggages[2] = "Heavy suicase";
  204.         luggages[3] = "Heavy Exploring Backpack";
  205.  
  206.         for (int i = 0; i < luggages.length; i++) {
  207.             System.out.println(i + " " + luggages[i]);
  208.         }
  209.         System.out.println("Pick a Bag");
  210.         Scanner keyboard12 = new Scanner(System.in);
  211.         int answerluggages = keyboard12.nextInt();
  212.         answers[11] = answerluggages;
  213.  
  214.         String[] snacks = new String[4];
  215.  
  216.         snacks[0] = "Kinder Brioss";
  217.         snacks[1] = "Welchs";
  218.         snacks[2] = "Piragua";
  219.         snacks[3] = "Motto";
  220.  
  221.         for (int i = 0; i < snacks.length; i++) {
  222.             System.out.println(i + " " + snacks[i]);
  223.         }
  224.         System.out.println("Pick a Snack");
  225.         Scanner keyboard13 = new Scanner(System.in);
  226.         int answersnacks = keyboard13.nextInt();
  227.         answers[12] = answersnacks;
  228.  
  229.  
  230.         String[] desserts = new String[4];
  231.  
  232.         desserts[0] = "Gelato";
  233.         desserts[1] = "Kit Kat";
  234.         desserts[2] = "Tembleque";
  235.         desserts[3] = "Basbusa";
  236.  
  237.         for (int i = 0; i < desserts.length; i++) {
  238.             System.out.println(i + " " + desserts[i]);
  239.         }
  240.         System.out.println("Pick a Dessert");
  241.         Scanner keyboard14 = new Scanner(System.in);
  242.         int answerdesserts = keyboard14.nextInt();
  243.         answers[13] = answerdesserts;
  244.  
  245.         int Final0 = 0;
  246.         for (int i = 0; i < 14; i++) {
  247.  
  248.             if (answers[i] == 0)
  249.                 Final0 = Final0 + 1;
  250.         }
  251.  
  252.         int Final1 = 0;
  253.         for (int i = 0; i < 14; i++) {
  254.             if (answers[i] == 1)
  255.                 Final1 = Final1 + 1;
  256.         }
  257.  
  258.         int Final2 = 0;
  259.         for (int i = 0; i < 14; i++) {
  260.             if (answers[i] == 2)
  261.                 Final2 = Final2 + 1;
  262.         }
  263.  
  264.         int Final3 = 0;
  265.         for (int i = 0; i < 14; i++) {
  266.             if (answers[i] == 3)
  267.                 Final3 = Final3 + 1;
  268.         }
  269.     }
  270.  
  271.  
  272.  
  273.     class FinalNumber {
  274.  
  275.         int[] number = {0, 1, 2, 3};
  276.  
  277.          Arrays.sort(number);
  278.  
  279.          System.out.printf(" Your dream destination is: " + Arrays.toString(number));
  280.     }
  281.  
  282.     class Final {
  283.         String destination;
  284.  
  285.         void speak() {
  286.             System.out.println("Your travel destination is: " + destination);
  287.         }
  288.     }
  289. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement