#include "Book.h" #include "Visitor.h" #include Book::Book( const string& a, const string& t ) : author_( a ), title_( t ) { cout << "costruisco Book(" << author() << ", " << title() << ")" << endl; } Book::~Book() { cout << "distruggo Book(" << author() << ", " << title() << ")" << endl; } void Book::print() const { cout << author() << ": " << title() << "." << endl; } void Book::accept( Visitor& v ) const { v.visit( * this ); }