Assignment5.java - import java.io.*; /to use...

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

The preview shows page 1 - 2 out of 3 pages.
import java.io.*;//to use InputStreamReader and BufferedReaderimport java.util.*;//to use ArrayListimport java.text.NumberFormat;public class Assignment5{public static void main (String[] args){char input1;String inputInfo = new String();String line = new String();boolean operation;// ArrayList object is used to store customer objectsArrayList<Customer> customerList = new ArrayList<Customer>();try{printMenu();// print out menu// create a BufferedReader object to read input from a keyboardInputStreamReader 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 CustomerSystem.out.print("Please enter some customer information toadd:\n");inputInfo = stdin.readLine().trim();CustomerParser newParser = new CustomerParser(inputInfo);Customer temp= newParser.parseStringToCustomer(inputInfo);customerList.add(temp);/**************************************************************************************

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 3 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Spring
Professor
N/A

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture