Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

UndergraduateStudent: The calculateFinalGrade method takes 3 doubles, each of which will be an exam grade out of 1 0 0 . Each exam is worth

UndergraduateStudent: The calculateFinalGrade method takes 3 doubles, each of which will be an exam grade out
of 100. Each exam is worth 33% of their final grade. This method sets the finalGrade attribute, which is the average
of the three test grades.
GraduateStudent: The calculateFinalGrade method takes 3 doubles, each of which will be an exam grade out of
100. The first two exams are worth 25% of the final grade, and the third exam is worth 50% of the final grade. This
method sets the finalGrade attribute, which is the average of the three test grades.
Player: The attack method returns a double value that is a result of the following calculation: strength * dexterity +
(intelligence /2). The defend method returns a double that is the result of the following calculation: strength *
dexterity +(strength /2)
Archer: The shootArrow method accepts no parameters but instead calls the attack method is then multiplied by the
rangedDamage and the result is returned as a double.
Barbarian: The shieldBash method accepts no parameters but instead calls the attack method is then multiplied by
the shieldDamage and the result is returned as a double.
Rogue: The backstab method accepts no parameters but instead calls the attack method is then multiplied by the
stabStrength and the result is returned as a double.
Warlock: The arcaneFire method accepts no parameters but instead calls the attack method is then multiplied by the
magicDamage and the result is returned as a double.
SpaceCraft: The unloadCargo method displays all items in the cargohold and then removes them. The loadCargo
method accepts a String as a parameter and adds it to the cargohold if there is space. The setCargoholdSize
method sets the size of the cargohold and also initializes the array. If the array has not been initialized when another
method is called you should default the cargohold to size 10.
SpaceFighter: The weaponsGrid should be initialized in the default constructor to size 10. The addWeapon method
should accept a String as a parameter and add that string to the weaponsGrid if there is space. If there is no space
print a message that says Cannot add weapon. Grid is currently full. The removeWeapon method should accept a
string and remove that weapon from the weapons grid. If the weapon does not exist within the grid print a message
that says Weapon cannot be found and cannot be removed
SpaceTanker: The addFuel method accepts a String and an integer as parameters. The String determines which
type of fuel is being added and the int determines how much fuel. The fuel stored at index 0 is hydrogen, index 1 is
ethanol, 2 is ammonia, and 3 is plasma. No other types of fuel can be stored. The dumpFuel method removes all of
the stored fuel and sets the array values to 0.
SpaceTransporter: The sortCargohold method will sort all items in the cargohold in alphabetical order (A-Z) ignoring
capitalization. You must use an insertion sort to complete this task. The searchCargohold method will accept a
String as a parameter and return in integer that is the location of the item you are searching for. If no item is found,
return -1.
SpaceDrill: The operateDrill method will accept no parameters but will return a String of the type of item drilled. This
item type will be determined by the maximum depth this drill can operate at. If the maximum depth is less than 50 it
will return coal, less than 100 will return iron, less than 200 will return titanium, and greater than 200 will return
palladium.
SpaceCarrier: The loadShip method will accept a String as a parameter and will add that string (ship name) to the
loadingDock. The unloadShip method will accept a String and will remove that ship from the loadingDock. Both of
these methods will return a Boolean that will indicate whether or not the action was completed successfully. The
loadingDock should be initialized in your default constructor to the size of 10.
Triangle: If any of the three angles entered are 90 degrees exactly, set the isRightTriangle boolean to true within
your mutators for the angles. If the sum of the three angles are not 180 degrees you should set the isValid boolean
to false, otherwise it should be true. The calculateArea method should calculate the area of a valid triangle. The
calculatePerimeter method should calculate the perimeter of a valid triangle.
Circle: The calculateArea method should calculate the area of a valid circle. The calculatePerimeter method should
calculate the perimeter of a valid circle. If no radius has been set, default the value to 1.
Rectangle: The calculateArea method should calculate the area of a valid rectangle. The calculatePerimeter method
should calculate the perimeter of a valid rectangle. If the rectangle is a square you should set the isSquare attribute
to true.
Pet: The speak method should return a string that says Buzzz;
Dog: The speak method should return a String that is a variation of the w
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions