Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started