Question: by basic java 220 Exercise 4 (2 points) Project Name _LABO2_PeopleID Learning objective: To learn how to define multiple constructors, create an object, and use

by basic java

by basic java 220 Exercise 4 (2 points) Project Name _LABO2_PeopleID Learning

220 Exercise 4 (2 points) Project Name _LABO2_PeopleID Learning objective: To learn how to define multiple constructors, create an object, and use the object in Java programming Write a class PeopleID. The People ID class has four properties Name name, String ID Date dateOfBirth, and address address. It has 2 constructors: A 2-argument constructor and a 4-argument constructor. The 2-argument constructor takes Name name, and String ID as inputs. It sets the properties name and ID as the input argument. The 4-argument constructor takes Name name, String iD, Date date of birth, and Address address as inputs. It uses the this keyword to call a 2-argument constructor that takes name and ID as an input for initializing the properties name and ID, and also initializes the dateOfBirth and address to their corresponding properties. It has only 1 method: void print PeopleID) which calls printName() of the name property prints out the ID property of this class, calls printAddress () of the address property

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!