Assignment5 - / Assignment #: 5 / Name: Your name /...

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

The preview shows page 1 - 2 out of 3 pages.
// Assignment #: 5//Name: Your name//StudentID: Your id//Lecture: Your lecture time (for instance, MWF 8:40am)//Description: The Assignment 5 class displays a menu of choices//(add online student or oncampus student,//compute their tuition, count certain students, list students,//quit, display menu) to a user.//Then it 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.*;//to use InputStreamReader and BufferedReaderimport java.util.*;//to use ArrayListpublic 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 student objectsArrayList studentList = new ArrayList();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?");

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
Matasu
Tags
Subroutine, printMenu, add online student

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture