用Java简单实现学生成绩管理系统

测试类:



import java.util.ArrayList;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        boolean m=true;
        ArrayList list=new ArrayList();
        while(m){
            //主页面:
            System.out.println("----------学生成绩管理系统-----------");
            System.out.println("------------1.展示------------------");
            System.out.println("------------2.录入------------------");
            System.out.println("------------3.查询------------------");
            System.out.println("------------4.删除------------------");
            System.out.println("------------5.退出------------------");
            //用户交互:
            System.out.println("请输入对应功能的数字:");
            Scanner sc=new Scanner(System.in);
            int choice=sc.nextInt();
            switch (choice){
                case 1:
                    System.out.println("------学生信息展示-------");
                    if (list.isEmpty()) {
                        System.out.println("没有任何学生信息");
                    }else {
                        for (int i=0;i

学生类:


public class Student {
    int sNo;
    String sName;
    int sChinese;
    int sMach;
    int sEnglish;
    int sJava;

    public int getsNo() {
        return sNo;
    }

    public void setsNo(int sNo) {
        this.sNo = sNo;
    }

    public String getsName() {
        return sName;
    }

    public void setsName(String sName) {
        this.sName = sName;
    }

    public int getsChinese() {
        return sChinese;
    }

    public void setsChinese(int sChinese) {
        this.sChinese = sChinese;
    }

    public int getsMach() {
        return sMach;
    }

    public void setsMach(int sMach) {
        this.sMach = sMach;
    }

    public int getsEnglish() {
        return sEnglish;
    }

    public void setsEnglish(int sEnglish) {
        this.sEnglish = sEnglish;
    }

    public int getsJava() {
        return sJava;
    }

    public void setsJava(int sJava) {
        this.sJava = sJava;
    }

    public Student(int sNo, String sName, int sChinese, int sMach, int sEnglish, int sJava) {
        this.sNo = sNo;
        this.sName = sName;
        this.sChinese = sChinese;
        this.sMach = sMach;
        this.sEnglish = sEnglish;
        this.sJava = sJava;
    }

    public Student() {
    }
}

你可能感兴趣的:(Java,java,开发语言)