27 lines
No EOL
833 B
C++
27 lines
No EOL
833 B
C++
#include "article.h"
|
|
|
|
// Article::Article() : Entity() {}
|
|
|
|
Article::Article(int price) : price_(price) {}
|
|
|
|
// Article::Article(std::shared_ptr<Seller> sellerPtr) : Entity() { sellerPtr_ = sellerPtr; }
|
|
|
|
void Article::setArticleNo(int articleNo) { articleNo_ = articleNo; }
|
|
|
|
void Article::setPrice(int price) { price_ = price; }
|
|
|
|
void Article::setDescription(const std::string& description) { description_ = description; }
|
|
|
|
void Article::setSale(Sale* salePtr) { salePtr_ = salePtr; }
|
|
|
|
void Article::setSeller(Seller* sellerPtr) { sellerPtr_ = sellerPtr; }
|
|
|
|
bool Article::isSold() { return salePtr_ ? true : false; }
|
|
|
|
std::string Article::getDescription() { return description_; }
|
|
|
|
Seller* Article::getSeller() { return sellerPtr_; }
|
|
|
|
int Article::getPrice() const { return price_; }
|
|
|
|
int Article::getArticleNo() { return articleNo_; } |