1/*
2 Copyright(C) 2007
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 : December 1, 2007.
11 authorĀ : Salih Yurttas.
12
13 Q.h
14*/
15
16
17#ifndef Q_H
18#define Q_H
19
20#include "P.h"
21
22template<class T>
23class Q : public P<T> {
24public:
25 Q();
26
27 Q(const Q<T>&);
28
29 virtual Q<T>& operator=(const Q<T>&);
30
31 virtual T get_a(const int) const; // in: index, out: value
32
33 virtual T get_b() const;
34
35 template<class U> // this syntax changed several times
36 friend ostream& operator<<(ostream&,
37 const Q<T>&);
38
39
40protected:
41 T b;
42};
43#endif