Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class CSCmain {// start class
- public static void main(String args[]) { // start main
- Scanner kb;
- String selection = null;
- //while (selection.equalsIgnoreCase("h")) {
- kb = new Scanner(System.in);
- System.out.println("Welcome back, what would you like to do? (Please select A through H)");
- System.out.println("");
- System.out.println("a. Load a member" + "\n" + "b. Save a member" + "\n"
- + "c. List all of the current members" + "\n" + "d. Add a member" + "\n" + "e. Remove a member"
- + "\n" + "f. List specific member" + "\n" + "g. Add an interest to a member" + "\n"
- + "h. Quit");
- selection = kb.nextLine();
- while (!(selection.equalsIgnoreCase("a") || selection.equalsIgnoreCase("b")
- || selection.equalsIgnoreCase("c") || selection.equalsIgnoreCase("d")
- || selection.equalsIgnoreCase("e") || selection.equalsIgnoreCase("f")
- || selection.equalsIgnoreCase("g") || selection.equalsIgnoreCase("h"))) {
- System.out.println("Please select A through H.");
- selection = kb.nextLine();
- }
- switch (selection) {
- case "a": // call method to load members
- System.out.println("aaaaa");
- break;
- case "b": // call method to save members
- break;
- case "c": // call method to list all of the members
- break;
- case "d": // call method to add a member
- break;
- case "e": // call method to remove a member
- break;
- case "f": // call method to list a specific member
- break;
- case "g": // call method to add interest to a method
- break;
- }
- } // end main
- } // end class
Advertisement
Add Comment
Please, Sign In to add comment