Question: Write a driver program that will create 2 warrior objects, have the user enter their information (and thus set the Warriors private data fields by
Write a driver program that will create 2 warrior objects, have the user enter their information (and thus set the Warriors private data fields by way of constructor or set methods) and then have the warriors fight to the death. Heres how you determine the winner: The warrior with the higher strength wins, unless the other warriors IQ is more than 20 points higher, in which case the smarter warrior outsmart their opponent and wins.
Given the following:
Warrior 1 Warrior 2
IQ strength IQ strength
100 34 90 65 Warrior 2 wins on strength
130 34 90 65 Warrior 1 wins by IQ
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
