Users browsing this thread: 1 Guest(s)
Java help: not really sure where I want to go with this
#1
Okay, so

I need to learn some object-oriented programming. Namely, I need to figure out how to work with inheritance and super/subclasses.

As of right now, I'm tasked with making an Appointment program that uses this whole idea that classes can break into one superclass and a ton of other subclasses. This particular task involves making the Appointment class the superclass and then making "One-time", "Daily", "Weekly", and "Monthly" subclasses to Appointment.
A method will then accept a date input and matches it up with a database of inserted appointments, printing out all the appointments that would occur on the input date.
On top of this, all of the dates I need to store for the program must be put into an array of Appointment objects.

I can most definitely code a program that can take inputs and print out all the stored events that would happen on a particular day. However, I can't seem to wrap my head around doing this with a superclass and subclasses.

Does anyone have any good suggestions as to what I should do for this? As in, what exactly is getting inherited from the Appointment superclass, and where am I able to store the array of Appointment objects?
HAVE I BEEN MISLEAD?? [Image: TeamStory.gif] THE DREAM ISN'T DEAD???

Thanked by:


Messages In This Thread
Java help: not really sure where I want to go with this - by Rosencrantz - 07-04-2011, 02:35 PM

Forum Jump: