Assignment5.java - Assignment 5\/Arizona State University CSE205\/Name Vidhi Bhargava\/StudentID 1217311498\/Lecture T Th 10:30am\/Description The Assignment

Assignment5.java - Assignment 5/Arizona State University...

This preview shows page 1 - 2 out of 3 pages.

// Assignment #: 5 //Arizona State University - CSE205 //Name: Vidhi Bhargava //StudentID: 1217311498 //Lecture: T Th 10:30am //Description: The Assignment 5 class displays a menu of choices // (add summer camp, search summer camp title, // list summer camps, quit, display menu) to a user // and performs the chosen task. It will keep asking a user to // enter the next choice until the choice of 'Q' (Quit) is // entered. import java.io.*; import java.util.*; public class Assignment5 { public static void main (String[] args) { char input1; String inputInfo = new String(); String line = new String(); boolean operation; ArrayList summerCampList = new ArrayList(); try { printMenu(); InputStreamReader isr = new InputStreamReader (System.in); BufferedReader stdin = new BufferedReader (isr); do { System.out.println("What action would you like to perform?"); line = stdin.readLine().trim(); input1 = line.charAt(0); input1 = Character.toUpperCase(input1); if (line.length() == 1) { switch (input1) { case 'A': //Add SummerCamp System.out.print("Please enter some summer camp information to add:\n"); inputInfo = stdin.readLine().trim();

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture