Consider a class Person that has two data fields: a string for a name and an integer for an age. Assume that the class has typical set and get methods for these fields and whatever constructors you...



Consider a class Person that has two data fields: a string for a name and an integer for an age. Assume that the class has typical set and get methods for these fields and whatever constructors you deem reasonable.


a. Write Java statements that declare an array group that can hold up to 50 Person objects and allocate memory for it.


b. Write Java statements that set the first element of this array to a Person object representing Jill, who is 21 years old.



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here