Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

More Books

Students also viewed these Databases questions

Question

=+ How would you advise those problems be resolved?

Answered: 1 week ago