java实训日志第二天

java实训第二天,我们开始写代码,及如下
1.实体类
(1)学校实体college

package net.cl.student.bean;
/**

  • 功能:College实体类
  • 作者:
  • 日期:2019年6月18日
    */

import java.util.Date;

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.cl.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.cl.student.bean;

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 int getAge(int i) {
    return age;
}

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

public String getClazz(String s) {
    return clazz;
}

public void setClazz(String clazz) {
    this.clazz = clazz;
}
public String getSex() {
    return sex;
}

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



public String getDepartment() {
    return department;
}

public void setDepartment(String department) {
    this.department = department;
}


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 + '\'' +
            '}';
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值