Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please compile using NetBeans IDE 1 - Objective The purpose of this assignment is for students to practice OOP concepts with the use of multiple

Please compile using NetBeans IDE

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

1 - Objective The purpose of this assignment is for students to practice OOP concepts with the use of multiple classes and inheritance in the Java environment - The program 2.1 Super class character The first class is the base class for the rest of the classes. This class will have four protected variables: string Type, String name, char gender, int hitPoints. You will need to create a default constructor that sets all values to defaults (i.e., Strings- null, char10', int 0.), and a constructor that takes four arguments to set the objects' four variables defined above. This class will contain an override to the toString () function that is present in every class created in Java. This overwritten function will return the type string.format . The format function on string will behave in the same way as System.out.format does to create the table headers (please refer to the examples in the end of the instruction about this format function) This class will contain a getType function that will return what subclass type the character is, that is, mob, townsperson, or player, described in the following. 1 - Objective The purpose of this assignment is for students to practice OOP concepts with the use of multiple classes and inheritance in the Java environment - The program 2.1 Super class character The first class is the base class for the rest of the classes. This class will have four protected variables: string Type, String name, char gender, int hitPoints. You will need to create a default constructor that sets all values to defaults (i.e., Strings- null, char10', int 0.), and a constructor that takes four arguments to set the objects' four variables defined above. This class will contain an override to the toString () function that is present in every class created in Java. This overwritten function will return the type string.format . The format function on string will behave in the same way as System.out.format does to create the table headers (please refer to the examples in the end of the instruction about this format function) This class will contain a getType function that will return what subclass type the character is, that is, mob, townsperson, or player, described in the following

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Marketing The Ultimate Marketing Tool

Authors: Edward L. Nash

1st Edition

0070460639, 978-0070460638

More Books

Students also viewed these Databases questions

Question

Their computer is similar ours.

Answered: 1 week ago

Question

=+ what roles should government play in them ?

Answered: 1 week ago

Question

=+ Why do we have markets and, according to economists,

Answered: 1 week ago