?? sales.java
字號:
import java.util.*;
/**
* The class Sales maintains a list of the orders.
*
* @author 張維
* @version 1.0.0
* @see Order
* @see Vector
*/
public class Sales {
/* A vector that contains references to <code>Order</code> objects. */
private Vector orders;
/**
* Creates the vector orders, which is initially empty.
*/
public Sales( ) {
orders = new Vector( );
}
/**
* Adds the specified order to the vector orders.
*
* @param order the <code>Order</code> object.
*/
public void addOrder(Order order) {
orders.add(order);
}
/**
* Returns an iterator over the instances in the vector orders.
*
* @return an <code>Iterator</code> object.
*/
public Iterator getOrdersIterator( ) {
return orders.iterator( );
}
/**
* Returns the number of instances in the vector orders.
*
* @return the number of <code>Order</code> objects in this orders.
*/
public int getNumberOfOrders( ) {
return orders.size( );
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -