资源简介
自制的咖啡厅系统

代码片段和文件信息
import java.util.*;
import java.io.*;
/**
* Maintains the information of a product catalog. Contains a
* collection of {@link CatalogItem} objects.
*
* @author iCarnegie
* @version 1.0.0
* @see Product
*/
public class Catalog implements Iterable {
/* Collection of Product
objects.*/
private ArrayList products;
/**
* Constructs an empty catalog.
*/
public Catalog() {
this.products = new ArrayList();
}
/**
* Adds a {@link Product} object to this catalog.
*
* @param product the {@link Product} object.
*/
public void addProduct(Product product) {
this.products.add(product);
}
/**
* Returns an iterator over the products in this catalog.
*
* return an {@link Iterator} of {@link Product}
*/
public Iterator iterator() {
return this.products.iterator();
}
/**
* Returns the {@link Product} object with the specified
* code
.
*
* @param code the code of an product.
* @return The {@link Product} object with the specifed
* code. Returns null
if the object with
* the code is not found.
*/
public Product getProduct(String code) {
for (Product product : this.products) {
if (product.getCode().equals(code)) {
return product;
}
}
return null;
}
/**
* Returns the number of product in the catalog.
*
* @return the number of {@link Product} objects in this catalog.
*/
public int getNumberOfProducts() {
return this.products.size();
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 301 2011-09-10 12:25 111\.classpath
文件 379 2011-09-10 12:25 111\.project
文件 629 2011-09-10 12:25 111\.settings\org.eclipse.jdt.core.prefs
文件 1361 2011-10-13 17:20 111\bin\Catalog.class
文件 273 2011-10-13 17:20 111\bin\CatalogLoader.class
文件 1756 2011-10-13 17:20 111\bin\Coffee.class
文件 1349 2011-10-13 17:20 111\bin\CoffeeBrewer.class
文件 430 2011-10-13 17:20 111\bin\DataFormatException.class
文件 3103 2011-10-13 17:20 111\bin\FileCatalogLoader.class
文件 5340 2011-10-13 17:20 111\bin\GourmetCoffee.class
文件 2328 2011-10-13 17:20 111\bin\HTMLSalesFormatter.class
文件 1678 2011-10-13 17:20 111\bin\Order.class
文件 1227 2011-10-13 17:20 111\bin\OrderItem.class
文件 2159 2011-10-13 17:20 111\bin\PlainTextSalesFormatter.class
文件 1359 2011-10-13 17:20 111\bin\Product.class
文件 898 2011-10-13 17:20 111\bin\Sales.class
文件 161 2011-10-13 17:20 111\bin\SalesFormatter.class
文件 3735 2011-10-13 17:20 111\bin\TestCatalog.class
文件 2708 2011-10-13 17:20 111\bin\TestCoffee.class
文件 2425 2011-10-13 17:20 111\bin\TestCoffeeBrewer.class
文件 4902 2011-10-13 17:20 111\bin\TestFileCatalogLoader.class
文件 5705 2011-10-13 17:20 111\bin\TestOrder.class
文件 2569 2011-10-13 17:20 111\bin\TestOrderItem.class
文件 2818 2011-10-13 17:20 111\bin\TestProduct.class
文件 3331 2011-10-13 17:20 111\bin\TestSales.class
文件 2138 2011-10-13 17:20 111\bin\xm
文件 2135 2005-06-27 13:08 111\catalog.dat
文件 0 2005-06-27 13:08 111\empty.dat
文件 1864 2011-09-08 09:58 111\src\Catalog.java
文件 868 2005-08-23 10:28 111\src\CatalogLoader.java
............此处省略28个文件信息
- 上一篇:java拼图游戏(含源码)
- 下一篇:免费 android 应用 源代码——记事本
相关资源
- 微博系统(Java源码,servlet+jsp),适
- java串口通信全套完整代码-导入eclip
- jsonarray所必需的6个jar包.rar
- 三角网构TIN生成算法,Java语言实现
- java代码编写将excel数据导入到mysql数据
- Java写的cmm词法分析器源代码及javacc学
- JAVA JSP公司财务管理系统 源代码 论文
- JSP+MYSQL旅行社管理信息系统
- 推荐算法的JAVA实现
- 基于Java的酒店管理系统源码(毕业设
- java-图片识别 图片比较
- android毕业设计
- java23种设计模式+23个实例demo
- java Socket发送/接受报文
- JAVA828436
- java界面美化 提供多套皮肤直接使用
- 在线聊天系统(java代码)
- 基于Java的图书管理系统807185
- java中实现将页面数据导入Excel中
- java 企业销售管理系统
- java做的聊天系统(包括正规课程设计
- Java编写的qq聊天室
- 商店商品管理系统 JAVA写的 有界面
- JAVA开发聊天室程序
- 在linux系统下用java执行系统命令实例
- java期末考试试题两套(答案) 选择(
- JAVA3D编程示例(建模、交互)
- Java 文件加密传输
- java做的房产管理系统
- 基于jsp的bbs论坛 非常详细
评论
共有 条评论