1.首先,老师喊我用脑图写了一个学生信息管理系统的功能结构图如下:
【注意:
1.把脑图里的字要竖着放用:shift+enter
】
2.在MySQL中创建数据库及表
导入了数据库脚本(泸职院的信息)
3.创建学生管理系统
@1:在项目里创建文件夹help、images、lib
@2:在lib里添加连接MySQL数据库的jar包(老师给我们包,直接复制进来)
然后作为库添加到项目里(Add as Library…)
@3:在images里添加图片
@4:在help里添加帮助文档(老师给我们的在群里)
@5:实体类
1)学校实体College
package net.zzm.student.bean;
import java.util.Date;
/**
*功能:college实体类
- 作者:张正敏
- 日期:2019年6月17日
*/
public class College {
/**
* 学校标识符
/
private int id;
/*
* 学校名称
/
private String name;
/*
* 校长
/
private String president;
/*
* 建校时间
/
private Date startTime;
/*
* 联系电话
/
private String telephone;
/*
* 电子邮箱
/
private String email;
/*
* 通信地址
/
private String address;
/*
* 学校简介
*/
private String profile;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPresident() {
return president;
}
public void setPresident(String president) {
this.president = president;
}
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getProfile() {
return profile;
}
public void setProfile(String profile) {
this.profile = profile;
}
@Override
public String toString() {
return "College{" +
"id=" + id +
", name='" + name + '\'' +
", president='" + president + '\'' +
", startTime=" + startTime +
", telephone='" + telephone + '\'' +
", email='" + email + '\'' +
", address='" + address + '\'' +
", profile='" + profile + '\'' +
'}';
}
}
2)状态实体Status
package net.zzm.student.bean;
/**
- 功能:Status实体类
- 作者:张正敏
- 日期:2019年6月17日
*/
public class Status {
/**
* 标识符
/
private int id;
/*
* 校名
/
private String college;
/*
* 版本
/
private String version;
/*
* 作者
/
private String author;
/*
* 联系电话
/
private String telephone;
/*
* 通信地址
/
private String address;
/*
* 电子邮箱
*/
private String email;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getCollege() {
return college;
}
public void setCollege(String college) {
this.college = college;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
@Override
public String toString() {
return "Status{" +
"id=" + id +
", college='" + college + '\'' +
", version='" + version + '\'' +
", author='" + author + '\'' +
", telephone='" + telephone + '\'' +
", address='" + address + '\'' +
", email='" + email + '\'' +
'}';
}
}
3)学生实体Student
package net.zzm.student.bean;
/**
-
功能:Student实体类
-
作者:张正敏
-
日期:2019年6月17日
/
public class Student {
private String id;
/*- 姓名
/
private String name;
/* - 性别
/
private String sex;
/* - 年龄
/
private int age;
/* - 系部
/
private String department;
/* - 班级
/
private String clazz;
/* - 联系电话
*/
private String telephone;
public String getId() {
return id;
}public void setId(String id) {
this.id = id;
}public String getName() {
return name;
}public void setName(String name) {
this.name = name;
}public String getSex() {
return sex;
}public void setSex(String sex) {
this.sex = sex;
}public int getAge() {
return age;
}public void setAge(int age) {
this.age = age;
}public String getDepartment() {
return department;
}public void setDepartment(String department) {
this.department = department;
}public String getClazz() {
return clazz;
}public void setClazz(String clazz) {
this.clazz = clazz;
}public String getTelephone() {
return telephone;
}public void setTelephone(String telephone) {
this.telephone = telephone;
}
@Override
public String toString() {
return “Student{” +
“id=’” + id + ‘’’ +
“, name=’” + name + ‘’’ +
“, sex=’” + sex + ‘’’ +
“, age=” + age +
“, department=’” + department + ‘’’ +
“, clazz=’” + clazz + ‘’’ +
“, telephone=’” + telephone + ‘’’ +
‘}’;
} - 姓名
}
4)用户实体User
package net.zzm.student.bean;
/**
- 功能:User实体类
- 作者:张正敏
- 日期:2019年6月17日
*/
import java.util.Date;
public class User {
/**
* 用户标识符
/
private int id;
/*
* 用户名
/
private String username;
/*
* 密码
/
private String password;
/*
* 联系电话
/
private String telephone;
/*
* 注册时间
*/
private Date registerTime;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String