25.综合练习之车站业务分析
完成步骤:
需求: 以车站业务对车票做增删改查操作
1.建立数据库
2.建立车票表
3.建立java项目结构(model\dao\service\test)
4.创建model
5.创建dao(接口和实现)并实现测试
6.创建service(接口实现)
26.综合练习之数据库与表建立
27.项目标准结构创建
28\29\30\31.综合练习之代码实现
1.model
1 package com.day03.station.model; 2 3 /** 4 * 课程笔记:http://www.cnblogs.com/newAndHui/category/1153640.html 5 * 疑问咨询wx:851298348 6 */ 7 public class Ticket { 8 private Integer id; 9 private String startStation; 10 private String stopStation; 11 private String startTime; 12 private Integer ticketPrice; 13 14 public Integer getId() { 15 return id; 16 } 17 18 public void setId(Integer id) { 19 this.id = id; 20 } 21 22 public String getStartStation() { 23 return startStation; 24 } 25 26 public void setStartStation(String startStation) { 27 this.startStation = startStation; 28 } 29 30 public String getStopStation() { 31 return stopStation; 32 } 33 34 public void setStopStation(String stopStation) { 35 this.stopStation = stopStation; 36 } 37 38 public String getStartTime() { 39 return startTime; 40 } 41 42 public void setStartTime(String startTime) { 43 this.startTime = startTime; 44 } 45 46 public Integer getTicketPrice() { 47 return ticketPrice; 48 } 49 50 public void setTicketPrice(Integer ticketPrice) { 51 this.ticketPrice = ticketPrice; 52 } 53 }