CPP04 1.0
読み取り中…
検索中…
一致する文字列を見つけられません
WrongCat.hpp
[詳解]
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* WrongCat.hpp :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: kamitsui <kamitsui@student.42tokyo.jp> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2025/05/20 16:27:13 by kamitsui #+# #+# */
9/* Updated: 2025/05/20 20:44:22 by kamitsui ### ########.fr */
10/* */
11/* ************************************************************************** */
12
21#ifndef WRONGCAT_HPP
22#define WRONGCAT_HPP
23
24#include "WrongAnimal.hpp" // Inherits from WrongAnimal
25
34class WrongCat : public WrongAnimal {
35 public:
36 WrongCat();
37 WrongCat(const WrongCat &other);
38 WrongCat &operator=(const WrongCat &other);
39 virtual ~WrongCat();
40
41 void makeSound() const;
42};
43
44#endif
The WrongAnimal class represents a generic animal, used to demonstrate the LACK of polymorphism when ...
The WrongCat class represents a feline animal in the "wrong" hierarchy.
Definition WrongCat.hpp:34
WrongCat()
Default constructor for WrongCat. Calls the WrongAnimal base class constructor and sets the type to "...
Definition WrongCat.cpp:28
virtual ~WrongCat()
Destructor for WrongCat. Displays a specific destruction message.
Definition WrongCat.cpp:63
WrongCat & operator=(const WrongCat &other)
Makes the characteristic sound of a WrongCat ("Wrong meow!").
Definition WrongCat.cpp:51
void makeSound() const
Makes the characteristic sound of a WrongCat ("Wrong meow!").
Definition WrongCat.cpp:73
Declares the WrongAnimal class.