Question: Create a class called Warrior that stores a name, IQ (a whole number between 60 and 180), strength (a whole number between 1 and 100)

Create a class called Warrior that stores a name, IQ (a whole number between 60 and 180), strength (a whole number between 1 and 100) and a social clique (nerd, jock, prep, thug or freak) and has the following methods: Any constructors that you feel are appropriate. Any get and set methods as accessors (to return private data) or modifiers that you feel would be useful. A method called generateStats() that will generate the statistics for IQ and strength randomly depending on the social clique. socialClique IQ strength nerd 120-180 20-80 Nerds are smarter than they are strong. See Revenge of the Nerds for more on this. jock 80-140 50-100 Jocks are stronger than they are smart. prep 90-150 40-90 Middle of the road, but from the right side of the tracks. thug 60-90 80-100 A weapon makes them strong, but they dont have much upstairs. freak 60-180 1-100 The wild-card. The generateStats() method can be called in the constructor after you set the name and clique data fields. An overloaded toString() member function that will output all of the warriors information on the screen.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!