Invoice Class - Create a class calledInvoice that a hardware store might use to represent aninvoice for an item sold at the store. An Invoice should includefour pieces of information as instance variables—a part number(type String), a part description (type String), a quantity of theitem being purchased (type int) and a price per item (double).
- Your class should have a constructor that initializes the fourinstance variables. If the quantity passed to the constructor isnot positive, it should be set to 0 by the constructor. If theprice per item passed to the constructor is not positive, it shouldbe set to 0.0 by the constructor.
- Provide a set and a get method for each instance variable. Ifthe quantity passed to the setQuantity method is notpositive, it should be set to 0 by the method. If the price peritem passed to the setPricePerItem method is not positive,it should be set to 0.0 by the method.
- Provide a method named getInvoiceAmount thatcalculates the invoice amount (i.e., multiplies thequantity by the price per item), then returns theamount as a double value.
Write a test app named InvoiceTest that demonstratesclass Invoice’s capabilities. Create two Invoice objects, printtheir state, and invoice amounts.
(Java Programming)