Question: JAVA PROGRAM.. In this assignment you are asked to write a JAVA program and complete the following tasks: Create a class called Person that has

JAVA PROGRAM..

JAVA PROGRAM.. In this assignment you are asked to write a JAVA

In this assignment you are asked to write a JAVA program and complete the following tasks: Create a class called Person that has two instance variables (attributes), one for the person's name and the other for the person's age. (1pt) Include accessor methods and mutator (getters and setters) methods for each instance variable. (1pt) Include a method that sets both the name and the age of a person. (2pts) Write a Driver class (with a main) to instantiate two objects from the class Person. Initialize the objects using the method in item 3. You may choose any name and age (2pts) Within the driver class create a method, older, that will determine which one of your two persons are older. This method should appropriately print the name of that person. (3pts) Ensure that you have written the Javadoc comments for all methods.(1pt) 1. 2. 3. 4. 5. 6. 7. Submit the following: a) The Person Class file. b) The Driver Class file. c) Ascreenshot of eclipse showing the output

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!