-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPet.hpp
More file actions
48 lines (39 loc) · 1.51 KB
/
Copy pathPet.hpp
File metadata and controls
48 lines (39 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//************************************************************************
// Author: Rolando Carreon
// Date: may 14 2025
// Language: C++
// Assignment: Demo Pet Class.hpp
// Description: specification file for the pet class, specifies
// the function prototypes and variables.
//************************************************************************
#ifndef Pet_hpp
#define Pet_hpp
// #include <stdio.h> // replaced with iostream
#include <iostream>
using namespace std; // for cin and cout
class Pet
{
private: // private variables
string name; // name of the pet
string petType; // type of pet
string sound; // sound the pet makes
public: // public functions
// getter methods
// call functions with no parameters, set to const
string getName() const; // get the name of the pet
string getPetType() const; // get the type of pet
string getSound() const; // get the sound the pet makes
// setter mthods
// set values dont return anything so void
void setName(string); // set the name of the pet
void setPetType(string); // set the type of pet
void setSound(string); // set the sound the pet makes
// method function to print the pet information
void print();
// constructor
// default constructor has no return type, taks no parameters
Pet();
// constructor with all parameters
Pet(string, string, string);
};
#endif /* Pet_hpp */