Question: . . 1. Create a Person class with the following attributes: String: name (1 word) int: age char: gender 2. Your class should contain the
. . 1. Create a Person class with the following attributes: String: name (1 word) int: age char: gender 2. Your class should contain the following methods: . A private void method format(), which will edit the value stored in the attribute name so that the 1st letter is upper case and the remainder of the letters are lowercase. This method should be called by all methods in this class that modify or assign a new value to the attribute name. A default constructor which sets name to the null string and age to zero. A copy constructor A constructor with 3 arguments and assigns the passed values to the corresponding parameters. Mutator and accessor methods. . The equals() method to return true if the values of the 3 attributes being compared are the same and false otherwise. The toString() method. Submission: Once you are done: 1. Submit your files to Moodle
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
