Description After applying, you have landed a job as a character programmer for
ID: 3755510 • Letter: D
Question
Description After applying, you have landed a job as a character programmer for the company that recently released the latest MMORPG: World of Guild Warcraft Wars 17: The Path to the Exalted Kingdom of Fire, Ultra Deluxe Collector's Edition (with bonus character hats, socks, and lederhosen). The testing game engine is built in Java and the company has asked for character type mockups to begin balancing and testing with a default party with default initial values for a specific boss encounter subsystem before moving development to the production game engine. Implement the following Java classes based on the descriptions provided. CharacterType is the parent class with four child classes: Warrior, Guardian, Mage, and Necromancer. The parent class has a name, level, health pool, and a SpecialSkill which is its own class with a name and cooldown property) that grants certain abilities. Each child class has a unique property with an associated numeric value. Note that SpecialSkills are not unique to any character type. The CharacterType class should contain: . A String data member named name that contains the name of the character. A String data member named characterType that contains the type of class(Warrior, Mage, etc.). An int data member named level for the character's level. . An int data member named healthPool for the character's health pool. A SpecialSkill member named specialSkill that is an instance of the Specialskill class. . A default no-arg constructor that creates a default CharacterType. Default for name is "Frodo Jones". level and healthPool is 0. specialSkillis a defaut instance created using SpecialSkil'sdefault constructor. o 2 o Accessor and mutator methods for all data members. A toString) method that returns a String indicating the character name, character type, level, base health pool as well as the result of calling specialSkill's toString() method. See sample output for the needed format. 1Only available with preorder through Kwality-mart, socks only with purchase of Super Ultra Deluxe Collector's Edition, lederhosen only with purchase of Mega Super Ultra Deluxe Collector's EditionExplanation / Answer
SpecialSkill.java
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package world.of.guild.warcraft.wars;
/**
*
* @author Jay
*/
public class SpecialSkill
{
private String name="";
private int cooldown=0;
public SpecialSkill()
{
this.name="";
this.cooldown=0;
}
public void setName(String name)
{
this.name=name;
}
public void setCooldown(int cooldown)
{
this.cooldown=0;
}
public String getName()
{
return this.name;
}
public int getCooldown()
{
return this.cooldown;
}
@Override
public String toString()
{
return "Special Skill: "+this.name+" ("+this.cooldown+"s cooldown)";
}
}
CharacterType.java
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package world.of.guild.warcraft.wars;
/**
*
* @author Jay
*/
public class CharacterType
{
private String name,characterType;
private int level,healthPool;
private SpecialSkill spe1;
public CharacterType()
{
this.name ="Frodo Jones";
this.healthPool=this.level=0;
spe1=new SpecialSkill();
}
public void setName(String name)
{
this.name=name;
}
public void setCharacterType(String Cname)
{
this.characterType=Cname;
}
public void setLevel(int level)
{
this.level=level;
}
public void setHealthPool(int hPool)
{
this.healthPool=hPool;
}
public void setSpcialSkillName(String name)
{
spe1.setName(name);
}
public void setSpecialSkillCoolDown(int cooldown)
{
spe1.setCooldown(cooldown);
}
@Override
public String toString()
{
String str=spe1.toString();
return (this.name+", "+this.characterType+" Level "+this.level+" ("+this.healthPool+" HP) "+str);
}
}
Warrior.java
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package world.of.guild.warcraft.wars;
/**
*
* @author Jay
*/
public class Warrior extends CharacterType
{
private int rage;
public Warrior()
{
this.setSpcialSkillName("Fury");
this.setSpecialSkillCoolDown(180);
this.setName("Slashy McSlshherson");
this.setLevel(100);
this.setHealthPool(900);
this.rage=95;
}
@Override
public String toString()
{
String str1;
str1=super.toString();
return str1+" Rage "+this.rage;
}
}
Gurdian.java
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package world.of.guild.warcraft.wars;
/**
*
* @author Jay
*/
public class Gurdian extends CharacterType
{
private int healingPower;
public Gurdian()
{
this.healingPower=90;
this.setSpcialSkillName("Protection");
this.setSpecialSkillCoolDown(90);
this.setName("Arthur");
this.setLevel(100);
this.setHealthPool(1000);
}
@Override
public String toString()
{
String str=super.toString();
return str+" Healing Power: "+this.healingPower;
}
}
Mage.java
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package world.of.guild.warcraft.wars;
/**
*
* @author Jay
*/
public class Mage extends CharacterType
{
private int mana;
public Mage()
{
this.mana=100;
this.setSpcialSkillName("Fire Strom");
this.setSpecialSkillCoolDown(120);
this.setName("Sillas Majeek de Orienia");
this.setLevel(100);
this.setHealthPool(600);
}
@Override
public String toString()
{
String str=super.toString();
return str+" Mana: "+this.mana;
}
}
Necromencer.java
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package world.of.guild.warcraft.wars;
/**
*
* @author Jay
*/
public class Necromencer extends CharacterType
{
private int lifeForce;
public Necromencer()
{
this.lifeForce=15;
this.setSpcialSkillName("Death Magic");
this.setSpecialSkillCoolDown(60);
this.setName("Drgon Upgrafes");
this.setLevel(100);
this.setHealthPool(850);
}
@Override
public String toString()
{
String str=super.toString();
return str+" Life force: "+this.lifeForce;
}
}
uploding the last main class please wait because of this is a to big program to complete in 2 hors so i m doing the main class please wait will upload the main class as soon possible. thank you please do not thumbs down. thanks again.