19 lines
471 B
C++
19 lines
471 B
C++
|
|
|
|
#include <iomanip>
|
|
#include <iostream>
|
|
|
|
#include "EntryVisitor.h"
|
|
#include "PersonEntry.h"
|
|
|
|
PersonEntry::PersonEntry(std::string name, std::string phone) : Entry(name), _phone(phone) {}
|
|
|
|
void PersonEntry::print(std::string indent) const {
|
|
|
|
std::cout << indent << "Person: " << getName() << ' ' << _phone << '\n';
|
|
}
|
|
|
|
std::string PersonEntry::getPhone() const { return _phone; }
|
|
|
|
void PersonEntry::accept(EntryVisitor &v) const { v.visit(*this); }
|