help with a c++ project

Discussion in 'OT Technology' started by Glennhuricane, Sep 21, 2005.

  1. Glennhuricane

    Glennhuricane New Member

    Joined:
    Apr 2, 2004
    Messages:
    6,070
    Likes Received:
    0
    Location:
    nj
    anyone help would be appreciated.
    i need to make a program that will display the time and increment the minutes
    this is the .cpp, and i need to make a program that will test this.
    i have no idea b/c my teacher doesnt teach us shit

    Clock::Clock() : hours(23), minutes(59) //constructor
    {
    }

    void Clock::Increment()
    {
    minutes.Increment();
    if (minutes.ReturnValue() == 0)
    hours.Increment();
    }

    void Clock::Set(int hour, int min)
    {
    hours.SetValue(hour);
    minutes.SetValue(min);
    }

    void Clock::Show()
    {
    hours.Show();
    cout << " : ";
    minutes.Show();
    }

    thanks...
     
  2. samm

    samm Next in Line

    Joined:
    Dec 22, 2000
    Messages:
    2,630
    Likes Received:
    0
    Location:
    San Jose, CA
    Please post the Clock class header file that contains the class definition if you would like help.
     

Share This Page