Write an application that does the following: 1. Creates class Invoice 2. Declares class member variable called numberOf
    Write an application that does the following: 1. Creates class Invoice 2. Declares class member variable called numberOf

Write an application that does the following: 1. Creates class Invoice 2. Declares class member variable called numberOf

$10.00

Write an application that does the following:

1. Creates class Invoice

2. Declares class member variable called numberOfInvoices that is incremented each time a new invoice is created

3. Declares the four following instance member variables: • companyName (which stores String representing name of Company) • amountDue of type double • chargeDate of type String • invoiceNumber of type int where invoiceNumber is initialized to ++numberOfInvoices

4. Makes all member variables private to hide and encapsulate data

5. Implements the four following public getters to retrieve current values of all private members: • getCompanyName() • getAmountDue() • getChargeDate() • getInvoiceNumber()

6. Implements the three following public setters to set values of all private members: • setCompanyName(String coName) • setAmountDue(double Amount) • setChargeDate(String dateCharged)

7. Creates required public constructors, including one that uses all setters to initialize all private attributes: companyName, amountDue, and chargeDate

8. Implements class (static) method getNumberOfInvoices() to return numberOfInvoices

B. Write a test application that does the following to create three Invoices to test the class developed in part A:

1. Creates an instance of Invoice and uses the Invoice constructor to initialize the following private attributes: companyName is “Amazing Software”, amountDue is “5,000.00”, and chargeDate is “January 18, 2009” Note: Print information for the first invoice and verify that invoiceNumber was initialized to ++numberOfInvoices.

2. Creates an instance of Invoice and uses the Invoice constructor to initialize the following private attributes: companyName is “Best Programs”, amountDue is “4,000.00”, and chargeDate is “February 18, 2009” Note: Print information for the second invoice and verify that invoiceNumber was initialized to ++numberOfInvoices.

3. Creates an instance of Invoice and uses the Invoice constructor to initialize the following private attributes: companyName is “Champion Code”, amountDue is “3,000.00”, and chargeDate is “March 18, 2009” Note: Print information for the third invoice and verify that invoiceNumber was initialized to ++numberOfInvoices.

4. Uses class method getNumberOfInvoices() to get and print class member variable called numberOfInvoices without instantiating another Invoice

A++ Solution - Java Project

Attached Files

Move over [ preview ] file name to preview content in it!

Write a review

Your Name:


Your Review: Note: HTML is not translated!

Rating: Bad           Good

Enter the code in the box below:



PURCHASE SAVE
2 Tutorials 10%
3 Tutorials 13%
4 Tutorials 16%
5 Tutorials 19%
6 Tutorials 22%
7 Tutorials 25%
8 Tutorials 28%
9 Tutorials 31%
10 Tutorials 34%
add url more

9MZQASHWN73B