/* This class, when implemented, will describe a product which consists of vehicles or
 * accessories. It will contain both vehicles and accessories in one array list making
 * the order class a lot more easy to follow! */

import java.util.ArrayList;

public class Product { 	

	private ArrayList<Product> products;
	int totalPrice; 

	public Product() {
		this.products = new ArrayList<Product>();
	}

	public ArrayList<Product> getProducts() {
		return products;
	}

	public void setProducts(ArrayList<Product> products) {
		this.products = products;
	}

	/* Methods for adding and removing things to the products.. */
	
	public void addVehicleProduct(Vehicle vehicle) {
		products.add(vehicle); // Add the vehicle to the list...
		totalPrice = totalPrice + vehicle.getPrice(); // ... and calculate its total price.
	}
	
	public void removeVehicleProduct(Vehicle vehicle) {
		products.remove(vehicle);
	}

	public void addAccessoryProduct(Accessory accessory) {
		products.add(accessory); // Add the accessory to the list...
		totalPrice = totalPrice + accessory.getPrice(); // ... and calculates its total price.
	}

	public void removeAccessoryProduct(Accessory accessory) {
		products.remove(accessory);
	}
	
	public int getTotalPrice() {
		return totalPrice;
	}	
}

@@ -253,16 +253,25 @@
 %0Apublic 
+abstract 
 class Pr
@@ -281,336 +281,223 @@
 ct %7B
- %09%0A%0A%09private ArrayList%3CProduct%3E products;%0A%09int totalPrice; %0A%0A%09public Product() %7B%0A%09%09this.products = new ArrayList%3CProduct%3E();%0A%09%7D%0A%0A%09public ArrayList%3CProduct%3E getProducts() %7B%0A%09%09return products;%0A%09%7D%0A%0A%09public void setProducts(ArrayList%3CProduct%3E products) %7B%0A%09%09this.products = products;%0A%09%7D%0A%0A%09/* Methods for adding and removing things to
+%0A%09%0A%09String productName; // Product name for vehicle is the model, for accessory it is explainatory...%0A%09String infoTxt; // Informational text about the product, some kind of description...%0A%09int price; // The price of
  the
@@ -508,14 +508,11 @@
 duct
-s
 ..
- */
+.
 %0A%09%0A%09
@@ -522,199 +522,150 @@
 lic 
-void addVehicleProduct(Vehicle veh
+Product(String productName, String infoTxt, int pr
 ic
-l
 e) %7B%0A%09%09
+this.
 product
-s.add(vehicle); // Add the vehicle to the list...%0A%09%09totalPrice = totalPrice + vehicle.getPrice(); // ... and calculate its total
+Name = productName;%0A%09%09this.infoTxt = infoTxt;%0A%09%09this.price =
  price
-.
+;
 %0A%09%7D%0A
-%09
 %0A%09pu
@@ -673,390 +673,271 @@
 lic 
-void removeVehicleProduct(Vehicle vehicle) %7B%0A%09%09products.remove(vehicle);%0A%09%7D%0A%0A%09public void addAccessoryProduct(Accessory accessory
+String getProductName() %7B%0A%09%09return productName;%0A%09%7D%0A%0A%09public void setProductName(String productName
 ) %7B%0A%09%09
+this.
 product
-s.add(accessory); // Add the accessory to the list...%0A%09%09totalPrice = totalPrice + accessory.getPrice(); // ... and calculates its total price.%0A%09%7D%0A%0A%09public void removeAccessoryProduct(Accessory accessory) %7B%0A%09%09products.remove(accessory)
+Name = productName;%0A%09%7D%0A%0A%09public String getInfoTxt() %7B%0A%09%09return infoTxt;%0A%09%7D%0A%0A%09public void setInfoTxt(String infoTxt) %7B%0A%09%09this.infoTxt = infoTxt
 ;%0A%09%7D%0A
-%09
 %0A%09pu
@@ -952,13 +952,8 @@
  get
-Total
 Pric
@@ -971,22 +971,78 @@
 urn 
-totalP
+price;%0A%09%7D%0A%0A%09public void setPrice(int price) %7B%0A%09%09this.price = p
 rice;%0A%09%7D
 %09%0A%7D%0A
@@ -1037,12 +1037,11 @@
 rice;%0A%09%7D
-%09
 %0A%7D%0A

Update Product.java