SHARE
TWEET

Untitled

a guest Jan 23rd, 2020 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. ** EPITECH PROJECT, 2020
  3. ** cpp_d08_2019
  4. ** File description:
  5. ** Droid
  6. */
  7.  
  8. #ifndef DROID_HPP_
  9. #define DROID_HPP_
  10. #include <iostream>
  11.  
  12. class Droid {
  13.     public:
  14.         Droid(std::string id = "");
  15.         Droid(const Droid &);
  16.         ~Droid();
  17.         std::string getId() const;
  18.         size_t getEnergy() const;
  19.         size_t getAttack() const;
  20.         size_t getToughness() const;
  21.         std::string *getStatus() const;
  22.         void setId(std::string id);
  23.         void setEnergy(size_t energy);
  24.         void setStatus(std::string *status);
  25.         Droid &operator<<(size_t &battery);
  26.         Droid &operator=(Droid const &new_droid);
  27.         bool operator!=(const Droid &d) const;
  28.         bool operator==(const Droid &d) const;
  29.  
  30.     protected:
  31.     private:
  32.         std::string _id;
  33.         size_t _energy;
  34.         const size_t _attack = 25;
  35.         const size_t _toughness = 15;
  36.         std::string *_status;
  37. };
  38.  
  39. std::ostream &operator<<(std::ostream &s, const Droid &d);
  40.  
  41. #endif /* !DROID_HPP_ */
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top