-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBill.cpp
More file actions
26 lines (25 loc) · 818 Bytes
/
Bill.cpp
File metadata and controls
26 lines (25 loc) · 818 Bytes
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
//
// Created by seraf on 20.04.2021.
//
#include <memory>
#include "Bill.h"
Bill::Bill(double value, std::string company, std::string message, DateTime remindTime, bool important): Reminder(message, remindTime, important), company(company), value(value){}
//Bill::Bill(const Bill& b): Reminder(b), company(b.company), value(b.value){}
void Bill::setValue(double value){
this -> value = value;
}
void Bill::setCompany(std::string company) {
this -> company = company;
}
void Bill::delay(){
this -> remindTime.addMonths(1);
}
std::unique_ptr <Reminder> Bill::clone(){
return std::make_unique <Reminder> (*this);
}
void Bill::print(std::ostream& os){
os << "Bill to pay\n";
os << "Company: " << this -> company << "\nValue: " << this -> value << "\nMessage: ";
os << *this;
os << "\n";
}