myShape.cpp 553 B

12345678910111213141516171819202122232425262728293031
  1. #include "myShape.h"
  2. void Shape::WhereAmI()
  3. {
  4. std::cout << "Now I am in class Shape" << std::endl;
  5. }
  6. void Shape::WhereAmIVirtual()
  7. {
  8. std::cout << "Now I am in class Shape" << std::endl;
  9. }
  10. Shape::Shape(colour colour, bool contour, double transparency)
  11. {
  12. m_colour = colour;
  13. m_contour = contour;
  14. m_transparency = transparency;
  15. }
  16. Shape::Shape(const Shape& other)
  17. {
  18. m_colour = other.m_colour;
  19. m_contour = other.m_contour;
  20. m_transparency = other.m_transparency;
  21. }
  22. Shape::~Shape()
  23. {
  24. std::cout << "Now I am in Shape's destructor!" << std::endl;
  25. }