world clock

This is a discussion on world clock within the C++ Programming forums, part of the General Programming Boards category; I had posted a question regarding a clock program earlier today 23-10-2002 (Please Help with progam) Following this I want ...

  1. #1
    Registered User nevermind's Avatar
    Join Date
    Oct 2002
    Posts
    23

    world clock

    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.

  2. #2
    btq
    btq is offline
    julie lexx... btq's Avatar
    Join Date
    Jun 2002
    Posts
    161
    try this ...

    /btq
    ...viewlexx - julie lexx

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Outside influences on clock cycles? (clock_t)
    By rsgysel in forum C Programming
    Replies: 4
    Last Post: 01-08-2009, 05:15 PM
  2. clock program
    By bazzano in forum C Programming
    Replies: 3
    Last Post: 03-30-2007, 10:12 PM
  3. Obfuscated Code Contest: The Results
    By Stack Overflow in forum Contests Board
    Replies: 29
    Last Post: 02-18-2005, 04:39 PM
  4. Converting from Screen to World Coordinates
    By DavidP in forum Game Programming
    Replies: 9
    Last Post: 05-11-2004, 12:51 PM
  5. Too much to ask ?
    By deflamol in forum C Programming
    Replies: 2
    Last Post: 05-06-2004, 04:30 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21