⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 productcontroller.java

📁 我做的ssd9 exercise6 的答案。分享
💻 JAVA
字号:
/**
 * 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -