jelenpivo123

vozilo.cpp

Oct 5th, 2018
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. #include "Vozilo.h"
  5.  
  6. using namespace std;
  7.  
  8.  
  9.  
  10. void Vozilo::setMarkaModel(string marka, string model){
  11.  
  12. this->marka = marka;
  13. this->model = model;
  14. }
  15.  
  16. void Vozilo::setGodinaProizvodnje(int godinaProizvodnje){
  17.  
  18. this->godinaProizvodnje = godinaProizvodnje;
  19. }
  20.  
  21. string Vozilo::getMarka(){
  22.  
  23. return this->marka;
  24. }
  25.  
  26. string Vozilo::getModel(){
  27.  
  28. return this->model;
  29. }
  30.  
  31. int Vozilo::getGodinaProizvodnje(){
  32. return this->godinaProizvodnje;
  33. }
  34.  
  35. void Vozilo::print(){
  36.  
  37. cout<<this->marka << " " <<this->model;
  38. }
  39. Vozilo::Vozilo(){
  40.  
  41. }
  42. Vozilo::Vozilo(string marka, string model, int godinaProizvodnje){
  43.  
  44. this->marka = marka;
  45. this->model = model;
  46. this->godinaProizvodnje = godinaProizvodnje;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment