- 4
- 0
- 约5.63千字
- 约 6页
- 2019-08-10 发布于江苏
- 举报
首先实现MVC模式中的“模型”,用于封装数据,代码如下:
package program;
public class Article {
String title;
String author;
String content;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String toString(){
return title++author++content;
}
}
然后实现“控制”,代码如下:
package program;
import java
原创力文档

文档评论(0)