I have a question using processing code. Write the class definition for StockIte
ID: 3647994 • Letter: I
Question
I have a question using processing code.Write the class definition for StockItem containing title, quantityLeft and
unitPrice, containing -
1. Default constructor
2. Parameterized constructor (convert any negative quantity or unitPrice that is
passed as parameter to positive value before copying into data members)
3.display() method
4.getTotalPrice() method that returns the total price of that StockItem
5.isInStock() method that returns true if the StockItem is in stock, and
false otherwise
Also write a client code that creates an object myItem that has 8 quantities left @ 4.5$
per item, yourItem that has 6 quantities left @ 5.6$ per item, and invoke each of the
methods on myItem, passing yourItem as a parameter to isMoreExpensiveThan method.