Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

by baaic java BA Exercise 5 (2 points) Project Name LABO2_PeopleID Learning objective: To learn how to define multiple constructors, create an object, and use

by baaic java

image text in transcribed

image text in transcribed

BA Exercise 5 (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 Test People. Then add the statements according to the instructions provided in the comments(/*...... Student can copy the class TestPeopleId skeleton as follows: public class TestPeopleID public static void main(String U args) { /*use the keyword new to construct a Date object with day=23 month and year-2000, assign this Date object to a variable dobby of type Date /use the keyword new to construct a Name object with firsthame "Wangping" and lastllame - "Sangjan", assign this Name object to varsable naneobs of type Nane /use the keyword new to construct an Address object with the following information house i91/9, Soi "2", road "Chiangkai-HangDong", sabDistrict "Sunpakwan", districte "Hang Dong", provinces *Chiang Mas", and postcode 550230", assign this Address object to a variable addressObj of type Address * assign "3-5015-00274-987" to a variable doby of type String / /use the keyword new to construct a People from the doch namecbs. 100 and address by you just constructed, assign this people object to a variable people IDs of type People / Call the method printPeopleID 1) of people IDOL / System.out.println("- System.out.print("The name of people IDO is "); /*printout the names of people to by calling the method printName) of the name property of people System.out.print("the postcode of the peopleDoby s "); use System.printin to print the postcode of the address property of peopleIDO Page 6 | 7 a + System.out.price DES 163: Objed-Oriental Programming latarya School of Commerce Shtetit of Techno en Derula....... Running output should be as below: Wiangping Sangjan 3-5815-88274-987 23-4-2880 81/9, , Chiangmai -HangDong, Sunpakwan, Hang Dong, Chiang Mai, 50230 The name of people IDobj is Wiangping Sangjan The postcode of the peopleIdoby is 58230

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

Programming The Perl DBI Database Programming With Perl

Authors: Tim Bunce, Alligator Descartes

1st Edition

1565926994, 978-1565926998

More Books

Students also viewed these Databases questions