soldbasket.java
来自「这是一个买卖系统,一个模拟的系统,根据下订单,看订单,买,等功能」· Java 代码 · 共 61 行
JAVA
61 行
/////////////////////////////////////////////////////////////////////
// (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 + =
减小字号Ctrl + -
显示快捷键?