#include using namespace std; class tarantula { public: string breed; bool throws_hairs_readily; // hair_class Should be 0, 1, 2, or 3, 3 is most irritating // Only tarantulas without urticating hair receive a 0 int hair_class; bool bites; // Most new world species don't do this bool runs_away_fast; tarantula(string br, bool throws, int hc, bool b, bool runs){ breed = br; throws_hairs_readily = throws; if(hc != 0 && hc != 1 && hc != 2 && hc != 3) cout << "Warning: Unknown hair class " << hc << endl; hair_class = hc; bites = b; runs_away_fast = runs; } bool suitable_for_beginners(){ int score = 0; if(throws_hairs_readily) score += 1; if(hair_class == 0) score -= 1; if(hair_class == 3) score += 2; if(bites) score += 2; if(runs_away_fast) score += 1; if(score < 3) return true; return false; } }; int main(){ tarantula brown_sugar("Arizona Blond", false, 1, false, false); cout << "For Beginners: " << brown_sugar.suitable_for_beginners() << endl; tarantula curly("Something", true, 3, true, true); curly.bites = false; }