Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef STRUCTS_H_INCLUDED
- #define STRUCTS_H_INCLUDED
- #include <iostream>
- #include <string>
- #include <fstream>
- /**
- This structure is to store the date and it has three integer fields
- **/
- struct Date{
- int day;
- int month;
- int year;
- Date();
- };
- Date::Date()
- {
- day = 0;
- month = 0;
- year = 0000;
- }
- /**
- This structure is to store the size of the enclosure and it has three int fields
- **/
- struct SizeOfEnclosure{
- int length;
- int width;
- int height;
- SizeOfEnclosure();
- };
- SizeOfEnclosure::SizeOfEnclosure()
- {
- length = 0;
- width = 0;
- height = 0;
- }
- /**
- This structure is to store the danger assessment. It contains a Char: 'V' or 'N' for venomous or non venomous.
- It also contains an int from 0-10 for the aggressiveness rating.
- **/
- struct DangerAssessment{
- char venoumous;
- int agression;
- DangerAssessment();
- };
- DangerAssessment::DangerAssessment()
- {
- venoumous = ' ';
- agression = 0;
- }
- /**
- This is the main mammal structure
- **/
- struct Mammal {
- std::string species;
- Date birthDate;
- int weight;
- SizeOfEnclosure sizeofenclosure;
- std::string exhibitName;
- Mammal();
- void getMammalsData(std::ifstream& inFile);
- void displayMammals(Mammal mammals[], int totalMammals);
- void printExhibitForMammals(std::string exhibitNameToCompare);
- };
- Mammal::Mammal()
- {
- species = " ";
- weight = 0;
- exhibitName = " ";
- }
- /**
- This is the main bird structure
- **/
- struct Bird {
- std::string species;
- Date birthDate;
- int weight;
- char canFly;
- std::string exhibitName;
- Bird();
- void getBirdsData(std::ifstream& inFile);
- void displayBirds(Bird birds[], int totalBirds);
- };
- Bird::Bird()
- {
- species = " ";
- weight = 0;
- canFly = ' ';
- exhibitName = " ";
- }
- /**
- This is the main reptile structure
- **/
- struct Reptile {
- std::string species;
- DangerAssessment dangerAssess;
- Date birthDate;
- SizeOfEnclosure sizeofenclosure;
- std::string exhibitName;
- Reptile();
- void getReptilesData(std::ifstream& inFile);
- void displayReptiles(Reptile reptiles[],int totalReptiles);
- };
- Reptile::Reptile()
- {
- species = " ";
- exhibitName = " ";
- }
- /**
- This is the main personnel structure
- **/
- struct Personnel {
- std::string name;
- Date hireDate;
- std::string jobTitle;
- std::string exhibitName;
- Personnel();
- void getPersonnelData(std::ifstream& inFile);
- void displayPersonnel(Personnel personnel[], int totalPersonnel);
- };
- Personnel::Personnel()
- {
- name = " ";
- jobTitle = " ";
- exhibitName = " ";
- }
- #endif // STRUCTS_H_INCLUDED
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement