0

Hi am having problems creating a switch statement, in need to creatw the following statements

N Neuromancer
C Count Zero
M Mona Lisa Overdrive
B Burning Chrome
V Virtual Light

Choose a novel from menu above:
c
You chose "Count Zero"

This is a main/driver class.
Use a switch statement to pick a novel by entering the correct character.

  • Allow the user to enter upper or lower case.

If the novel is not on the list the program should output this exact string including a newline on the end:
That novel is not on the list

i tried doin it and i ended up with this

public static void main(String[] args) {
    Scanner scan = new Scanner (System.in);

    String
    N = "Neuromancer";
    C = "Count Zero";

    System.out.println("Choose a novel from menu above:");
    N = scan.nextLine();
    C = scan.nextLine();
    System.out.println("You chose");
     switch (operators)
     {
        case 10:
    }

    }
}

Edited by Reverend Jim: Fixed formatting

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by majestic0110
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.