bike.h
Go to the documentation of this file.
1 #ifndef BIKE_H
2 #define BIKE_H
3 
4 #include <iostream>
5 #include <fstream>
6 #include <string>
7 #include <stdexcept>
8 
9 using namespace std;
10 
19 class Bike
20 {
21  public:
22  Bike();
23  Bike( string id, string name, int gears ) throw ( invalid_argument );
24  void setID( string id ) throw ( invalid_argument );
25  void setName( string name );
26  void setGears( int gears ) throw ( invalid_argument );
27  string getID() const;
28  string getName() const;
29  int getGears() const;
30  virtual void print( ostream& out = cout ) const;
31  virtual void read( istream& in ) throw ( invalid_argument );
32  virtual ~Bike();
33 
34  protected:
35  string id;
36  string name;
37  int gears;
38 
39 }; // Bike class
40 
41 #endif // BIKE_H
42 
string id
Definition: bike.h:35
string name
Definition: bike.h:36
Definition: bike.h:19
int gears
Definition: bike.h:37