switch (result) { case 1: Userview.userManage(); break; case 2: Studentview.studentManage();写出上述代码中Studentview类
时间: 2024-02-10 15:14:37 浏览: 118
Studentview类的代码如下所示:
```
import java.util.Scanner;
public class Studentview {
public static void studentManage() {
Scanner scanner = new Scanner(System.in);
int choice = 0;
while (choice != 5) {
System.out.println("学生管理子菜单");
System.out.println("添加学生,请输入1");
System.out.println("删除学生,请输入2");
System.out.println("修改学生,请输入3");
System.out.println("查询学生,请输入4");
System.out.println("返回上级菜单,请输入5");
choice = scanner.nextInt();
switch (choice) {
case 1:
// 添加学生代码
break;
case 2:
// 删除学生代码
break;
case 3:
// 修改学生代码
break;
case 4:
// 查询学生代码
break;
case 5:
// 返回上级菜单代码
break;
default:
System.out.println("输入有误,请重新输入!");
break;
}
}
}
}
```
阅读全文
相关推荐
![-](https://img-home.csdnimg.cn/images/20241231044901.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![doc](https://img-home.csdnimg.cn/images/20241231044833.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)