📄 soldbasket.java
字号:
/////////////////////////////////////////////////////////////////////
// (C) Michael A Smith 1997-2007 University of Brighton //
// http://www.it.brighton.ac.uk/staff/mas //
/////////////////////////////////////////////////////////////////////
// Java 2 1.5 Application / Applet //
// Hence may not work with a JDK 1.0/1.1/1.2/1.3/1.4 System //
// Version automatically created Fri 07 Sep 2007 07:56:36 BST //
/////////////////////////////////////////////////////////////////////
package Catalogue;
import java.io.Serializable;
/**
* Holds a list of products that have been sold to a customer.
* An order number is also held to uniquely
* identify the customer's order.
* @author Michael Alexander Smith
* @version 2.2
*
*/
public class SoldBasket extends Basket implements Serializable
{
private static final long serialVersionUID = 1;
private int theOrderNo = 0; // Order number
/**
* A unique order number is supplied as a parameter to the
* constructor.
* See OrderManip.uniqueNumber()
*/
public SoldBasket( int aOrderNo )
{
theOrderNo = aOrderNo;
}
/**
* Returns a string containing a description of all the products
* ordered. Included is an order number.
* @return string description of products
*/
public String details()
{
return "Order number: " + theOrderNo + "\n" + "\n" +
super.details();
}
/**
* Returns the order number
* @return order number
*/
public int orderNo()
{
return theOrderNo;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -