| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Define a class DayTime:
private:
int hour, minute, second;
public:
• parameterized constructor to initialize value
• int getHour() const{ return hour; }
• int getMinute() const { return minute; }
• int getSecond() const { return second; }
• int asSeconds() const // Daytime in seconds
• overload increment operator to increment the value of seconds.
• Overload decrement operator to decrement the value of minutes.
Write a menu driven program and create following menu options:
Define a class Dollar:
private:
float currency, mktrate, offrate
public:
• float getDollar() { return currency in dollar }
• float getMarketSoums() { return currency in soums }
• float getofficialSoums() { return currency in soums }
• void setRates() { // input current date market and official rates }
• overload operator "<<" to print the details of a Dollar.
Inside main declare one object and show the results similar to Program 1.
| Back | FazBrowse Home | New Git URL |