How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask lifesaver Your Own Question

lifesaver
lifesaver, Computer Software Engineer
Category: Programming
Satisfied Customers: 5962
Experience:  Several years of intensive programming and application development experience in various platforms.
16528259
Type Your Programming Question Here...
lifesaver is online now
A new question is answered every 9 seconds

Create a Java class called Invoice which has the following attributes

This answer was rated:

Create a java class called Invoice which has the following attributes:
1. Item Number
2. Item Name
3. Unit price
4. Quantity
Include a constructor which sets the initial values of each attribute to 9999, “none”, 0 and 0 respectively. Provide set methods to set the values of these attributes. Include a method called displayCost() which computes the total cost of the item (quantity * unit price) and displays the item number, name , unit price, quantity and total cost. Save this class as Invoice.java
Create an application called TestInvoice.java which instantiates an object of the class Invoice. It provides the values of the attributes and displays them including the total cost. Save this application as TestInvoice.java.
Download your program for:-

http://www.mediafire.com/?nyjzjzkcmyx
lifesaver and other Programming Specialists are ready to help you