-
Notifications
You must be signed in to change notification settings - Fork 0
/
Toy.cpp
28 lines (21 loc) · 802 Bytes
/
Toy.cpp
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
#include <iostream>
#include <string>
#include "Printable.h"
#include "Item.h"
#include "Toy.h"
using namespace std;
// Constructors
Toy::Toy(int numItem, double price, string brand, bool isPerishableItem, string toyType, int minAgeRestriction) : Item(numItem, price, brand, isPerishableItem), toyType(toyType), minAgeRestriction(minAgeRestriction)
{
}
// Getters
string Toy::get_toyType() const { return toyType; }
int Toy::get_minAgeRestriction() const { return minAgeRestriction; }
// Setters
void Toy::set_toyType(string toyType) { this->toyType = toyType; }
void Toy::set_minAgeRestriction(int minAgeRestriction) { this->minAgeRestriction = minAgeRestriction; }
// Methods
void Toy::print() {}
void Toy::change_numItem(int numItem) { this->numItem += numItem; }
// Destructor
Toy::~Toy() {}