All pastes #478208 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-05-09 01:08 UTC
rendered paste body
public 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;
   }