11
Reply

Idea class scale C++

siabanie banie

siabanie banie

Dec 9 2011 6:48 PM
2k
Hi again,
I wonder if you can clear and help me out on this matters:
Basically I need to create class scale and translate where these two classes are inheritance from transition class.

In the scale class contain e.g

Public:
scale();
~scale draw();
operator >>;

same as translate.

And the transition class contains:
protected:
vector3D vec;

Here is what I have done but does not seem right:

file: Transition.h
#define Transition_h
 
#include "Drawable.h"
#include "Painter.h"
 
 
class Transition : public Drawable, public Painter, public Drawable {
 
 
protected:
    null vector3D vec;;
};
 
file:Transition.cpp
#include "Transition.h"
 
File:scale.h
#define Scale_h
#include "Transition.h"
 
class Scale : public Transition {
 
public:
 
    virtual void scale();
 
    virtual void ~scale();
 
    virtual void draw();
 
    virtual void operator >>;
};
 
File.scale.cpp
 
#include "Scale.h"
 
void Scale::scale()
{
}
void Scale::~scale()
{
}
void Scale::draw()
{
   
}
 
void Scale::operator >>
{
}
 
file:Translate.h
 
#define Translate_h
#include "Transition.h"
 
class Translate : public Transition {
 
public:
 
    virtual void translate ();
 
    virtual void ~translate ();
 
    virtual void draw ();
 
    virtual void operator >>;
};
 
file:Translate.cpp
#include "Translate.h"
 
void Translate::translate ()
{
}
 
void Translate::~translate ()
{
}
void Translate::draw ()
{
   
}
void Translate::operator >>
{
}

How can I create these classes ? Can you please assist me on this? Thanks.

Answers (11)