- #1
Robben
- 166
- 2
Homework Statement
Suppose I have a subclass called, Cashier, and a super class named, Clerk. How do I make a method that is called on a Cashier object and takes in an instance of Cashier? What method has a structure like this?
Homework Equations
None
The Attempt at a Solution
This method is going to place a competition between the subclass Cashier and the superclass Clerk and returns Cashier member that won the competition.
I have my particular competition created, by creating a helper method but I just don't know how to apply the problem statement above.
Code:
public class Cashier {
...
}
public class Clerk extends Cashier {
...
}