[SOLVED] SOLVED:Person Java

15.99 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

rar file icon Persoon.rar (5.2 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
đź”’ Securely Powered by:
Secure Checkout
5/5 - (2 votes)

We created in class a Person class to represent a person. The class has instance variables for a person’s name, which is a string, and an integer age. These variables are name and age, respectively. a. Write a default constructor for Person that sets name to the string “No name yet” and age to zero. b. Write a second constructor for Person that sets name to a given string and age to a given age. c. Write a static method createAdult() for Person that returns a special instance of this class. The instance represents a generic adult and has the name “An adult” and the age 21.

  • Persoon.rar