Question: I am struggling with this assignment, any help would be appreciated! This is Java by the way Design a class called Character containing the following

 I am struggling with this assignment, any help would be appreciated!This is Java by the way Design a class called Character containingthe following fields and methods: a. Private Data Fields i. name Stringrepresenting the character's name ii. type - String representing the character's type

I am struggling with this assignment, any help would be appreciated!

This is Java by the way

Design a class called Character containing the following fields and methods: a. Private Data Fields i. name String representing the character's name ii. type - String representing the character's type (hero, villain, etc.) b. Public Methods i. Constructor - creates a character with a specific name and type ii. Getter for the name and type data fields (no setters are needed) ii Method speak() - returns a string representing what a character says Design the subclasses Hero, Villain, Monster, and Droid a. Each must be a subclass of Character. b. Each subclass MUST override the speak() method in the Character class. @Override public String speak()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!