My assignment is to create a simple Appointment superclass
with three ( Daily, OneTime , Monthly) subclasses
.
then I need to ask user to enter different appointments and store them in an ArrayList
through a method called add
. user should select the type of the appointment too.
I am new to polymorphism and try to find a polymorphic solution instead of using instanceof
Operator.
Is it possible in my case?
Could you help me to have a better understanding of polymorphism
please?