diff options
| author | Carlos Maiolino <[email protected]> | 2025-07-10 22:24:20 +0200 |
|---|---|---|
| committer | Carlos Maiolino <[email protected]> | 2025-07-10 22:24:20 +0200 |
| commit | 869e68986aa8f69af6e7842260a68d1e5c6f796f (patch) | |
| tree | 63b6b5ffc3d19414233d4629a533c0d9bf3cbf72 /CPP/Basics/cow.h | |
| parent | 20834dcc57537cd95260a4a22f5d91a027adfd35 (diff) | |
Add a bunch of code
Signed-off-by: Carlos Maiolino <[email protected]>
Diffstat (limited to 'CPP/Basics/cow.h')
| -rw-r--r-- | CPP/Basics/cow.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/CPP/Basics/cow.h b/CPP/Basics/cow.h new file mode 100644 index 0000000..b9cdaae --- /dev/null +++ b/CPP/Basics/cow.h @@ -0,0 +1,32 @@ +#ifndef COW_H +#define COW_H + +#include <string> + +enum cow_p { + DAIRY, + MEAT, + HIDE, + PET, +}; + +// By default class members are private +class cow { + +private: + std::string name; + int age; + unsigned char purpose; + +public: + // Constructor + cow(std::string name_i, int age_i, unsigned char purpose_i); + + std::string get_name(); + int get_age(); + unsigned char get_purpose(); + + void set_age(int age_i); +}; + +#endif /* COW_H */ |
