基于Java的高校教务系统(简略版)

该博客介绍了一个简略版的高校教务系统设计,利用Java SE作为后端基础,计划结合MySQL数据库和Spring Cloud进行功能扩展。文章涵盖父类、学生类和教师类的初步定义。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

需求:建立一个教务管理系统,为学生和教师提供不同的功能

//简单利用javase基础做出后端框架,后期再利用mysql数据库以及Spring cloud完善

父类:

public class people {

    private String name;
    private int age;
    private String sex;

    public people() {
    }
    public people(String name, int age, String sex) {
        this.name = name;
        this.age = age;
        this.sex = sex;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }
}

学生类:

public class student  extends people{


    private String classname;
    private String studyid;

    private String chengji="";

    private String kebiao="";

    private String jiguo="";


    private String studypassword;

    public student() {
    }

    public student(String name, int age, String sex, String classname, String studyid, String studypassword) {
        super(name, age, sex);
        this.classname = classname;
        this.studyid = studyid;
        this.studypassword = studypassword;
    }

    public String getClassname() {
        return classname;
    }

    public void setClassname(String classname) {
        this.classname = classname;
    }

    public String getStudyid() {
        return studyid;
    }

    public void setStudyid(String studyid) {
        this.studyid = studyid;
    }

    public String getStudypassword() {
        return studypassword;
    }

    public void setStudypassword(String studypass) {
        this.studypassword = studypassword;
    }

    public String getChengji() {
        return chengji;
    }

    public void setChengji(String chengji) {
        this.chengji = chengji;
    }


    public String getKebiao() {
        return kebiao;
    }

    public void setKebiao(String kebiao) {
        this.kebiao = kebiao;
    }

    public String getJiguo() {
        return jiguo;
    }

    public void setJiguo(String jiguo) {
        this.jiguo = jiguo;
    }
}

教师类:

public class teacher extends people{

    private String teachclass;
    private String teachid;

    private String teachpassword;
    

    public teacher() {
    }

    public teacher(String name, int age, String sex, String teachclass, String teachid, String teachpassword) {
        super(name, age, sex);
        this.teachclass = teachclass;
        this.teachid = teachid;
        this.teachpassword = teachpassword;
    }

    public String getTeachclass() {
        return teachclass;
    }

    public void setTeachclass(String teachclass) {
        this.teachclass = teachclass;
    }

    public String getTeachid() {
        return teachid;
    }

    public void setTeachid(String teachid) {
        this.teachid = teachid;
    }

    public String getTeachpassword() {
        return teachpassword;
    }

    public void setTeachpassword(String teachpassword) {
        this.teachpassword = teachpassword;
    }

   
}

源码:

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

public class test {

    public static void main(String[] args)
    {
        ArrayList<student> students = new ArrayList<>();
        ArrayList<teacher> teachers = new ArrayList<>();
            main(teachers,students);
            end();
    }

    public static void main(ArrayList<teacher>teachers,ArrayList<student>students)
    {
        Scanner sc = new Scanner(System.in);
        System.out.println("----------欢迎来到中彬教育后台管理系统-----------");
        while (true) {
            System.out.println("请输入您的身份:1.老师  2.学生 或者按0退出系统");
            int commend = sc.nextInt();
            switch (commend) {
                case 1:
                    teach(students,teachers,sc);
                    break;
                case 2:
                    student(students,sc);
                    break;
                case 0:
                    return;
                default:
                    System.out.println("输入不合法!请重新输入,或按0退出");
            }
        }
    }
    public static void teach(ArrayList<student>students,ArrayList<teacher>teachers,Scanner sc)
    {
        System.out.println("----------欢迎进入教师界面----------");
        while (true) {
            System.out.println("请选择您的操作:");
            System.out.println("1.教师登录");
            System.out.println("2.教师注册");
            System.out.println("3.返回");
            int commend = sc.nextInt();
            switch (commend) {
                case 1:
                    teacherdenglu(students,teachers,sc);
                    break;
                case 2:
                    teacherzhuce(teachers,sc);
                    break;
                case 3:
                    return;
                default:
                    System.out.println("不存在该功能!");
            }
        }
    }
    public static void student( ArrayList <student> students ,Scanner sc)
    {
        System.out.println("----------欢迎进入学生界面----------");
        while (true) {
            System.out.println("
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值