954,510 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Java Code Inventory Program product Televison Urgent need help totally confused.

import java.text.NumberFormat;
import java.util.Locale;
import java.util.Scanner;

   class Television {

    private String itemNumber;
    private String productName;
    private double unitPrice;
    private double unitPrice;




    //constructor
    public Television (String itemNumber, String productName, double units, double unitPrice) {

        setItemNumber(itemNumber);
        setProductName(productName);
        setUnitPrice(unitPrice);
    }


    //accessor methods for class variables
    public String getItemNumber () {
        return itemNumber;
    }

    public void setItemNumber (String itemNumber) {
        this.itemNumber = itemNumber;
    }

    public String getProductName () {
        return productName;
    }

    public void setProductName (String productName) {
        this.productName = productName;
    }

    public double getUnitPrice () {
        return unitPrice;
    }

    public void setUnitPrice (double unitPrice) {
        this.unitPrice = unitPrice;
    }
    public double getcalculateInventoryTotal() {
		return totalAmt;

   }

}


   public class InventoryPart1 {

    public static void main (String[] args) {

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

        //create an instance of the Television class

        Television samsung = new Television ("SAMSUNG 46", "Class 6400 Series",9.3,1,599.99);

        //use the methods from class Television to output the inventory details.

        System.out.println("Item Number: " + samsung.getItemNumber());

        System.out.println("Product Name: " + samsung.getProductName());

        System.out.print("Unit Price: " + nf.format(samsung.getUnitPrice()));

		System.out.print("Inventory______ Total:_______"+

			nf.format(Samsung.CalculateInventoryTotal())); {


     }
 }
Raven50
Newbie Poster
1 post since Apr 2011
Reputation Points: 10
Solved Threads: 0
 

too late...

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: