// A Cat class implementation
#include <iostream>

// The Cat class declaration
class Cat{
  private:
   double m_mass;
   int    m_age, m_life;
  public:
    Cat(int = 1, double =2.0);
    ~Cat();
    void   speak();
    void   kill();
    double getMass(){ return m_mass; }
    int    getAge() { return m_age;  }
    int    getLife(){ return m_life; }
};

int main(){
  Cat Tekir(1, 3.0);

  Tekir.speak();
  std::cout << "The Age  = " << Tekir.getAge()  << std::endl;
  std::cout << "The Mass = " << Tekir.getMass() << std::endl;
  std::cout << "The Life = " << Tekir.getLife() << std::endl;
  Tekir.kill();
  std::cout << "The Life = " << Tekir.getLife() << std::endl;
}

// constructor function
Cat::Cat(int Age, double Mass){
  m_age = Age; m_mass = Mass; m_life = 9;
  std::cout << "--- Start of the Cat class ---\n";
}
// Destructor do nothing
Cat::~Cat(){
  std::cout << "--- End of the Cat class ---\n";
}
// speak method
void Cat::speak(){
  std::cout << "meow..\a\n";
}
// kill method to kill the cat by one
void Cat::kill(){
  m_life--;
  if(m_life<0) {
     m_life = 0;
     std::cout << "Cat has already died.\n";
  }
}
