32 lines
847 B
Java
32 lines
847 B
Java
package Week1_Lab;
|
|
|
|
import java.util.Scanner;
|
|
|
|
public class partb {
|
|
public static void main(String[] args) {
|
|
Scanner sc = new Scanner(System.in);
|
|
|
|
System.out.println("Enter module code: ");
|
|
String module = sc.nextLine();
|
|
|
|
switch(module){
|
|
case "CSC1109":
|
|
System.out.println("Object-Oriented Programming");
|
|
break;
|
|
case "CSC1108":
|
|
System.out.println("Data Structures and Algorithms");
|
|
break;
|
|
case "INF1006":
|
|
System.out.println("Computer Networks");
|
|
break;
|
|
case "INF1004":
|
|
System.out.println("Mathematics 2");
|
|
break;
|
|
default:
|
|
System.out.println("Invalid module code");
|
|
break;
|
|
}
|
|
}
|
|
|
|
}
|