Skip to content

Instantly share code, notes, and snippets.

@mamut
Created April 19, 2011 12:21
Show Gist options
  • Save mamut/927304 to your computer and use it in GitHub Desktop.
Save mamut/927304 to your computer and use it in GitHub Desktop.
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