MCPcopy Create free account
hub / github.com/SR-Sunny-Raj/Hacktoberfest2021-DSA / adminmenu

Method adminmenu

32. Java Programs/hotelManagement.java:121–175  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

119 }
120
121 void adminmenu()
122 {
123 admin admin1=new admin();
124 Scanner sc=new Scanner(System.in);
125 int ch;
126 ch=1;
127 menu show_menu = new menu();
128 boolean flag=false;
129 boolean flag1=false;
130 boolean flag2;
131 do{
132 flag=show_menu.list();
133 if (flag==true)
134 {
135 flag1=admin1.checkPassword();
136 if(flag1==true)
137 {
138 System.out.println("____________________Admin____________________");
139 System.out.println("1.Add");
140 System.out.println("2.Remove");
141 System.out.println("3.Editfile");
142 System.out.println("4.Resetword");
143 System.out.println("5.Exit System.out.print("Enter choise : ");
144 ch=sc.nextInt();
145 switch(ch)
146 {
147 case 1:
148 show_menu.additem();
149 break;
150
151 case 2:
152 show_menu.removeitem();
153 break;
154
155 case 3:
156 show_menu.editprofile();
157 break;
158
159 case 4:
160 admin1.reserPassword();
161 break;
162
163 case 5:
164 break;
165
166 default:
167 break;
168 }
169
170 }
171
172 }
173 }while(ch!=5);
174
175}
176}
177
178class menu{

Callers 1

mainMethod · 0.95

Calls 6

checkPasswordMethod · 0.95
reserPasswordMethod · 0.95
listMethod · 0.80
additemMethod · 0.80
removeitemMethod · 0.80
editprofileMethod · 0.80

Tested by

no test coverage detected