Untitled
unknown
java
3 years ago
2.7 kB
7
Indexable
import java.util.Scanner;
public class Main {
public static void main(String[] args)
{
menu_ST();
studORteach(choice());
}
static void menu_ST(){
System.out.println("ABC COLLEGE INC.");
System.out.println("Are you a: ");
System.out.println("[1] Student");
System.out.println("[2] Teacher");
}
static void menu_student(){
System.out.println("STUDENT");
System.out.println("[1] Add new Student");
System.out.println("[2] Update Student");
System.out.println("[3] Delete Student");
System.out.println("[4] Show Remaining Balance");
System.out.println("[5] Fee Deposit");
System.out.println("[6] Display Students with Zero Balance");
System.out.println("[7] Display all Students with Non-Zero Balance");
}
static void menu_teacher(){
System.out.println("[1] Add new Teacher");
System.out.println("[2] Update Teacher");
System.out.println("[3] Delete Teacher");
System.out.println("[4] Calculate salary of Teacher");
System.out.println("[5] Show all Teachers");
}
static int choice(){
Scanner in = new Scanner(System.in);
System.out.print("Please enter your choice: ");
int choice = in.nextInt();
//in.close();
return choice;
}
static void studORteach(int c){
switch(c){
case 1:
menu_student();
stud(choice());
break;
case 2:
menu_teacher();
break;
default:
}
}
static void stud(int c){
switch (c){
case 1:
System.out.println("[1]");
// add
break;
case 2:
// update
break;
case 3:
// delete
break;
case 4:
// show balance
break;
case 5:
// fee deposit
break;
case 6:
// display zero bal
break;
case 7:
// display non zero
break;
default:
System.out.println("tete");
}
}
static void teach(int c){
switch (c){
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
break;
case 5:
break;
default:
System.out.println("tete");
}
}
}Editor is loading...