SlideShare a Scribd company logo
Pls help with this code using IntelliJ
The Inhabitants of Foon In town of Hogsface in the magical land of Foon there are three kinds of
Monsters: Orcs, Goblins, and Manticores. Attributes All Monsters have a clan affiliation that cannot
change. They all have numeric ratings for three basic attributes that describe their abilities:
Ferocity, Defense, and Magic. These attributes can be raised or lowered by one point at a time,
within the range 0 to 20 . The clan affiliation and basic attributes of a Monster are obvious and can
be easily retrieved by anyone. All Monsters have 0 or more treasure. They all have a numeric
health rating. If they have health >0 they are alive, otherwise they are dead. The clan affiliation of
a Monster cannot change, unless that monster is a Manticore - they're fickle and change clans all
the time. Every Goblin has exactly one other Goblin that is its sworn enemy. This enemy is fixed at
birth and never changes, even if it dies.An Orc can be Infantry or Warlord. Warlords have an
integer leadership rating from 1 to 5 . This rating can be raised or lowered by 1 point at a time.
Every warlord has exactly 5 Infantry in his or her command, and every Infantry member has
exactly one Warlord that commands it. The assignments of Infantry to Warlord are frequently
changed. Abilities Attack and Defense When a Monster attacks, it produces a battle score equal to
the average of its Ferocity, Defense, and Magic scores. If its opponent's attack score is higher, it
loses health points equal to the difference in attack scores. (e.g. if a Manticore with an attack
score of 18.5 fights a Goblin with an attack score of 10.7, the Goblin will lose 7.8 health.)When a
Manticore or a Warlord attacks, its battle score is greater than a normal Monster's score by a
factor of 1.5 . Dead Monsters cannot attack or defend themselves. Healing When a Warlord
sounds its battle cry, it produces a health boost score equal to its leadership rating multiplied by 5
and raises the health score of each of the Infantry in its command by that amount. Dead Warlords
cannot sound their battle cry and dead Infantry cannot be healed. Treasure A monster can gain or
lose treasure as the result of a fight. When a warlord gains treasure, it gets a+1 leadership boost
for every 10 points of treasure it receives. A Dead monster cannot gain treasure.The Design Draw
a UML class diagram for a set of classes to represent the Monsters of Foon. Make sure to
represent all instance variables, parameters, return values, and relationships between classes.
You can create your UML diagram on paper, using UMLet or using draw.io. If you want to use a
different piece of software, check with your instructor first. Use inheritance to eliminate code
duplication and overriding to avoid if statements (e.g. don't have an if statement to check if the
monster is a Manticore before calculating its attack score). Use encapsulation to restrict access to
the instance variables as much as possible. Include the minimum set of methods to implement the
world as described above. Include two constructors for each class: one that sets all instance
variables, and one that sets just the clan affiliation and fills in default or random values for
everything else. Include a tostring () method for every Monster type that prints its class name, its
clan affiliation, whether it is alive or dead, and its ratings (ferocity, magic, etc.). Make sure the
output is easy to read.

More Related Content

More from abhishekelectronic

t1PointUsingacoloredpencilShowtheAppaladbydr.pdf
t1PointUsingacoloredpencilShowtheAppaladbydr.pdft1PointUsingacoloredpencilShowtheAppaladbydr.pdf
t1PointUsingacoloredpencilShowtheAppaladbydr.pdf
abhishekelectronic
 
Please provide a different answer than the one that has alre.pdf
Please provide a different answer than the one that has alre.pdfPlease provide a different answer than the one that has alre.pdf
Please provide a different answer than the one that has alre.pdf
abhishekelectronic
 
13 Let be the Golden Ratio Which of the following express.pdf
13 Let  be the Golden Ratio Which of the following express.pdf13 Let  be the Golden Ratio Which of the following express.pdf
13 Let be the Golden Ratio Which of the following express.pdf
abhishekelectronic
 
Pyrite FeS2is an isometric mineral and a metal sulfide W.pdf
Pyrite FeS2is an isometric mineral and a metal sulfide  W.pdfPyrite FeS2is an isometric mineral and a metal sulfide  W.pdf
Pyrite FeS2is an isometric mineral and a metal sulfide W.pdf
abhishekelectronic
 
Project Title Project Objectives List project objective.pdf
Project Title Project Objectives  List project objective.pdfProject Title Project Objectives  List project objective.pdf
Project Title Project Objectives List project objective.pdf
abhishekelectronic
 
On which end of a growing premRNA transcript are nucleotide.pdf
On which end of a growing premRNA transcript are nucleotide.pdfOn which end of a growing premRNA transcript are nucleotide.pdf
On which end of a growing premRNA transcript are nucleotide.pdf
abhishekelectronic
 
Let X Exp exponential random variable with parameter g.pdf
Let X  Exp exponential random variable with parameter  g.pdfLet X  Exp exponential random variable with parameter  g.pdf
Let X Exp exponential random variable with parameter g.pdf
abhishekelectronic
 
Kendi kendini yneten isel olarak motive olmu aktif bir .pdf
Kendi kendini yneten isel olarak motive olmu aktif bir .pdfKendi kendini yneten isel olarak motive olmu aktif bir .pdf
Kendi kendini yneten isel olarak motive olmu aktif bir .pdf
abhishekelectronic
 
La gran mayora de la poblacin asocia Blockchain con la cri.pdf
La gran mayora de la poblacin asocia Blockchain con la cri.pdfLa gran mayora de la poblacin asocia Blockchain con la cri.pdf
La gran mayora de la poblacin asocia Blockchain con la cri.pdf
abhishekelectronic
 
la valoracin inicial de los recursos naturales puede inclui.pdf
la valoracin inicial de los recursos naturales puede inclui.pdfla valoracin inicial de los recursos naturales puede inclui.pdf
la valoracin inicial de los recursos naturales puede inclui.pdf
abhishekelectronic
 
Instrucciones lea atentamente el estudio de caso El auge y.pdf
Instrucciones lea atentamente el estudio de caso El auge y.pdfInstrucciones lea atentamente el estudio de caso El auge y.pdf
Instrucciones lea atentamente el estudio de caso El auge y.pdf
abhishekelectronic
 
Con referencia al estudio de caso a continuacin responda l.pdf
Con referencia al estudio de caso a continuacin responda l.pdfCon referencia al estudio de caso a continuacin responda l.pdf
Con referencia al estudio de caso a continuacin responda l.pdf
abhishekelectronic
 
Assignment is a case essay and requires you to obtain suffic.pdf
Assignment is a case essay and requires you to obtain suffic.pdfAssignment is a case essay and requires you to obtain suffic.pdf
Assignment is a case essay and requires you to obtain suffic.pdf
abhishekelectronic
 
History Daniel McDonald a 68yearold white male with a 40.pdf
History Daniel McDonald a 68yearold white male with a 40.pdfHistory Daniel McDonald a 68yearold white male with a 40.pdf
History Daniel McDonald a 68yearold white male with a 40.pdf
abhishekelectronic
 
Combina las oraciones para crear un prrafo coherente Aunq.pdf
Combina las oraciones para crear un prrafo coherente  Aunq.pdfCombina las oraciones para crear un prrafo coherente  Aunq.pdf
Combina las oraciones para crear un prrafo coherente Aunq.pdf
abhishekelectronic
 
Discuss the different characteristics between an aquatic ani.pdf
Discuss the different characteristics between an aquatic ani.pdfDiscuss the different characteristics between an aquatic ani.pdf
Discuss the different characteristics between an aquatic ani.pdf
abhishekelectronic
 
As the Internet of Things IOT develops it seems that the .pdf
As the Internet of Things IOT develops it seems that the .pdfAs the Internet of Things IOT develops it seems that the .pdf
As the Internet of Things IOT develops it seems that the .pdf
abhishekelectronic
 
1 You are walking barefoot in your bedroom and step on a ta.pdf
1 You are walking barefoot in your bedroom and step on a ta.pdf1 You are walking barefoot in your bedroom and step on a ta.pdf
1 You are walking barefoot in your bedroom and step on a ta.pdf
abhishekelectronic
 
Buisness Plan Financial Planner When preparing the critical.pdf
Buisness Plan Financial Planner When preparing the critical.pdfBuisness Plan Financial Planner When preparing the critical.pdf
Buisness Plan Financial Planner When preparing the critical.pdf
abhishekelectronic
 
Bankada bir milyon dolarnz olacak kadar anslsnz Sadece c.pdf
Bankada bir milyon dolarnz olacak kadar anslsnz Sadece  c.pdfBankada bir milyon dolarnz olacak kadar anslsnz Sadece  c.pdf
Bankada bir milyon dolarnz olacak kadar anslsnz Sadece c.pdf
abhishekelectronic
 

More from abhishekelectronic (20)

t1PointUsingacoloredpencilShowtheAppaladbydr.pdf
t1PointUsingacoloredpencilShowtheAppaladbydr.pdft1PointUsingacoloredpencilShowtheAppaladbydr.pdf
t1PointUsingacoloredpencilShowtheAppaladbydr.pdf
 
Please provide a different answer than the one that has alre.pdf
Please provide a different answer than the one that has alre.pdfPlease provide a different answer than the one that has alre.pdf
Please provide a different answer than the one that has alre.pdf
 
13 Let be the Golden Ratio Which of the following express.pdf
13 Let  be the Golden Ratio Which of the following express.pdf13 Let  be the Golden Ratio Which of the following express.pdf
13 Let be the Golden Ratio Which of the following express.pdf
 
Pyrite FeS2is an isometric mineral and a metal sulfide W.pdf
Pyrite FeS2is an isometric mineral and a metal sulfide  W.pdfPyrite FeS2is an isometric mineral and a metal sulfide  W.pdf
Pyrite FeS2is an isometric mineral and a metal sulfide W.pdf
 
Project Title Project Objectives List project objective.pdf
Project Title Project Objectives  List project objective.pdfProject Title Project Objectives  List project objective.pdf
Project Title Project Objectives List project objective.pdf
 
On which end of a growing premRNA transcript are nucleotide.pdf
On which end of a growing premRNA transcript are nucleotide.pdfOn which end of a growing premRNA transcript are nucleotide.pdf
On which end of a growing premRNA transcript are nucleotide.pdf
 
Let X Exp exponential random variable with parameter g.pdf
Let X  Exp exponential random variable with parameter  g.pdfLet X  Exp exponential random variable with parameter  g.pdf
Let X Exp exponential random variable with parameter g.pdf
 
Kendi kendini yneten isel olarak motive olmu aktif bir .pdf
Kendi kendini yneten isel olarak motive olmu aktif bir .pdfKendi kendini yneten isel olarak motive olmu aktif bir .pdf
Kendi kendini yneten isel olarak motive olmu aktif bir .pdf
 
La gran mayora de la poblacin asocia Blockchain con la cri.pdf
La gran mayora de la poblacin asocia Blockchain con la cri.pdfLa gran mayora de la poblacin asocia Blockchain con la cri.pdf
La gran mayora de la poblacin asocia Blockchain con la cri.pdf
 
la valoracin inicial de los recursos naturales puede inclui.pdf
la valoracin inicial de los recursos naturales puede inclui.pdfla valoracin inicial de los recursos naturales puede inclui.pdf
la valoracin inicial de los recursos naturales puede inclui.pdf
 
Instrucciones lea atentamente el estudio de caso El auge y.pdf
Instrucciones lea atentamente el estudio de caso El auge y.pdfInstrucciones lea atentamente el estudio de caso El auge y.pdf
Instrucciones lea atentamente el estudio de caso El auge y.pdf
 
Con referencia al estudio de caso a continuacin responda l.pdf
Con referencia al estudio de caso a continuacin responda l.pdfCon referencia al estudio de caso a continuacin responda l.pdf
Con referencia al estudio de caso a continuacin responda l.pdf
 
Assignment is a case essay and requires you to obtain suffic.pdf
Assignment is a case essay and requires you to obtain suffic.pdfAssignment is a case essay and requires you to obtain suffic.pdf
Assignment is a case essay and requires you to obtain suffic.pdf
 
History Daniel McDonald a 68yearold white male with a 40.pdf
History Daniel McDonald a 68yearold white male with a 40.pdfHistory Daniel McDonald a 68yearold white male with a 40.pdf
History Daniel McDonald a 68yearold white male with a 40.pdf
 
Combina las oraciones para crear un prrafo coherente Aunq.pdf
Combina las oraciones para crear un prrafo coherente  Aunq.pdfCombina las oraciones para crear un prrafo coherente  Aunq.pdf
Combina las oraciones para crear un prrafo coherente Aunq.pdf
 
Discuss the different characteristics between an aquatic ani.pdf
Discuss the different characteristics between an aquatic ani.pdfDiscuss the different characteristics between an aquatic ani.pdf
Discuss the different characteristics between an aquatic ani.pdf
 
As the Internet of Things IOT develops it seems that the .pdf
As the Internet of Things IOT develops it seems that the .pdfAs the Internet of Things IOT develops it seems that the .pdf
As the Internet of Things IOT develops it seems that the .pdf
 
1 You are walking barefoot in your bedroom and step on a ta.pdf
1 You are walking barefoot in your bedroom and step on a ta.pdf1 You are walking barefoot in your bedroom and step on a ta.pdf
1 You are walking barefoot in your bedroom and step on a ta.pdf
 
Buisness Plan Financial Planner When preparing the critical.pdf
Buisness Plan Financial Planner When preparing the critical.pdfBuisness Plan Financial Planner When preparing the critical.pdf
Buisness Plan Financial Planner When preparing the critical.pdf
 
Bankada bir milyon dolarnz olacak kadar anslsnz Sadece c.pdf
Bankada bir milyon dolarnz olacak kadar anslsnz Sadece  c.pdfBankada bir milyon dolarnz olacak kadar anslsnz Sadece  c.pdf
Bankada bir milyon dolarnz olacak kadar anslsnz Sadece c.pdf
 

Recently uploaded

Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
ArianaBusciglio
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
What is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptxWhat is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptx
christianmathematics
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
Fresher’s Quiz 2023 at GMC Nizamabad.pptx
Fresher’s Quiz 2023 at GMC Nizamabad.pptxFresher’s Quiz 2023 at GMC Nizamabad.pptx
Fresher’s Quiz 2023 at GMC Nizamabad.pptx
SriSurya50
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
Delivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and TrainingDelivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and Training
AG2 Design
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
MERN Stack Developer Roadmap By ScholarHat PDF
MERN Stack Developer Roadmap By ScholarHat PDFMERN Stack Developer Roadmap By ScholarHat PDF
MERN Stack Developer Roadmap By ScholarHat PDF
scholarhattraining
 

Recently uploaded (20)

Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
What is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptxWhat is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptx
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
Fresher’s Quiz 2023 at GMC Nizamabad.pptx
Fresher’s Quiz 2023 at GMC Nizamabad.pptxFresher’s Quiz 2023 at GMC Nizamabad.pptx
Fresher’s Quiz 2023 at GMC Nizamabad.pptx
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
Delivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and TrainingDelivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and Training
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
MERN Stack Developer Roadmap By ScholarHat PDF
MERN Stack Developer Roadmap By ScholarHat PDFMERN Stack Developer Roadmap By ScholarHat PDF
MERN Stack Developer Roadmap By ScholarHat PDF
 

Pls help with this code using IntelliJ The Inhabitants of F.pdf

  • 1. Pls help with this code using IntelliJ The Inhabitants of Foon In town of Hogsface in the magical land of Foon there are three kinds of Monsters: Orcs, Goblins, and Manticores. Attributes All Monsters have a clan affiliation that cannot change. They all have numeric ratings for three basic attributes that describe their abilities: Ferocity, Defense, and Magic. These attributes can be raised or lowered by one point at a time, within the range 0 to 20 . The clan affiliation and basic attributes of a Monster are obvious and can be easily retrieved by anyone. All Monsters have 0 or more treasure. They all have a numeric health rating. If they have health >0 they are alive, otherwise they are dead. The clan affiliation of a Monster cannot change, unless that monster is a Manticore - they're fickle and change clans all the time. Every Goblin has exactly one other Goblin that is its sworn enemy. This enemy is fixed at birth and never changes, even if it dies.An Orc can be Infantry or Warlord. Warlords have an integer leadership rating from 1 to 5 . This rating can be raised or lowered by 1 point at a time. Every warlord has exactly 5 Infantry in his or her command, and every Infantry member has exactly one Warlord that commands it. The assignments of Infantry to Warlord are frequently changed. Abilities Attack and Defense When a Monster attacks, it produces a battle score equal to the average of its Ferocity, Defense, and Magic scores. If its opponent's attack score is higher, it loses health points equal to the difference in attack scores. (e.g. if a Manticore with an attack score of 18.5 fights a Goblin with an attack score of 10.7, the Goblin will lose 7.8 health.)When a Manticore or a Warlord attacks, its battle score is greater than a normal Monster's score by a factor of 1.5 . Dead Monsters cannot attack or defend themselves. Healing When a Warlord sounds its battle cry, it produces a health boost score equal to its leadership rating multiplied by 5 and raises the health score of each of the Infantry in its command by that amount. Dead Warlords cannot sound their battle cry and dead Infantry cannot be healed. Treasure A monster can gain or lose treasure as the result of a fight. When a warlord gains treasure, it gets a+1 leadership boost for every 10 points of treasure it receives. A Dead monster cannot gain treasure.The Design Draw a UML class diagram for a set of classes to represent the Monsters of Foon. Make sure to represent all instance variables, parameters, return values, and relationships between classes. You can create your UML diagram on paper, using UMLet or using draw.io. If you want to use a different piece of software, check with your instructor first. Use inheritance to eliminate code duplication and overriding to avoid if statements (e.g. don't have an if statement to check if the monster is a Manticore before calculating its attack score). Use encapsulation to restrict access to the instance variables as much as possible. Include the minimum set of methods to implement the world as described above. Include two constructors for each class: one that sets all instance variables, and one that sets just the clan affiliation and fills in default or random values for everything else. Include a tostring () method for every Monster type that prints its class name, its clan affiliation, whether it is alive or dead, and its ratings (ferocity, magic, etc.). Make sure the output is easy to read.