第二次数据库作业--model

package model;

import java.util.Date;

/**
 * Created by yinus
 * Date:2016/4/6
 * Time:18:44
 */

public class C2S {
    private int stu_id;
    private int cou_id;
    private double credit;
    private Date create_time;
    private Date update_time;
    public C2S() {
    }

    public C2S(int stu_id, int cou_id, double credit) {
        this.stu_id = stu_id;
        this.cou_id = cou_id;
        this.credit = credit;
        create_time=new Date();
        update_time=new Date();
    }

    public int getStu_id() {
        return stu_id;
    }

    public void setStu_id(int stu_id) {
        this.stu_id = stu_id;
    }

    public int getCou_id() {
        return cou_id;
    }

    public void setCou_id(int cou_id) {
        this.cou_id = cou_id;
    }

    public double getCredit() {
        return credit;
    }

    public void setCredit(double credit) {
        this.credit = credit;
    }

    public Date getCreate_time() {
        return create_time;
    }

    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }

    public Date getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(Date update_time) {
        this.update_time = update_time;
    }

    @Override
    public String toString() {
        return "studentId:"+this.getStu_id()+"  courseId:"+this.getCou_id()+" credit:"+this.getCredit();
    }
}
package model;

import java.util.Date;

/**
 * Created by yinus
 * Date:2016/4/6
 * Time:18:44
 */

public class Course {
    private int id;
    private String title;
    private Date createTime;
    private Date updateTime;

    public Course() {
    }

    public Course(int id, String title) {
        this.id = id;
        this.title = title;
        this.createTime = new Date();
        this.updateTime = new Date();
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "id:"+this.getId()+"  name:"+this.getTitle()+"  createTime:"+this.getCreateTime()+"  updateTime:"+this.getUpdateTime();
    }
}
package model;

import java.util.Date;

/**
 * Created by yinus
 * Date:2016/4/6
 * Time:18:44
 */

public class Student {

    private int id;

    private String name;

    private Date createTime;

    private Date updateTime;

    public Student() {}

    public Student(int id, String name) {
        this.id = id;
        this.name = name;
        this.createTime = new Date();
        this.updateTime = new Date();
    }

    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 Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "id:"+this.getId()+"  name:"+this.getName()+"  createTime:"+this.getCreateTime()+"  updateTime:"+this.getUpdateTime();
    }
}

 

posted on 2016-04-10 15:32 yinusxxxx 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/ycy1025/p/5374274.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值