Created
April 19, 2011 12:21
-
-
Save mamut/927304 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Samochod { | |
private: | |
std::string producent; | |
std::string model; | |
int nr_nadwozia; | |
int przebieg; | |
int id; | |
int rocznik; | |
int liczba_napraw; | |
public: | |
virtual void Naprawa() = 0; | |
std::string getProducent() { | |
return producent; | |
} | |
void setProducent(std::string _producent) { | |
producent = _producent; | |
} | |
std::string getModel() { | |
return model; | |
} | |
void setModel(std::string _model) { | |
model = _model; | |
} | |
int getPrzebieg() { | |
return przebieg; | |
} | |
void setPrzebieg(int _przebieg) { | |
przebieg = _przebieg; | |
} | |
//TODO: reszta analogicznie z wyjatkiem liczba_napraw | |
Samochod() { | |
id = 0; | |
std::cout << "Dodano samochod " << id << std::endl; | |
} | |
virtual ~Samochod() { | |
std::cout << "Samochod " << id << " usunieto." << std::endl; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment