fork download
  1. /* Hollis Meachum
  2.   March 20, 2017
  3. CSCE 111 504
  4. Exercise Twenty One
  5.  
  6. This program outputs all the combinations of chipotle orders.
  7. */
  8.  
  9. public class ExerciseTwentyOne
  10. {
  11. public static void main(String[]args) throws Exception
  12. {
  13. for(int Item = 0; Item < 4; Item++)
  14. {
  15. String ItemName;
  16. switch(Item)
  17. {
  18. case 0: ItemName="Burrito";
  19. break;
  20. case 1: ItemName="Burrito Bowl";
  21. break;
  22. case 2: ItemName="Soft Tacos";
  23. break;
  24. case 3: ItemName="Hard-shell Tacos";
  25. break;
  26. default: ItemName="error";// happens only if loop is incorrect.
  27. }
  28. for(int Rice = 0; Rice < 3; Rice++)
  29. {
  30. String RiceName;
  31. switch(Rice)
  32. {
  33. case 0: RiceName="White Rice";
  34. break;
  35. case 1: RiceName="Brown Rice";
  36. break;
  37. case 2: RiceName="No Rice";
  38. break;
  39. default: RiceName="error";// happens only if loop is incorrect.
  40. }
  41. for(int BeansOrVeggies = 0; BeansOrVeggies < 4; BeansOrVeggies++)
  42. {
  43. String BeansOrVeggiesName;
  44. switch(BeansOrVeggies)
  45. {
  46. case 0: BeansOrVeggiesName="Black Beans";
  47. break;
  48. case 1: BeansOrVeggiesName="Pinto Beans";
  49. break;
  50. case 2: BeansOrVeggiesName="Fajita Veggies";
  51. break;
  52. case 3: BeansOrVeggiesName="No Beans Or Veggies";
  53. break;
  54. default: BeansOrVeggiesName="error";// happens only if loop is incorrect.
  55. }
  56. for(int Meat = 0; Meat < 7; Meat++)
  57. {
  58. String MeatName;
  59. switch(Meat)
  60. {
  61. case 0: MeatName="Chicken";
  62. break;
  63. case 1: MeatName="Steak";
  64. break;
  65. case 2: MeatName="Carnitas";
  66. break;
  67. case 3: MeatName="Chorizo";
  68. break;
  69. case 4: MeatName="Barbacoa";
  70. break;
  71. case 5: MeatName="Sofritas";
  72. break;
  73. case 6: MeatName="No Meat";
  74. break;
  75. default: MeatName="error";// happens only if loop is incorrect.
  76. }
  77. for(int Salsa = 0; Salsa < 4; Salsa++)
  78. {
  79. String SalsaName;
  80. switch(Salsa)
  81. {
  82. case 0: SalsaName="Fresh Tomato Salsa (Mild)";
  83. break;
  84. case 1: SalsaName="Tomatillo Red-chili Salsa (Hot)";
  85. break;
  86. case 2: SalsaName="Tomatillo Green-chili Salsa (Medium)";
  87. break;
  88. case 3: SalsaName="No Salsa";
  89. break;
  90. default: SalsaName="error";// happens only if loop is incorrect.
  91. }
  92. for(int Toppings = 0; Toppings < 4; Toppings++)
  93. {
  94. String ToppingsName;
  95. switch(Toppings)
  96. {
  97. case 0: ToppingsName="Corn";
  98. break;
  99. case 1: ToppingsName="Lettuce";
  100. break;
  101. case 2: ToppingsName="Guacamole";
  102. break;
  103. case 3: ToppingsName="Cheese";
  104. break;
  105. default: ToppingsName="error";// happens only if loop is incorrect.
  106. }
  107. }
  108. }
  109. }
  110. }
  111. }
  112. }
  113. System.out.println("A "+ItemName+" with "+RiceName+" , "+BeansOrVeggiesName+", "+MeatName+", "+SalsaName+", and "+ToppingsName);
  114. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:114: error: reached end of file while parsing
}
 ^
1 error
stdout
Standard output is empty