Advertisement
JuanTorres

Untitled

Feb 16th, 2015
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.85 KB | None | 0 0
  1. #include<iostream>
  2. #include<string>
  3.  
  4. using namespace std;
  5.  
  6.  
  7. #include "Attletas.h"
  8.  
  9.  
  10. Attletas::Attletas()
  11. {
  12.    
  13.    
  14. }
  15.  
  16. void Attletas::setName(char N[])
  17. {
  18.  
  19.     cin.ignore();
  20.     cout << "Name : "; cin.getline(N, 100, '\n');
  21.    
  22.  
  23.     name = N;
  24.  
  25.  
  26. }
  27. const char * Attletas::getnames()
  28. {
  29.     return this -> name;
  30. }
  31.  
  32.  
  33. void Attletas::settime(float  T)
  34. {
  35.     cout << "Tiempo :"; cin >> T;
  36.  
  37.      time = T;
  38.  
  39. }
  40. float  Attletas::gettime()
  41. {
  42.  
  43.  
  44.  
  45.     return time;
  46. }
  47.  
  48.  
  49. void Attletas::setid(int iD)
  50. {
  51.     cout << "Id :"; cin >> iD;
  52.  
  53.     id = iD;
  54. }
  55.  const int Attletas::getid()
  56. {
  57.     return id;
  58. }
  59.  
  60.  
  61.  
  62.  void Attletas::PT()
  63.  {
  64.      cout << gettime() << endl;
  65.  }
  66.  
  67.  
  68.  
  69. void Attletas::Print()
  70. {
  71.  
  72.     cout << "Name : " << getnames() << endl;
  73.     cout << "Id :" << getid() << endl;
  74.     cout << "Tiempo :" << gettime() << endl;
  75.    
  76. }
  77.  
  78.  
  79. Attletas::~Attletas()
  80. {
  81.    
  82. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement