Assignment10

Assignment10 - / Assignment #: / Name: / StudentID: /...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
// Assignment #: 10 // Name: To be completed // StudentID: To be completed // Lecture Time: To be completed // Description: The Assignment 10 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. import java.io.*; public class Assignment10 { public static void main(String[] args) { char input1; String inputInfo = new String(); int operation2; String line = new String(); //create a linked list to be used in this method. LinkedList list1 = new LinkedList(); 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
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

Assignment10 - / Assignment #: / Name: / StudentID: /...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online