I think my last question was a little confusing so I am going to put up my entire delema lol.
Create a Payable interface that requres a getPaymentAmount() method. Create the following gclasses that implement the Payable interface.
PropertyTaxBill
DueByDate
TotalDue
DomainNameRegistration
feePerYear
ExpiryDate
SoftwareLicense
Determine required variables
Write getters and setters for all variables. WRite at least one constructor for each class that takes all variable. Each class hsould implement the Payable interface.
Add a toString method that will return something that is logical for that class.
In the Drive class create a collection of Payable type. Add at least one of each type of employee to the collection. Add at least one time of tax bill, software license, and domain name registration to the collection. Loop through the collection and call toString and getPayment amount and print it.
Object-oriented design with Interface’s is well beyond Chapter 1 level material, isn’t it?
At some point we all have to learn to swim on our own, or drown trying.
Every programmer must confront this moment.
If you want help from anyone, I recommend you delete this question and re-pose the questions directly to focus on the core conceptual areas of programming that you don’t yet understand:
What is a interface?
What is a property?
What is a constructor?
What is a collection?
What is a method?
What is a class?
What is a variable?
What is a loop?
What is a call?
How do I print in java?
etc
Nobody wants to do your homework, but people will answer basic questions about the fundamentals in the assignment that the teacher is trying to make you learn.
20 years of programming
Report this comment