Question: CIS 355A - WEEK 2: PROGRAMMING PRACTICE Create an Invoice class that might serve as a receipt for items sold. An Invoice should be defined
CIS 355A - WEEK 2: PROGRAMMING PRACTICE Create an Invoice class that might serve as a receipt for items sold. An Invoice should be defined by the following attributes: productName : String quantityPurchased : int pricePerItem : double Provide getters and setters for each attribute, making sure that the numeric values given are not negative. Set them to 0 if they are. Include a method that calculates the invoice amount (i.e., multiplies the quantity by the price per item), then returns the amount as a double value. Write a test program that shows everything working.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
