Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. #include "pch.h"
  2. #include "telefonata.h"
  3.  
  4.  
  5. telefonata::telefonata(orario i, orario f, int n)
  6. {
  7.     inizio = i;
  8.     fine = f;
  9.     numero = n;
  10. }
  11.  
  12.  
  13. telefonata::telefonata() { numero = 0; }
  14.  
  15. orario telefonata::Inizio() const { return inizio; }
  16. orario telefonata::Fine() const { return fine; };
  17. int telefonata::Numero() const { return numero; };
  18.  
  19. bool telefonata::operator==(const telefonata& t) const
  20. {
  21.     return inizio == t.inizio && fine == t.fine && numero == t.numero;
  22. }
  23.  
  24. std::ostream& operator<<(std::ostream& s, const telefonata& t)
  25. {
  26.     return s << "INIZIO " << t.Inizio() << " FINE " << t.Fine() << " NUMERO CHIAMATO " << t.Numero();
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement