-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.java
More file actions
80 lines (63 loc) · 2.56 KB
/
Copy pathtest.java
File metadata and controls
80 lines (63 loc) · 2.56 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
package amrita;
import java.util.Scanner;
public class test {
private static int guestCount;
public void statistics(String foodItem)
{
menu m=new menu();
studentList l=new studentList();
double tempCost =(30/7)*menu.getFoodList().elementAt(m.search(foodItem)).getCostPerServe()*menu.getFoodList().elementAt(m.search(foodItem)).getDay().length*l.getStuCount();
System.out.println("Average cost per month is : "+tempCost);
}
public void stuUI()
{
studentList s=new studentList();
int index=s.search(key);
System.out.println("Hi !!!");
System.out.println("how are you "+s.getStuList().elementAt(index).getName());
System.out.println("Please enter your choice form the given menu : ");
System.out.println("");
}
public void genUI()
{
Scanner inp=new Scanner(System.in);
System.out.println("###########################################################################");
System.out.println("###########################################################################");
System.out.println("## *** || || || || *** @ @ @ ##");
System.out.println("## ** ** |||| || || |||| || || ** ** @ ##");
System.out.println("## ** ** || || || || || || ** ** @ @ ##");
System.out.println("## ** ** *** || || || || ** ** *** @ ##");
System.out.println("## ** ** || |||| ||** ** @ @ @ ##");
System.out.println("###########################################################################");
System.out.println("###########################################################################");
System.out.println("Hi dear user welcome to AMRITA MESS MANAGEMENT SYSTEM (AMMAs)!!!");
System.out.println("Please choose from the following : ");
System.out.println("1) Student\n2) Manager 3) Guest");
int choice=inp.nextInt();
switch(choice)
{
case 1:stuUI();
break;
case 2:managUI();
break;
case 3:genUI();
break;
}
inp.close();
}
public void managUI()
{
System.out.println("Hi !!!");
System.out.println("how are );
System.out.println("Please enter your choice form the given menu : ");
System.out.println("");
}
public void guestUI()
{
++guestCount;
System.out.println("Hi !!!");
System.out.println("You are our "+guestCount+" guest");
System.out.println("Please enter your choice form the given menu : ");
System.out.println("");
}
}