Open the Buyers project in Eclipse
Open the Buyers project in Eclipse. Add a new method called payForItem to the Buyer interface and the BuyerImpl class. The method in BuyerImpl should write to a message to the standard output that the Buyer is paying for an item. Create a new class called CashBuyer that inherits from the BuyerImpl class. The CashBuyer class will override thepayForItem method. Code the payForItem method to write to a message to the standard output that the CashBuyer object is paying for an item with cash. Add a new class called CreditCardBuyer that will also override thepayForItem method. Code the payForItem method in the class to write to standard output that the CreditCardBuyer object is paying for an object with a credit card. In the BuyerTestDriver class, create and test a CashBuyer object and a CreditBuyer object. Write a brief description of the core object-oriented principles used in this part of the project and describe a justification for their use.
You'll get a 21.2KB .ZIP file.