📄 productcontroller.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 + -