Miscellany
public text v1 · immutablepublic class Order
{
// Complete this class according to the instructions in TMA02 Q2
// Instance variable and constant declarations should go here
private int currentSize;
private static int MAX_ORDERS = 10;
private Product[] products;
// The constructor should go here
public Order()
{
currentSize = 0;
Product[] products = new Product[MAX_ORDERS];
}
// The public methods should go here
public int getCurrentSize()
{
return products.length;
}