为了巩固MVC的开发模式,下面就写一个购物车的小案例..
①构建开发环境 导入需要用到的开发包 建立程序开发包 ②设计实体 书籍实体public class Book { private String id; private String name; private String author; private String description; private double price; public Book() { } public Book(String id, String name, String author, String description, double price) { this.id = id; this.name = name; this.author = author; this.description = description; this.price = price; } //...各种setter和getter }