code beautifying
This commit is contained in:
parent
59e7634712
commit
4d8396fac1
2 changed files with 18 additions and 18 deletions
|
@ -1,26 +1,23 @@
|
|||
#include "seller.h"
|
||||
|
||||
void Seller::setSellerNo(int seller_no)
|
||||
{
|
||||
sellerNo_ = seller_no;
|
||||
}
|
||||
Seller::Seller() : Entity() {}
|
||||
|
||||
void Seller::setFirstName(const std::string& firstName)
|
||||
Seller::Seller(const std::string& firstName, const std::string& lastName, int sellerNo,
|
||||
int numberOfArticles)
|
||||
: Entity()
|
||||
{
|
||||
firstName_ = firstName;
|
||||
}
|
||||
|
||||
void Seller::setLastName(const std::string& lastName)
|
||||
{
|
||||
lastName_ = lastName;
|
||||
sellerNo_ = sellerNo;
|
||||
numberOfOfferedArticles_ = numberOfArticles;
|
||||
}
|
||||
|
||||
void Seller::setNumberOfOfferedArticles(int number)
|
||||
{
|
||||
numberOfOfferedArticles_ = number;
|
||||
}
|
||||
inline void Seller::setSellerNo(int seller_no) { sellerNo_ = seller_no; }
|
||||
|
||||
size_t Seller::getNumberOfOfferedArticles()
|
||||
{
|
||||
return articles_.size();
|
||||
}
|
||||
inline void Seller::setFirstName(const std::string& firstName) { firstName_ = firstName; }
|
||||
|
||||
inline void Seller::setLastName(const std::string& lastName) { lastName_ = lastName; }
|
||||
|
||||
inline void Seller::setNumberOfOfferedArticles(int number) { numberOfOfferedArticles_ = number; }
|
||||
|
||||
inline size_t Seller::getNumberOfOfferedArticles() { return articles_.size(); }
|
|
@ -1,8 +1,8 @@
|
|||
#ifndef SELLER_H
|
||||
#define SELLER_H
|
||||
|
||||
#include "entity.h"
|
||||
#include "article.h"
|
||||
#include "entity.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@ -12,6 +12,9 @@ class Article;
|
|||
class Seller : public Entity
|
||||
{
|
||||
public:
|
||||
Seller();
|
||||
Seller(const std::string& firstName, const std::string& lastName, int sellerNo = 0,
|
||||
int numberOfArticles = 0);
|
||||
void setSellerNo(int sellerNo);
|
||||
void setFirstName(const std::string& firstName);
|
||||
void setLastName(const std::string& lastName);
|
||||
|
|
Loading…
Reference in a new issue