InventoryProgramPart1

InventoryProgramPart1 - /* * To change this template,...

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 inventory.program.part.pkg1; /** * * @author JANAYA */ public class InventoryProgramPart1 { /** * @param args the command line arguments */ public static void main(String[] args) { // make a couple products DVD p1 = new DVD(1,"Tyler Perry's I Can Do Bad All By Myself",3,15.49); DVD p2 = new DVD(2,"Shottas",7,17.29); // output the products System.out.println(p1); System.out.println(); System.out.println(p2); } } class DVD { int dvdNumber; String dvdName; int quantity; double price; /* *Public constructor InventoryProgramPart1 *This constructor takes the dvdNumber as string, the dvdName as string, a quantity as integer, and a price as a double and sets the base values of the items(s) in inventory */ public DVD(int number, String name, int quantity, double MSRP) { dvdNumber = number; dvdName = name; this.quantity = quantity; price = MSRP; } // getdvdNumber: returns the identifier for the item
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.

This note was uploaded on 08/14/2011 for the course IT 215 taught by Professor Danielreddy during the Spring '11 term at University of Phoenix.

Page1 / 2

InventoryProgramPart1 - /* * To change this template,...

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