Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a class Java class called Archer that has the following attributes: Archer Health - Integer Intelligence - Integer Dexterity - Integer Strength - Integer

Create a class Java class called Archer that has the following attributes:

Archer
Health - Integer
Intelligence - Integer
Dexterity - Integer
Strength - Integer
Stamina - Integer
Archer()
Archer(Health, Intelligence, Dexterity, Strength, Stamina)
getHealth() - Integer
setHealth(Integer) - Void
getIntelligence() - Integer
setIntelligence(Integer) - Void
getDexterity() - Integer
setDexterity(Integer) - Void
getStrength() - Integer
setStrength(Integer) - Void
getStamina() - Integer
setStamina(Integer) - Void
getDamagePerRangedAttack() - Double
getDamagePerMeleeAttack() - Double
toString() - String

Notes:

All attributes should not be allowed to be set below 0.

The getDamagePerRangedAttack() method will return a double value. This value is a result of the math: (dexterity * 0.5 + intelligence * 0.8). You should not directly reference any attributes and should instead use the get methods for each attribute.

The getDamagePerMeleeAttack() method will return a double value. This value is a result of the math: (dexterity * 0.5 + strength * 0.8). You should not directly reference any attributes and should instead use the get methods for each attribute.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle9i Database Administrator Implementation And Administration

Authors: Carol McCullough-Dieter

1st Edition

0619159006, 978-0619159009

Students also viewed these Databases questions

Question

How can plotting the data help improve cost estimation?

Answered: 1 week ago

Question

How does convertible debt differ from convertible preferred stock?

Answered: 1 week ago