展示出使用java编写一个简单的教务系统的代码
时间: 2023-03-02 20:08:13 浏览: 71
好的,以下是使用 Java 编写一个简单教务系统的代码示例:
```
import java.util.Scanner;
public class AcademicSystem {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("Welcome to the Academic System");
System.out.println("Please enter the student's name: ");
String studentName = input.nextLine();
System.out.println("Please enter the student's ID: ");
String studentId = input.nextLine();
System.out.println("Please enter the student's score: ");
double score = input.nextDouble();
System.out.println("Student Name: " + studentName);
System.out.println("Student ID: " + studentId);
System.out.println("Score: " + score);
System.out.println("Grade: " + (score >= 60 ? "Pass" : "Fail"));
}
}
```
这是一个简单的教务系统代码,它接收学生的姓名、学号和成绩,并输出学生的姓名、学号、成绩和成绩等级。