Create an abstract class named Monster. It should contain a single abstract method, areaOfDestruction, which returns a double. Create a class named Robot that extends Monster. Implement the areaOfDestruction() method inherited from Monster, but don't add any logic yet. Just retum 0. Robot should have three private member variables, X, y, and power. Set those in the constructor.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 20RQ
icon
Related questions
Question
I need the answer as soon as possible
Create an abstract class named Monster. It should contain a single abstract method,
areaOfDestruction, which returns a double.
Create a class named Robot that extends Monster. Implement the areaOfDestruction() method
inherited from Monster, but don't add any logic yet. Just return 0. Robot should have three
private member variables, X, V, and power. Set those in the constructor.
Transcribed Image Text:Create an abstract class named Monster. It should contain a single abstract method, areaOfDestruction, which returns a double. Create a class named Robot that extends Monster. Implement the areaOfDestruction() method inherited from Monster, but don't add any logic yet. Just return 0. Robot should have three private member variables, X, V, and power. Set those in the constructor.
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Developing computer interface
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,