Modify the Inventory Program by creating a subclass of the product class that uses one additional unique feature of the product you chose (for the DVDs subclass, you could use movie title, for example). In the subclass, create a method to calculate the value of the inventory of a product with the same name as the method previously created for the product class. The subclass method should also add a 5% restocking fee to the value of the inventory of that product.
Modify the output to display this additional feature you have chosen and the restocking fee.
Click the Assignment Files tab to submit your assignment.
I have been trying to figure this out all week can someone help me with this? The assignment is due today.
package cars;
// Robert Sigmon
// 10/12/2014 11:00 AM
public class CarsInventory {
public static void main( String[] args ) {
//instantiate cars object
Cars[] products = new Cars[3];
products[0] = new Cars(2479, "BMW M6", 45, 65000);
products[1] = new Cars(2480, "Nissan Leaf", 23, 35000);
products[2] = new Cars(2481, "Ford Focus", 17, 20000);
// get car information
System.out.println("RGS New and Used Car Inventory Program");
for (Cars product : products) {
System.out.printf("%s %d\n", "Product Number:", product.getProdNumber());
int model = 0;
System.out.printf( "%s %s\n", "Product Name:", product.getProdName() );
System.out.printf( "%s %d\n", "Total Units in Stock:", product.getUnitsTotal() );
System.out.printf( "%s $%.2f\n", "Price Per Unit:", product.getUnitPrice() );
System.out.printf( "%s $%.2f\n", "Inventory Value:", product.getValue() ); // printing of inventory value
}
} // end main method
} // end class CarsInventory
Any Idea where I would put the modification?