1/*
2 Copyright(C) 1998
3 All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..
4
5 Permission to use, copy, modify, and distribute this
6 software and its documentation for EDUCATIONAL purposes
7 and without fee is hereby granted provided that this
8 copyright notice appears in all copies.
9
10 date : January 1, 1998.
11 author : Salih Yurttas.
12
13 D.h
14*/
15
16
17#include <iostream>
18
19using namespace std;
20
21class D {
22public:
23 D(const int a=2, // default constructor with default values
24 const int b=1);
25
26 D(const D&); // copy constructor
27
28 D& operator=(const D&); // assignment operator overloaded
29
30 ~D(); // destructor
31
32 int get_s() const; // accessor for s
33
34 int* get_d() const; // accessor for d
35
36 void set_d(const int); // mutator for d by an int
37
38 void set_d(const int,
39 const int); // mutator for d by distinct ints
40
41 void set_d(const int*); // mutator for d by aggregate of ints
42
43 friend ostream& operator<<(ostream&,
44 const D&); // D type output
45
46private:
47 int s;
48 int* d;
49};