Test the defined class by performing the following operations in a main function: • create a list containing 4 Hero objects and 4 mutated hero objects (some sample data given below) • print each of the list objects using the special below) • find the hero or mutated hero with the highest number of challenges met and print their alter ego print the total number of heroes/mutated heroes created, using the class variable str_) method on each object (see output • print the total number of challenges successfully met by all the Federation members, using the class variable Hint: This main function can be done using one loop and one if statement.
Test the defined class by performing the following operations in a main function: • create a list containing 4 Hero objects and 4 mutated hero objects (some sample data given below) • print each of the list objects using the special below) • find the hero or mutated hero with the highest number of challenges met and print their alter ego print the total number of heroes/mutated heroes created, using the class variable str_) method on each object (see output • print the total number of challenges successfully met by all the Federation members, using the class variable Hint: This main function can be done using one loop and one if statement.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question

Transcribed Image Text:Question 2 (c)
Test the defined class by performing the following operations in a main function:
create a list containing 4 Hero objects and 4 mutated hero objects (some sample data given below)
print each of the list objects using the special3tr_() method on each object (see output
below)
Superhero ID: 3334
Real Life Name: Diana of Themyscira
Alter Ego: Wonder Woman
First Appeared: 1941
Known For: superhuman powers
Tool of Strength: lasso of truth
Number of Challenges Met: 30
find the hero or mutated hero with the highest number of challenges met and print their alter ego
print the total number of heroes/mutated heroes created, using the class variable
Superhero ID: 5545
Real Life Name: Bruce Banner
print the total number of challenges successfully met by all the Federation members, using the
class variable
Alter Ego: Hulk
First Appeared: 1962
Known For: green rage machine
Tool of Strength: N/A
Number of Challenges Met: 45
Day Job: scientist
Mutated By: gamma rays
Hint: This main function can be done using one loop and one if statement.
Sample data/output:
Members of the Superherces Federation
Superhero ID: 1234
Real Life Name: Bruce Wayne
Alter Ego: Batman
First Appeared: 1939
Known For: fighting skills
Tool of Strength: bat-related vehicle
Number of Challenges Met: 40
Superhero ID: 4434
Real Life Name: Steve Rogers
Alter Ego: Captain America
First Appeared: 1941
Known For: enhanced to the peak of human perfection
Tool of Strength: N/A
Number of Challenges Met: 56
Day Job: artist
Mutated By: super-soldier serum
Superhero ID: 1543
Real Life Name: Hal Jordan
Alter Ego: Green Lantern
First Appeared: 1940
Known For: able to craft anything he can envision out of sheer
willpower
Superhero ID: 6424
Real Life Name: Peter Parker
Tool of Strength: power ring
Number of Challenges Met: 25
Alter Ego: Spider-Man
First Appeared: 1962
Known For: spider related abilities
Tool of Strength: N/A
Number of Challenges Met: 50
Day Job: freelance photographer
Mutated By: radioactive spider bite
Superhero ID: 2234
Real Life Name: T'Challa
Alter Ego: Black Panther
First Appeared: 1966
Known For: enhanced abilities
Tool of Strength: Wakandan technology
Number of Challenges Met: 65
Superhero ID: 7777
Real Life Name: Rex Mason
Alter Ego: Metamorpho

Transcribed Image Text:Alter Ego: Metamorpho
First Appeared: 1965
Known For: can shapeshift into any element
Tool of Strength: N/A
Number of Challenges Met: 30
Day Job: mercenary
Mutated By: radioactivity of an ancient meteor
Superhero with most experience meeting challenges: Black Panther
Total number of heroes in the Federation:
Total number of challenges completed:
341
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 3 images

Recommended textbooks for you

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY