10 Replies - 1623 Views - Last Post: 26 April 2011 - 02:05 PM Rate Topic: -----

#1 Raven9  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 25-April 11

Not sure how to go about Modifying Inventory Program to include GUI.

Posted 25 April 2011 - 02:41 PM

I do not want anyone to do the assignment for me I just would like some assitance, guidance so that I can at the least pass this particular class, understand how it works. So that I can get my degree in 2 weeks.I am totally lost, confused with all of this.

These are the instructions for this particular portion of this program I am suppose to follow, already 1 day late in submitting it to my instructor.
Modify the Inventory Program to use a GUI. The GUI should display all of the items in the inventory and include 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. In addition, the GUI should display the value of the entire inventory, the additional attribute, and the restocking fee. All dollar values should be displayed as currency (i.e. $D,DDD.CC). There should not be any output in the DOS console.



//W6 CheckPoint: InventoryPart3.java
//Inventory Program Part 3 Week 6 class Television modified with additional class and restocking fee

//

import statements
import java.text.NumberFormat;
import java.util.Locale;
import java.util.Arrays;


  class Television { //class name and attributes

    //declare class variables
 	private String itemNumber; //item # of product
 	private String televisionName; //product name
 	public int unitsinStock; //# of units in stock
 	public double unitPrice; //Price per unit
  	NumberFormat nf = NumberFormat.getCurrencyInstance(Locale.US);

 	//class constructor

 	public Television(String itemNumber, String televisionName, int unitsinStock, double price) {
 		this.itemNumber = itemNumber;
 		this.televisionName = televisionName;
 		this.unitsinStock = unitsinStock;
 		this.unitPrice = price;

 } //end constructor

  //define set and get methods for class variables

 //getter and setter methods for Television

 //item number
    public String getItemNumber() { //getter for item number
 		return itemNumber;
 	} //end getter item number

  	public void setItemNumber (String itemNumber) { //setter for item number
 		this.itemNumber = itemNumber;
 	} //end setter item number

 	//television name
    public String getTelevisionName() { //getter for product name
	 		return televisionName;
 	} //end getter television name

 	public void setTelevisionName (String product) { //setter for product name
 		this.televisionName = televisionName;
 	} //end setter television name

     //available units
    public double getUnitsInStock() { //getter for units in stock
	  		return unitsinStock;
	} //end getter units in stock

 	public void setUnitsInStock (double units) { //setter for units in stock
 		this.unitsinStock = unitsinStock;
 	} //end setter units in stock

 	 //price
    public double getUnitPrice() { //getter for unit price
	 		return unitPrice;
 	} //end getter for unit price

 	public void setUnitPrice (double price) { //setter for unit price
 		this.unitPrice = unitPrice;
 	} //end setter unit price


     //calculate the total inventory by returning the product of available units and price
	public double calculateInventory(){
		return unitPrice * unitsinStock;
	}

    //toString method that outputs the class variables
	public String toString () {
			return "Television Name:" + "\t" + televisionName + "\n" +
				   "Item Number:" + "\t" + itemNumber + "\n" +
			       "UnitsInStock:" + "\t \t" + unitsinStock + "\n" +
			       "UnitPrice:" + "\t \t" + nf.format(unitPrice) + "\n" +
			       "Item Total:" + "\t" + nf.format(calculateInventory());
			       }

}

// The is-a test the inheritance relationship between Samsung and Television

class Televisions extends Television{

	//class variables
	private String serialNumber;
	private double restockFee;
	private static final double RESTOCK_FEE_PERCENTAGE = .05;

	//class constructor
	public Televisions(String itemNumber, String televisionName, int unitsinStock, double price, String serialNumber){
		super (itemNumber, televisionName, unitsinStock, price);
		this.serialNumber = serialNumber;

		//calculate restock fee as 5% of the inventory total
		restockFee = super.calculateInventory() * RESTOCK_FEE_PERCENTAGE;
	}

	//declare get and set methods
	//serial number
	public String getSerialNumber(){
		return serialNumber;
	}

	public void setSerialNumber(String serialNumber){
		this.serialNumber = serialNumber;
	}

	//restockFee does not have a set method, to ensure that it is only set through the HP constructor
	public double getRestockFee(){
		return restockFee;
	}

	//add restock fee and serial number to the output
	public String toString () {
				return super.toString() + "\n" +
				       "Serial Number: " + "\t" + serialNumber + "\n" +
				       "Restock Fee:" + "\t" + nf.format(getRestockFee());
			       }

}




public class InventoryPart3 {

    public static Television[] sortArray(Television[] televisions){
        // First Step
        String[] names = new String[televisions.length];

       //Second Step
       Television[] tempProduct = new Television [televisions.length];

      //Third Step

      for (int i = 0; i < televisions.length; i++){
	  		 names[i] = televisions[i].getTelevisionName();
		}

      //Fourth Step
      Arrays.sort(names);

     //Fifth Step
    	for (int i = 0; i < televisions.length; i++){ //Product Array
			     for (int j = 0; j < names.length; j++){ //Names Array
			          if (televisions[i].getTelevisionName().equalsIgnoreCase(names[j])) {
			                     tempProduct[j] = televisions[i];
			                     break;
			          }

			     }
			}

			return tempProduct;

	}

 	public static double calculateInventoryTotal(Television[] televisions){
		double total = 0;

		for (int i = 0; i < televisions.length; i++){
			total += televisions[i].calculateInventory();
		}

		return total;
	}




    public static void main (String[] args) {

        NumberFormat nf = NumberFormat.getCurrencyInstance(Locale.US);

       //create several items for the inventory of type Television and LG
       Television[] televisions = new Television[5];

       Television samsung = new Television ("003", "Samsung UN46D6400",9,1599.99);
       Television vizio = new Television ("005", "Vizio XVT553SV",6,1299.00);
       Television panasonic = new Television ("002", "Panasonic Viera TC-P50VT25",2,2079.99);
       Television sony = new Television ("004", "Sony Bravia KDL-55EX720",8, 1889.99);
       Television lg = new Television ("001", "LG Infinia 47LX9500",2,2099.00);

//add all of the items to the inventory
		televisions[2] = samsung;
		televisions[4] = vizio;
		televisions[1] = panasonic;
		televisions[3] = sony;
		televisions[0] = lg;

        //sort items
		televisions = sortArray(televisions);

		//calculate inventory total
		double inventoryTotal = calculateInventoryTotal(televisions);

		//output inventory
		System.out.println("Inventory Items: " + "\n");
		for (int i = 0; i < televisions.length; i++){
			System.out.println(televisions[i]);
			System.out.println();
		}

		//output inventory total
		System.out.println("Inventory Total: " + nf.format(inventoryTotal));
	}
}



Is This A Good Question/Topic? 0
  • +

Replies To: Not sure how to go about Modifying Inventory Program to include GUI.

#2 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon

Reputation: 2965
  • View blog
  • Posts: 11,222
  • Joined: 15-July 08

Re: Not sure how to go about Modifying Inventory Program to include GUI.

Posted 25 April 2011 - 02:53 PM

Ok. So you're getting your degree in two weeks and don't know how to write a GUI? That's most certainly a problem.

Well, you will need to read up on how to make GUIs. Here are some good tutorials by jinnyishere:
http://www.dreaminco...osmember=245988

You will also need to look through the Swing API:
http://doc.java.sun....api/javax.swing

And the Java tutorials:
http://download.orac...l/ui/index.html
http://download.orac...wing/index.html

You already have a main method. Instead of using it to run a command-line based application, use Object Oriented programming to display the information that way.
Was This Post Helpful? 1
  • +
  • -

#3 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 5186
  • View blog
  • Posts: 13,914
  • Joined: 18-April 07

Re: Not sure how to go about Modifying Inventory Program to include GUI.

Posted 25 April 2011 - 02:54 PM

This is the part of the project where you are going to create a GUI or (graphical user interface) just like you are probably use to with most windows programs. A program where you have controls on it like buttons, tables, text boxes, combo boxes etc.

You start by first importing the java.awt.* namespace or the javax.swing.* namespace.

These namespaces include various classes that are for building a GUI interface such as Frame, JFrame, JButton, JTextField, JTable etc.

The first control you should focus on is knowing how to create a JFrame. This is the actual GUI window on which all the other controls are placed. You can learn about using the Swing namespace at the following URL...

Trail: Creating a GUI with JFC/Swing

That can get you started. :)
Was This Post Helpful? 1
  • +
  • -

#4 Raven9  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 25-April 11

Re: Not sure how to go about Modifying Inventory Program to include GUI.

Posted 25 April 2011 - 03:07 PM

View PostDogstopper, on 25 April 2011 - 02:53 PM, said:

Ok. So you're getting your degree in two weeks and don't know how to write a GUI? That's most certainly a problem.

Well, you will need to read up on how to make GUIs. Here are some good tutorials by jinnyishere:
http://www.dreaminco...osmember=245988

You will also need to look through the Swing API:
http://doc.java.sun....api/javax.swing

And the Java tutorials:
http://download.orac...l/ui/index.html
http://download.orac...wing/index.html

You already have a main method. Instead of using it to run a command-line based application, use Object Oriented programming to display the information that way.


Thank you for these resources this at least give me some better direction than my course material. I appreciate your assitance. Hopefully I will only post again if I need any further help.

View PostMartyr2, on 25 April 2011 - 02:54 PM, said:

This is the part of the project where you are going to create a GUI or (graphical user interface) just like you are probably use to with most windows programs. A program where you have controls on it like buttons, tables, text boxes, combo boxes etc.

You start by first importing the java.awt.* namespace or the javax.swing.* namespace.

These namespaces include various classes that are for building a GUI interface such as Frame, JFrame, JButton, JTextField, JTable etc.

The first control you should focus on is knowing how to create a JFrame. This is the actual GUI window on which all the other controls are placed. You can learn about using the Swing namespace at the following URL...

Trail: Creating a GUI with JFC/Swing

That can get you started. :)


Thank you for your guidance I think this will give me a good start, hopefully I can figure this out. I have been totally lost, confused this is all new to me. I appreciate the help.
Was This Post Helpful? 0
  • +
  • -

#5 darek9576  Icon User is offline

  • D.I.C Lover

Reputation: 203
  • View blog
  • Posts: 1,731
  • Joined: 13-March 10

Re: Not sure how to go about Modifying Inventory Program to include GUI.

Posted 25 April 2011 - 03:12 PM

What degree you getting in 2 weeks?
Was This Post Helpful? 0
  • +
  • -

#6 Raven9  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 25-April 11

Re: Not sure how to go about Modifying Inventory Program to include GUI.

Posted 25 April 2011 - 03:25 PM

View Postdarek9576, on 25 April 2011 - 03:12 PM, said:

What degree you getting in 2 weeks?



My degree is AAIT/WD.
Was This Post Helpful? 0
  • +
  • -

#7 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon

Reputation: 2298
  • View blog
  • Posts: 9,535
  • Joined: 29-May 08

Re: Not sure how to go about Modifying Inventory Program to include GUI.

Posted 25 April 2011 - 03:54 PM

What's that in English?

This post has been edited by AdamSpeight2008: 25 April 2011 - 03:59 PM

Was This Post Helpful? 0
  • +
  • -

#8 Raven9  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 25-April 11

Re: Not sure how to go about Modifying Inventory Program to include GUI.

Posted 25 April 2011 - 04:40 PM

View PostAdamSpeight2008, on 25 April 2011 - 03:54 PM, said:

What's that in English?



Lol no Associates in IT with a emphasis in Web Design.
Was This Post Helpful? 0
  • +
  • -

#9 Raven9  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 25-April 11

Re: Not sure how to go about Modifying Inventory Program to include GUI.

Posted 25 April 2011 - 06:26 PM

I went back and tried to modify my code that I previouslly posted to add GUI, not sure if I did this correctly. I recieved 1 error message as follows:

C:\Documents and Settings\AdminUser\My Documents\InventoryPart4.java:40: invalid method declaration; return type required
public Television(String itemNumber, String televisionName, int unitsinStock, double unitPrice) {
^
1 error

Tool completed with exit code 1

If someone could look at my code, tell me if I have done the modification correctly per the instructions I was suppose to follow, how to fix the error it would be greatly appreciated.

// Week 7 Inventory Program Part 4
//Inventory Program that stores data in Television class
// Uses GUI to return data
// With added subclass Size





   import java.awt.FlowLayout;
   import java.awt.event.ActionListener;
   import java.awt.event.ActionEvent;
   import javax.swing.JFrame;
   import javax.swing.JTextField;
   import javax.swing.JPasswordField;
   import javax.swing.JOptionPane;
   import javax.swing.JLabel;


   @SuppressWarnings("serial")




    public class Televisions extends JFrame { //class name and attributes

	    //declare class variables
	    private String itemNumber; //item # of product
	    private String televisionName; //product name
	    public int unitsinStock; //# of units in stock
	    public double unitPrice; //Price per unit

  	       NumberFormat nf = NumberFormat.getCurrencyInstance(Locale.US);

       //class constructor

      public Television(String itemNumber, String televisionName, int unitsinStock, double unitPrice) {
	   	  this.itemNumber = itemNumber;
	   	  this.televisionName = televisionName;
	      this.unitsinStock = unitsinStock;
 		  this.unitPrice = unitPrice;

   }   //end constructor

       //define set and get methods for class variables
       //getter and setter methods for Television

       //item number
    public String getItemNumber() { //getter for item number
 		return itemNumber;
 	} //end getter item number

  	public void setItemNumber (String itemNumber) { //setter for item number
 		this.itemNumber = itemNumber;
 	} //end setter item number

 	//television name
    public String getTelevisionName() { //getter for product name
	 		return televisionName;
 	} //end getter television name

 	public void setTelevisionName (String product) { //setter for product name
 		this.televisionName = televisionName;
 	} //end setter television name

     //available units
    public double getUnitsInStock() { //getter for units in stock
	  		return unitsinStock;
	} //end getter units in stock

 	public void setUnitsInStock (double units) { //setter for units in stock
 		this.unitsinStock = unitsinStock;
 	} //end setter units in stock

 	 //price
    public double getUnitPrice() { //getter for unit price
	 		return unitPrice;
 	} //end getter for unit price

 	public void setUnitPrice (double price) { //setter for unit price
 		this.unitPrice = unitPrice;
 	} //end setter unit price


     //calculate the total inventory by returning the product of available units and price
	public double calculateInventory(){
		return unitPrice * unitsinStock;
	}

    //toString method that outputs the class variables
	public String toString () {
			return "Television Name:" + "\t" + televisionName + "\n" +
				   "Item Number:" + "\t" + itemNumber + "\n" +
			       "UnitsInStock:" + "\t \t" + unitsinStock + "\n" +
			       "UnitPrice:" + "\t \t" + nf.format(unitPrice) + "\n" +
			       "Item Total:" + "\t" + nf.format(calculateInventory());
			       }

}

// The is-a test the inheritance relationship between Samsung and Television

    public class Televisions extends Television{

	//class variables
	private String serialNumber;
	private double restockFee;
	private static final double RESTOCK_FEE_PERCENTAGE = .05;

	//class constructor
	public Televisions(String itemNumber, String televisionName, int unitsinStock, double price, String serialNumber){
		super (itemNumber, televisionName, unitsinStock, price);
		this.serialNumber = serialNumber;

		//calculate restock fee as 5% of the inventory total
		restockFee = super.calculateInventory() * RESTOCK_FEE_PERCENTAGE;
	}

	//declare get and set methods
	//serial number
	public String getSerialNumber(){
		return serialNumber;
	}

	public void setSerialNumber(String serialNumber){
		this.serialNumber = serialNumber;
	}

	//restockFee does not have a set method, to ensure that it is only set through the HP constructor
	public double getRestockFee(){
		return restockFee;
	}

	//add restock fee and serial number to the output
	public String toString () {
				return super.toString() + "\n" +
				       "Serial Number: " + "\t" + serialNumber + "\n" +
				       "Restock Fee:" + "\t" + nf.format(getRestockFee());
			       }

}

//begin main program


    public class InventoryPart4 extends JFrame {

 	    private Inventory i;
 	    private JTextArea txt;
 	    private int view = 0;

 	public static void main(String[] args) {

 		InventoryProgram4 gui = new InventoryProgram4();
 		gui.pack();
 		gui.setVisible(true);
	}
	// Declares the TextFields used to display the value of each attribute of
	// the current product.
	private JTextField itemNumberTF;
	private JTextField televisionNameTF;
	private JTextField unitsinStockTF;
	private JTextField priceTF;
	private JTextField supplierNameTF;
	private JTextField restockFeeTF;
	private JTextField valueofInventoryTF;

	// Declares a TextField to display the value of the entire inventory
	private JTextField totalValueOfInventoryTF;

	// Declare buttons to navigate through the televisions in the inventory
	private JButton priorBT;
	private JButton nextBT;

	// This array holds all televisions in the inventory.
	private Supplier[] televisions;

	// Indicates the index of the televisions displayed onto the screen.
	private int current = 0;

	/**
	 * Starts the application
	 *
	 * @param args
	 *            Not used by this application
	 */
	public static void main(String[] args) {
		// Creates and displays the GUI
		new InventoryPart4();
	}

	/**
	 * Creates a new instance of the GUI and displays the frame.
	 */
/**
 * This class should inherit from the Product class. Recall that the extends
 * keyword is used in java to represent inheritance
 */
   public class Supplier extends Television{
	/** Supplier Name */
	  private String supplierName;

	/**
	 * Constructor should have 5 parameters:
	 *
	 * - Item Number
	 *
	 * - Television Name
	 *
	 * - Number of Units in Stock
	 *
	 * - Price of each Unit
	 *
	 * - Supplier Name
	 */
	public Supplier(int itemNumber, String televisionName, int unitsinStock,
			double price, String supplierName) {
		/*
		 * Note you will use the super keyword to invoke the constructor in your
		 * Product class.
		 */
		super(itemNumber, televisionName, unitsinStock, price);
		this.supplierName = supplierName;
	}

	/**
	 * This method returns the product of price and available units multiplied
	 * by 5% ((price * product) * .05);
	 */
	public double calculateRestockFee() {
		return super.calculateInventory() * .05;
	}

	/**
	 * This method returns the television price and  units in stock plus the
	 * restock fee.
	 */
	public double calculateInventory() {
		return super.calculateInventory() + calculateRestockFee();
	}

	/**
	 * @return the supplierName
	 */
	public String getSupplierName() {
		return supplierName;
	}

	/**
	 * @param supplierName
	 *            the supplierName to set
	 */
	public void setSupplierName(String supplierName) {
		this.supplierName = supplierName;
	}

}

	public InventoryPart4() {
		super("Inventory Part 4");
		setSize(500, 300);
		setLocationRelativeTo(null);
		setDefaultCloseOperation(EXIT_ON_CLOSE);

		// Creates the array with 5 elements
		televisions = new Supplier[5];

		// Creates some televisions
		televisions[0] = new Supplier(03, " Samsung UN46D6400",9,1599.99);
		televisions[1] = new Supplier(05, " Vizio XVT553SV",6,1299.00);
		televisions[2] = new Supplier(02, " Panasonic Viera TC-P50VT25",2,2079.99);
		televisions[3] = new Supplier(04, " Sony Bravia KDL-55EX720",8, 1889.99);
		televisions[4] = new Supplier(01, " LG Infinia 47LX9500",2,2099.00);

		// Sorts televisions by name
		sortArray();

		// Creates the visual components
		createComponents();

		// Shows the GUI
		setVisible(true);

		// Displays the first television
		updateFields();
	}

	private void createComponents() {
		JPanel p = new JPanel();
		p.setLayout(new BorderLayout());
		p.setBorder(BorderFactory.createEmptyBorder(5,5, 5, 5, 5));

		p.add(createFieldsPanel(), BorderLayout.CENTER);
		p.add(createButtonsPanel(), BorderLayout.SOUTH);

		setContentPane(p);
	}

	private JPanel createButtonsPanel() {
		JPanel p = new JPanel();
		p.setLayout(new FlowLayout(FlowLayout.RIGHT));

		priorBT = new JButton("Prior");
		priorBT.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if (current > 0) {
					current--;
					updateFields();
				}
			}
		});
		p.add(priorBT);

		nextBT = new JButton("Next");
		nextBT.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if (current < televisions.length - 1) {
					current++;
					updateFields();
				}
			}
		});
		p.add(nextBT);

		return p;
	}

	/**
	 * Updates the fields to reflect the current television.
	 */
	protected void updateFields() {
		Suppliers = televisions[current];

		itemNumberTF.setText(String.valueOf(s.getItemNumber()));
		televisionNameTF.setText(s.getTelevisionName());
		unitsinStockTF.setText(String.valueOf(s.getUnitsInStock()));
		priceTF.setText(currency.format(s.getPrice()));
		supplierNameTF.setText(s.getSupplierName());
		restockFeeTF.setText(currency.format(s.calculateRestockFee()));
		valueofInventoryTF.setText(currency.format(s.calculateInventory()));

		totalValueOfInventoryTF.setText(currency.format(calculateInventory()));
	}

	private JPanel createFieldsPanel() {
		JPanel p = new JPanel();
		p.setLayout(new GridLayout(0, 2, 5, 5));

		p.add(new JLabel("Item Number"));
		itemNumberTF = new JTextField();
		p.add(itemNumberTF);

		p.add(new JLabel("Television Name"));
		televisionNameTF = new JTextField();
		p.add(televisionNameTF);

		p.add(new JLabel("Units In Stock"));
		unitsinStockTF = new JTextField();
		p.add(unitsinStockTF);

		p.add(new JLabel("Unit Price"));
		priceTF = new JTextField();
		p.add(priceTF);

		p.add(new JLabel("Supplier Name"));
		supplierNameTF = new JTextField();
		p.add(supplierNameTF);

		p.add(new JLabel("Restock Fee"));
		restockFeeTF = new JTextField();
		p.add(restockFeeTF);

		p.add(new JLabel("Value Of Inventory"));
		valueofInventoryTF = new JTextField();
		p.add(valueofInventoryTF);

		p.add(new JLabel(""));
		p.add(new JLabel(""));

		p.add(new JLabel("Total Value Of The Inventory"));
		totalValueOfInventoryTF = new JTextField();
		p.add(totalValueOfInventoryTF);

		return p;
	}

	/**
	 * A method to calculate the value of the total inventory. This method
	 * should take in an array of type Television and should
	 * traverse through all the elements of the array and calculate the
	 * inventory.
	 *
	 * @return The value of the entire inventory.
	 */
	public double calculateInventory() {
		double value = 0;
		for (int i = 0; i < televisions.length; i++) {
			value += televisions[i].calculateInventory();
		}
		return value;
	}

	/**
	 * Sorts the televisions by name, using the Bubble Sort algorithm.

	 */
	public void sortArray() {
		int n = televisions.length; // size;
		boolean swapped;
		do {
			swapped = false;
			for (int i = 0; i < n - 1; i++) {
				String name1 = televisions[i].getTelevisionName();
				String name2 = televisions[i + 1].getTelevisionName();
				if (name1.compareToIgnoreCase(name2) > 0) {
					// swap
					Supplier temp = televisions[i];
					televisions[i] = televisions[i + 1];
					televisions[i + 1] = temp;
					swapped = true;
				}
			}
			n = n - 1;
		} while (swapped);
	}
}






















Was This Post Helpful? 0
  • +
  • -

#10 darek9576  Icon User is offline

  • D.I.C Lover

Reputation: 203
  • View blog
  • Posts: 1,731
  • Joined: 13-March 10

Re: Not sure how to go about Modifying Inventory Program to include GUI.

Posted 26 April 2011 - 10:19 AM

You might have to call the constructor of the super class but i am not sure since i rarely code GUIs by extending JFrame - prefer composition.
Anyway try the following:

public Television(your stuff here)
{
   super();
   //your code goes here

}



Was This Post Helpful? 1
  • +
  • -

#11 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon

Reputation: 2965
  • View blog
  • Posts: 11,222
  • Joined: 15-July 08

Re: Not sure how to go about Modifying Inventory Program to include GUI.

Posted 26 April 2011 - 02:05 PM

Your class is called Televisions, but your "Constructor" is called Television. Those names HAVE to be the same to have a constructor.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1