Final answer:
The question is about creating a class called Invoice to represent an invoice for a hardware store item.
Step-by-step explanation:
The subject of this question is Computers and Technology. The class that needs to be created is called 'Invoice.' It represents an invoice for an item sold at a hardware store. The class should have four data attributes: part number (a string), part description (a string), quantity of the item being purchased (an int), and price per item (a Decimal). The __init__ method initializes these attributes, and there should be a property for each attribute.
Validation should be used for the quantity and price per item properties to ensure they remain non-negative. The class should also have a calculate_invoice method that returns the invoice amount by multiplying the quantity by the price per item.
An example usage of the class would be creating an instance of Invoice, setting the part number, description, quantity, and price per item, and then calling the calculate_invoice method to get the total invoice amount.