Assignment8 - Assignment Name StudentID Lecture Description import java.io 8 Daniel Sauter 1202351076 MWF 2:00pm 2:50pm The Assignment 8 class displays

Assignment8 - Assignment Name StudentID Lecture Description...

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

// Assignment #: 8 // Name: Daniel Sauter // StudentID: 1202351076 // Lecture: MWF: 2:00pm - 2:50pm // Description: The Assignment 8 class displays a menu of choices 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. It will create an object of BankSystem containing a list // of banks and customers, and perform insertion, deletion, // search, sorting, displaying, closing, writing to a file, // and reading from a file. import java.io.*; public class Assignment8 { public static void main (String[] args) { char input1; String inputInfo = new String(), inputInfo2 = new String(); String inputInfo3 = new String(), inputInfo4 = new String(); boolean operation = false; int operation2 = 0; int bankID; String line = new String(); String customerInfo = new String(), bankInfo = new String(); String filename = new String(); // create a BankSystem object. This is used throughout this class. BankSystem bankSystem1 = new BankSystem(); try { // print out the menu printMenu(); // create a BufferedReader object to read input from a keyboard InputStreamReader isr = new InputStreamReader (System.in); BufferedReader stdin = new BufferedReader (isr); do { System.out.print("What action would you like to perform?\n"); line = stdin.readLine().trim(); //read a line input1 = line.charAt(0); input1 = Character.toUpperCase(input1); if (line.length() == 1) //check if a user entered only one character { switch (input1) { case 'A': //Add Customer System.out.print("Please enter the customer information to add:\n");

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture