As you work through this assignment

  

As you work through this assignment, indicate the step number and copy and paste the code or write an answer, wherever indicated, in the Word document and the screenshots
 

Perform the following tasks:

1. Open the Buyers project in Eclipse.

 
 

2.  

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.

 
 

3.  

Create a new class called CashBuyer that inherits from the BuyerImpl class. The CashBuyer class will override thepayForItem method.

 
 

4.  

Code the payForItem method to write to a message to the standard output that the CashBuyer object is paying for an item with cash.

 
 

5.  

Add a new class called CreditCardBuyer that will also override thepayForItem method.

 
 

6.  

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.

 
 

7.  

In the BuyerTestDriver class, create and test a CashBuyer object and a CreditBuyer object.

 
 

8.  

Write a brief description of the core object-oriented principles used in this part of the project and describe a justification for their use.

Calculate your order
Pages (275 words)
Standard price: $0.00
Client Reviews
4.9
Sitejabber
4.6
Trustpilot
4.8
Our Guarantees
100% Confidentiality
Information about customers is confidential and never disclosed to third parties.
Original Writing
We complete all papers from scratch. You can get a plagiarism report.
Timely Delivery
No missed deadlines – 97% of assignments are completed in time.
Money Back
If you're confident that a writer didn't follow your order details, ask for a refund.

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
$0.00
Power up Your Academic Success with the
Team of Professionals. We’ve Got Your Back.
Power up Your Study Success with Experts We’ve Got Your Back.
Open chat
1
Hello. Can we help you?