Question: You will be responsible for creating a system that manages heroes and their combat teams. Every hero hasSkills and can belong to a team of
You will be responsible for creating a system that manages heroes and their combat teams. Every hero hasSkills and can belong to a team of superheroes. Teams can be updated throughout theTime, and each hero has specific characteristics that must be programmed.You can use kotlin playground Part : Declaration of Heroes var and val Create two heroes using val immutable and one hero using var changeable The characteristics of these Heroes are:A name val: the name of the hero.B Secret identity val: civil name of the hero.C power var: the main power that can change over time.D force var: the hero's strength level to which can be changed during battles Initialise the heroes and change the power of one of them using the var throughout the work development.Part : Superhero Team Changeable and Immutable Lists Create a Team class that has a list of heroes. The team must be initialized with a listImmutable of heroes Add methods to the Team class to allow:A Add a hero the team grows over timeB Remove a hero when the hero abandons or is replacedC Use a changeable list to make these dynamic updates Create a team of heroes and add two more heroes to the team using the addition function, in addition to remove a hero at another time.Part : Classes and Heritage Create a base class called Heroi, which contains:A Attributes such as name, secret identity, power and strength.B A present method that prints a brief description of the hero name and powerC A fighting method that prints "Hero fighting with power: X where X is the name of the power of the Hero Create three subclasses of heroes who inherit from Heroi:A Flying Hero: hero with the ability to fly. Overwrite the fight method to indicate that it It's flying while fighting.B HeroForce: hero who has super strength. Overwrite the fight method to print that he uses Gross force.C Technological Hero: hero who uses technology. Overwrite the fight method to indicate that he uses Technological gadgets Create instances of each of these subclasses, use the present method and make the heroes fight With your specific skills.Part : Overloading Properties and Functions Modify the Heroi class to include a resistance property a number from to and Overwrite in the subclasses:A For the HeroStrength, resistance should increase by after each fight.B For the Flying Hero, the resistance decreases by after each flight.C For the Technological Hero, the resistance is adjusted depending on the use of the gadgets, increasing In Overwrite the fight function in each subclass so that it also shows the current value of the Hero's resistance.Requirements The code must be written in Kotlin and executed without errors. Each class and method must be correctly implemented according to the requirementsSpecified.You will be responsible for creating a system that manages heroes and their combat teams. Every hero hasSkills and can belong to a team of superheroes. Teams can be updated throughout theTime, and each hero has specific characteristics that must be programmed.You can use kotlin playground Part : Declaration of Heroes var and val Create two heroes using val immutable and one hero using var changeable The characteristics of theseHeroes are:A name val: the name of the hero.B Secret identity val: civil name of the hero.C power var: the main power that can change over time.D force var: the hero's strength level to which can be changed during battles Initialise the heroes and change the power of one of them using the var throughout theWork development.Part : Superhero Team Changeable and Immutable Lists Create a Team class that has a list of heroes. The team must be initialized with a listImmutable of heroes Add methods to the Team class to allow:A Add a hero the team grows over timeB Remove a hero when the hero abandons or is replacedC Use a changeable list to make these dynamic updates Create a team of heroes and add two more heroes to the team using the addition function, in addition toRemove a hero at another time.Part : Classes and Heritage Create a base class called Heroi, which contains:A Attributes such as name, secret identity, power and strength.B A present method that prints a brief description of the hero name and powerC A fighting method that prints "Hero fighting with power: X where X is the name of the power of theHero Create three subclasses of heroes who inherit from Heroi:A Flying Hero: hero with the ability to fly. Overwrite the fight method to indicate that itIt's flying while fighting.B HeroForce: hero who has super strength. Overwrite the fight method to print that he usesGross force.C Technological Hero: hero who uses technology. Overwrite the fight method to indicate that he usesTechnological gadgets Create instances of each of these subclasses, use the present method and make the heroes fightWith your specific skills.Part : Overloading Properties and Functions Modify the Heroi class to include a resistance property a number from to andOverwrite in the subclasses:A For the HeroStrength, resistance should increase by after each fight.B For the Flying Hero, the resistance decreases by after each flight.C For the Technological Hero, the resistance is adjusted depending on the use of the gadgets, increasingIn Overwrite the struggle function in each subclass so that it also shows the current value of theHero's resistance.Requirements The code must be written in Kotlin and executed without errors. Each class and method must be correctly implemented according to the requirements Specified. Lists must be handled as requested immutable and changeable The inheritance and overload of methods and properties must be properly applied Lists must be handled as requested immutable and changeable The inheritance and overload of methods and properties must be properly applied
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
