[SOLVED] CS c++ // From Walter Savitch book resources Absolute C++

$25

File Name: CS_c++_//_From_Walter_Savitch_book_resources__Absolute_C++.zip
File Size: 546.36 KB

5/5 - (1 vote)

// From Walter Savitch book resources Absolute C++

//This is the header file dtime.h. This is the interface for the class DigitalTime.
//Values of this type are times of day. The values are input and output in 24 hour
//notation as in 9:30 for 9:30 AM and 14:45 for 2:45 PM.
#ifndef DTIME_H
#define DTIME_H

#include
using std::istream;
using std::ostream;

// Declare a namespace in which some identifiers are declared/defined
namespace DTimeSavitch{
class DigitalTime{
public:
DigitalTime(int theHour, int theMinute);
DigitalTime( );
int getHour( ) const;
int getMinute( ) const;
void advance(int minutesAdded);
void advance(int hoursAdded, int minutesAdded);
friend bool operator ==(const DigitalTime& time1, const DigitalTime& time2);
friend istream& operator >>(istream& ins, DigitalTime& theObject);
friend ostream& operator <<(ostream& outs, const DigitalTime& theObject);private:int hour;int minute;};} //DTimeSavitch#endif //DTIME_H

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] CS c++ // From Walter Savitch book resources Absolute C++
$25