2. Challenges
- ( StackAggregatingArray ,StackDerivedFromArray
,StackOnList)
- / ( DoubleList, CyclicList)
- Mixin() : ( PeekBack , Iterated)
3.
- Parallelogram ( doubleh,doublew,doublea);
4.
- classRhombus:publicParallelogram
- Rhombus ( doubleh,doublea) :
- Parallelogram (h, h, a){ };
5.
- classRectangle:publicParallelogram
- static constdouble pi = 3.1415926535897932;
- Rectangle ( doubleh,doublew) :
- Parallelogram (h, w, pi/2){ };
6. 7.
- rh.area(); rh.height(); rh.width(); rh.angle();
- Parallelogram :: rec.area();
- rec.height(); rec.width(); rec.angle();
8.
- classRectangle:publicParallelogram
- using Parallelogram ::area();
- static constdouble pi = 3.1415926535897932;
- Rectangle ( doubleh,doublew) :
- Parallelogram (h, w, pi/2){ };
9. Mixin() :
- Predator (string name, pray);
10. Mixin:
- Pet (string name, string toy);
11. Mixin:
- classCat:publicPredator,publicPet
- static unsigned int _freeID;
- Cat (string name, string toy, string prey):
- Predator (name, prey), Pet (name, toy){ };
12. Mixin:
- classCat:publicPredator, p ublicPet
13. Consistency()
- const string&Predator :: rename (string newname)
32.
- Parallelogram par=Rectangle(10, 20);
33.
- virtual constElem& top() const =0;
- virtual voidpush( const Elem &value) =0;
34.
35.
- classStackAggregatingArray: publicStack
- StackAggregatingArray ( size_t );
- ~StackAggregatingArray ();
- voidpush( const Elem &value) ;
36.
- classStackAggregatingArray: publicStack
- StackAggregatingArray ( size_t );
- virtual~StackAggregatingArray ();
- virtualconstElem& top() const;
- virtualvoidpush( const Elem &value) ;
37. 38.
39.
- voidprocess(Stack & stack)