Question
I need help on solving this assignment Review the class called People We will partially implement that class in Java. For this purpose, we will
I need help on solving this assignment
Review the class called "People"
We will partially implement that class in Java. For this purpose, we will consider these attributes on "People" class.
people_id stage_name first_name last_name
[1] Implement a Java class called "People"
[2] You need to have these two methods
toString( ) method -> returns the string representation containing the above 4 attributes
equals( ) method --> two people are equal only when stage_name, first_name, and last_name match between two People
[3] Also, make the "People" class implement "Comparable" interface.
Implement the "compareTo( )" method.
The "stage_name" is ordered lexicographically by the compareTo( ) method.
[4] Implement the main( ) method to create some people objects and test the above three methods
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