i think Tyler Littlefield is right as i explained the Arrays to you but you 
don't benefit from it
try to make your assignments by your own and thnks 
Eng A.Mahmoud
any questions send me at:
eng_hamada2585@ yahoo.com
engAhmedMahmoud@ fci.net
eng.hamada2585@ gmail.com

--- On Sat, 1/17/09, Jawad Saleem <[email protected]> wrote:

From: Jawad Saleem <[email protected]>
Subject: [c-prog] Can anyone give me Coding of This Program in C++
To: "c" <[email protected]>
Date: Saturday, January 17, 2009, 11:27 AM






Dear Fellows:
 
Can anyone gives the Coding of This Program. i am Your Thank FUll
 
C++ program which contains a class named Time having three data members. 

Hours
Minutes
Seconds 
 
The class must have 
·        A default and parameterized constructor 
·        show() method to display the time in proper format like HH:MM:SS on 
the screen
·        get() method to get time from user 
·        Overloaded Plus (+) and Minus (-) operators
·        A destructor
   
You will overload + and - operator for this class. 
 
In main program make 3 objects of the Time class time1, time2 and time3 and 
call the get() functions for time1 and time2 then perform time3 = tim1+time2 
and then you will display time3 using its show() function.
 
Note1: While Adding the time keep in mind do not just add the hours into hours 
and minutes into minutes and seconds in seconds , e.g
10:25:10
+01:45:25
------------ ---------
  11: 70: 35
 
Will not be correct, instead your code should add times like, Note that as 
number of minutes have increased 60, hour have been increased.
 
10:25:10
+ 01:45:25
------------ -------
12: 10: 35

[Non-text portions of this message have been removed]

 














      

[Non-text portions of this message have been removed]

Reply via email to