Class Person has instance data members (all private) String fullName, char gender, int age. has a public static int variable named numFriends with an initial value of zero. has a constructor that will be used to make a Person object and assign values to its data members, and increment numFriends. has getters and setters for all three instance data members. has a toString() method that returns a string displaying the state of a Person instance.
1
Expert's answer
2016-09-22T12:05:03-0400
public class Person { private String fullName; private char gender; private int age; private static int numFriends = 0;
Comments
Leave a comment