Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef CARTE_H
- #define CARTE_H
- #include <iostream>
- #include "CaracteristiqueScore.h"
- class Carte{
- private :
- char nom[30];
- char* serie;
- int numero;
- CaracteristiqueScore caraScore;
- public :
- //constructeur par default
- Carte();
- //constructeur d'initilisation
- Carte(const char* n,const char* s,const int num, const CaracteristiqueScore cs);
- Carte(const char* n,const char* s,const int num, const char* caraNom,const int caraScore);
- //constructeur de copy
- Carte(const Carte& c);
- //destructeur
- ~Carte();
- //Surcharge des opérateur
- Carte& operator=(const Carte& c);
- Carte operator+(int add);
- Carte operator-(int less);
- int operator-(Carte c);
- bool operator<(const Carte c);
- bool operator>(const Carte c);
- friend std::ostream& operator<<(std::ostream& s,const Carte& c);
- Carte operator++();//préfixé
- Carte operator++(int);//préfixé
- //getter - setter
- void setNom(const char* n);
- const char* getNom() const;
- void setSerie(const char* s);
- char* getSerie() const;
- void setNumero(int n);
- int getNumero() const;
- void setCaracteristiqueScore(const CaracteristiqueScore cs);
- CaracteristiqueScore getCaracteristiqueScore() const;
- void affiche(std::ostream& stream = std::cout) const;
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment