I had posted a question regarding a clock program earlier today 23-10-2002 (Please Help with progam)
Following this I want to create a world clock with five world city times. I know I will use inheritance to create a base class and then derive the rest of the clocks from this. Now the important factor is the dispalying of the time. I am stuck in the part which is polymorphism (I am right I hope).
//my basic pseudo code
class clock{
...
virtual void show_time();
};
class NewYorkClock : clock{
void show_time();
};
and so on ... for the other cities
I need help to display the times for the 5 cities using the base class' show_time() function. And I was hoping anyone could provide me with perhaps a link or any assistance on how to achive this using polymorphism.
Thanks again.