Question: Create a main class: This class should be in the default package (root directory) Write the MainKingdom Class with a main method that instantiates the
Create a main class:
This class should be in the default package (root directory)
Write the MainKingdom Class with a main method that instantiates the Human class and demonstrates your implementation of the class - calling all the available methods for each. Feel free to create additional methods in the MainKingdom class (or other classes) to do all these calls if that makes this easier.
Human class:
package animal.kingdom; public class Human { private String name; private Human(String name) { this.name = name; } public void bendThumb() { System.out.println(this.name + " is bending their thumbs"); } public String getName() { return name; } } Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
