IPP2 - /* * To change this template, choose Tools |...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package ipp2; import java.text.DecimalFormat; /** * * @author JANAYA */ public class IPP2 { /** * @param args the command line arguments */ public static void main(String[] args) { //Create products. Product one = new Product(1, "Tyler Perry's I Can Do All Bad By Myself", 125, 15.49); Product two = new Product(2, "Shottas", 700, 12.50); Product three = new Product(3, "Fast Five", 1200, 17.49); Product four = new Product(4, "No Strings Attached", 275, 40.99); Product five = new Product(5, "Wanted", 500, 10.00); /* * Add the products to the inventory */ Inventory inventory = new Inventory(); inventory.add(one); inventory.add(two); inventory.add(three); inventory.add(four); inventory.add(five); /* * Sort the products */ inventory.bubbleSort(); /* * The output should display the information one product at a time, * including the item number, the name of the product, the number of * units in stock, the price of each unit, and the value of the * inventory of that product. */ for (int i = 0; i < inventory.getCount(); i++) { Product product = inventory.get(i); System.out.println(product); } /* * In addition, the output should display the value of the entire
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

IPP2 - /* * To change this template, choose Tools |...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online