
#ifndef Animal_h_
#define Animal_h_

// Author: Chuck Stewart
//
// Purpose:  Store and provide access to information about an animal,
// including its name, weight and schedule times.

#ifdef GNU
#define std
#include <ostream.h>
#else
#include <ostream>
#endif

#include <string>

#include "Date.h"

class Animal {
public:
  Animal() {}  // default constructor does nothing
  Animal( const std::string& name, int weight, const Date& start, int ndays );
  Animal( const Animal& old_animal );
  Animal( const std::string& name );
  ~Animal();

  //  operators needed to keep the VC++ compiler happy
  bool operator<(const Animal & x) const;
  bool operator>(const Animal & x) const;
  bool operator!=(const Animal & x) const { return !(*this == x); }

  //  Accessors 
  const std::string & Name() const;
  int Weight() const;
  const Date& StartDate() const;
  int NumDays() const;

  //  Information about cage assignments.
  void AssignCage( int cage_num );
  int GetCage() const;

  friend bool operator== ( const Animal& a1, const Animal& a2 );
  friend std::ostream& operator<< ( std::ostream& ostr, const Animal& a );

protected:
  std::string name_;
  int weight_;
  Date start_;
  int ndays_;
  int cage_num_;
};

#endif

