Guest User

Untitled

a guest
Mar 28th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.64 KB | None | 0 0
  1.  
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class CSCmain {// start class
  6.  
  7.     public static void main(String args[]) { // start main
  8.         Scanner kb;
  9.         String selection = null;
  10.  
  11.         //while (selection.equalsIgnoreCase("h")) {
  12.        
  13.                 kb = new Scanner(System.in);
  14.                 System.out.println("Welcome back, what would you like to do? (Please select A through H)");
  15.                 System.out.println("");
  16.                 System.out.println("a. Load a member" + "\n" + "b. Save a member" + "\n"
  17.                         + "c. List all of the current members" + "\n" + "d. Add a member" + "\n" + "e. Remove a member"
  18.                         + "\n" + "f. List specific member" + "\n" + "g. Add an interest to a member" + "\n"
  19.                         + "h. Quit");
  20.  
  21.                 selection = kb.nextLine();
  22.                 while (!(selection.equalsIgnoreCase("a") || selection.equalsIgnoreCase("b")
  23.                         || selection.equalsIgnoreCase("c") || selection.equalsIgnoreCase("d")
  24.                         || selection.equalsIgnoreCase("e") || selection.equalsIgnoreCase("f")
  25.                         || selection.equalsIgnoreCase("g") || selection.equalsIgnoreCase("h"))) {
  26.                     System.out.println("Please select A through H.");
  27.                     selection = kb.nextLine();
  28.  
  29.                 }
  30.                 switch (selection) {
  31.                 case "a": // call method to load members
  32.                     System.out.println("aaaaa");
  33.                     break;
  34.                 case "b": // call method to save members
  35.                     break;
  36.                 case "c": // call method to list all of the members
  37.                     break;
  38.                 case "d": // call method to add a member
  39.                     break;
  40.                 case "e": // call method to remove a member
  41.                     break;
  42.                 case "f": // call method to list a specific member
  43.                     break;
  44.                 case "g": // call method to add interest to a method
  45.                     break;
  46.  
  47.  
  48.         }
  49.  
  50.     } // end main
  51.  
  52. } // end class
Advertisement
Add Comment
Please, Sign In to add comment