小编The*_*ice的帖子

java中的学校数据库

我想知道是否有人有时间/耐心帮我解决这个问题.基本上我所要做的就是创建一个非常简单的学生数据库系统,它似乎并不适合我.这是我的主班,学生班和科目班.

科目类

import java.util.ArrayList;//ArrayList Import.
public class Subjects
{
    /*(Public Variables)*/
    public static String subjectName;
    public static String subjectTutor;
    public static ArrayList<Student> studentList = new ArrayList<Student>();
    public static ArrayList<Student> mathsList  = new ArrayList<Student>();
    public static ArrayList<Student> excelList = new ArrayList<Student>();
    public static ArrayList<Student> javaList = new ArrayList<Student>();
    public static ArrayList<Student>classList= new ArrayList<Student>();

    public Subjects(String sName)//If statement that will select the correct
    tutor for the class
    {
        subjectName = sName;

        if (subjectName == "maths")
        {
            subjectTutor= "Jennifer";
        }
        if …
Run Code Online (Sandbox Code Playgroud)

java

-4
推荐指数
1
解决办法
1674
查看次数

标签 统计

java ×1