-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlab1ex2.java
34 lines (30 loc) · 973 Bytes
/
lab1ex2.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import java.util.Scanner;
public class lab1ex2 {
public static void main(String arg[])
{
String module;
//Create Scanner object for keyboard input
Scanner console = new Scanner(System.in);
System.out.print("Enter an input: ");
module = console.nextLine();
switch(module)
{
case "CSC1009":
System.out.println("Object-Oriented Programming");
break;
case "CSC1006":
System.out.println("Mathematics 2");
break;
case "CSC1010":
System.out.println("Computer Networks");
break;
case "CSC1008":
System.out.println("Data Structures");
break;
default:
System.out.println("Unknown Currency");
break;
}
System.out.println("After switch");
}
}