#include <iostream>
class Base{
protected:
	virtual void Hoge()=0;

	void Huga(){
		std::cout<<"I cry in Base::Huga();"<<std::endl;
	}

	virtual void Hage(){
		std::cout<<"My head is not Light!!"<<std::endl;
	}

public:
	void CallA(){
		std::cout<<"*Base::CallA is start*"<<std::endl;
		Hoge();
		Huga();
		Hage();
		std::cout<<"*Base::CallA is end!*"<<std::endl;
	}
};

class Derived:public Base{
protected:
	virtual void Hoge(){
		std::cout<<"Override Hoge in Derived!"<<std::endl;
	}

	void Huga(){
		std::cout<<"I cry in Derived::Huga();"<<std::endl;	
	}
	virtual void Hage(){
		std::cout<<"I need Heir!!"<<std::endl;
	}
public:
	void CallB(){
		std::cout<<"*Derived::CallB is start*"<<std::endl;
		CallA();
		Hoge();
		Huga();
		Hage();
		std::cout<<"-Call the base method from derived!^"<<std::endl;
		//Base::Hoge();
		Base::Huga();
		Base::Hage();
		std::cout<<"*Derived::CallB is end!*"<<std::endl;
	}
};


int main(){
	Derived D;
	Base* B = &D;
	std::cout<<"-------------------------"<<std::endl;
	B->CallA();
	std::cout<<"-------------------------"<<std::endl;
	D.CallB();

	return 0;
}