Advertisement
adventuretimeh

classecontocorrente

Jan 25th, 2021
1,143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. #include "contocorrente.h"
  2. contocorrente::contocorrente(string& n,string& c)
  3. {
  4. nome=n;
  5. cognome=c;
  6. codice=generacodice();
  7. capitale=0;
  8. }
  9. void contocorrente::deposito(double d)
  10. {
  11. capitale=d;
  12. }
  13. bool contocorrente::prelievo(double p)
  14. {
  15. if(p<=capitale){
  16. capitale=p;
  17. return true;
  18. }
  19. else
  20. return false;
  21. }
  22. double contocorrente::saldo()
  23. {
  24. return capitale;
  25. }
  26. string contocorrente::getnominativo()
  27. {
  28. return cognome;
  29. return nome;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement