100% Guaranteed Results


OOP2 – Object Oriented Programming 2 Solved
$ 20.99
Category:

Description

5/5 – (1 vote)

Lab Assignment-4
(Operator Overloading) Program 1
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
1. To Display Time.
2. To Display Time in Seconds.
3. To Increment seconds.
4. To decrements minutes.
0. To exit.

Program 2.
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 }
• overload operator “<<” to print the details of a Dollar
Inside main declare one object and show the results.
Student has to upload assignment within 1.25 hours of laboratory time.

Reviews

There are no reviews yet.

Be the first to review “OOP2 – Object Oriented Programming 2 Solved”

Your email address will not be published. Required fields are marked *

Related products