productcontroller.java

来自「我做的ssd9 exercise6 的答案。分享」· Java 代码 · 共 34 行

JAVA
34
字号
/**
 * ProductController is used to get all product in the weborder database.
 * and it will return an arraylist which contents all the product in the database of weborder
 */ 


import java.util.*;

public class ProductController {
	/**
	 * Read all products in database.
	 * <p>
	 * Algorithm:
	 * <p>
	 * This method will get access to database (product tabel) and read all the products.
	 * For each record of the product. this method will creat a product object for it.
	 * And then add it to an arraylist.
	 * At last return the arraylist. So we get all the products in the database.
	 * 
	 * <p>
	 * Internal data structures:
	 * <p>
	 * An arraylist used to store the objects of products.
	 * 
	 * @return the arraylist object contains all the products object related to all the product record in the database.
	 */
	public ArrayList getProducts(){
		ArrayList products=new ArrayList();
		//body
		return products;
	}

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?