Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Cell.h"
- Cell::Cell(string name,int price,string design,string touch)
- {
- this->name=name;
- this->price=price;
- this->design=design;
- this->touch=touch;
- }
- Cell::Cell()
- {
- this->name="Unknown";
- this->price=0;
- this->design="Unknown";
- this->touch="Unknown";
- }
- string Cell::getDesign()
- {
- return this->design;
- }
- string Cell::getName()
- {
- return this->name;
- }
- string Cell::getTouch()
- {
- return this->touch;
- }
- int Cell::getPrice()
- {
- return this->price;
- }
- void Cell::SetPrice(int price)
- {
- this->price=price;
- }
- void Cell::setDesign(string design)
- {
- this->design=design;
- }
- void Cell::setTouch(string touch)
- {
- this->touch=touch;
- }
- void Cell::setName(string name)
- {
- this->name=name;
- }
- void Cell::show()
- {
- cout<<"Modell: "<<this->name<<" Design: "<<this->design<<" Touch: "<<this->touch<<" Pris: "<<this->price<<endl;
- }
- void Cell::showTouch()
- {
- cout<<this->name;
- }
- void Cell::showDesign()
- {
- cout<<this->name<<" är "<<this->design;
- }
- bool Cell::operator<(Cell cell1)
- {
- return (this->name[0]< cell1.name[0]);
- }
Advertisement
Add Comment
Please, Sign In to add comment