Question: Create a ( simplified ) contact book! Write a java program to add contact information to a contact record and display the contact details!In this
Create a simplified contact book! Write a java program to add contact information to a contact record and display the contact details!In this challenge, create domain classes called Contact and Address and one driver class called ContactBook. For each domain class, write the constructor, toString method, and getterssetters for each attribute. The Address class will contain the following private attributes:Street number intStreet name StringZip Code int City StringState StringThe Contact class will contain the following private attributes:First name StringLast name StringBirthday String with format of mmddyyyyPhone number StringEmail address StringHome address Address Write a driver class called ContactBook that has the following methodscreateAddressRecordAsks the user via the console for the street name, street number, zip code, city, and state of an address and instantiates an Address object with that information. Returns the newly constructed Address object.createContactRecordAddress homeAddressAsks the user via the console for the first name, last name, birthday, phone number, and email address of a contact and instantiates a Contact object with that information. Returns the newly constructed Contact object.showContactDetailsContact contactPrints the message Here is the contact info for and concatenates contacts first & last names. Then prints the contact object information. Remember that toString method is not called explicitly. mainCalls createAddressRecord method which will return an Address objectCalls createContactRecord method which will return a Contact objectRepeats steps & to create different contact objects.Calls showContactDetails method times once for each Contact objectExample OutputContact Book!Add new address:Enter the street number: Enter the street name: Hillwood StreetEnter the ZIP code: Enter the city: SeattleEnter the state: WAAdd new contact:Enter the first name: ArnoldEnter the last name: ShortmanEnter the birthday mmddyyyy: Enter the phone number: Enter the email address: footballhead@heyarnold.comContact Saved! Add new address:Enter the street number: Enter the street name: Dimmsdale DriveEnter the ZIP code: Enter the city: DimmsdaleEnter the state: CAAdd new contact:Enter the first name: TimmyEnter the last name: TurnerEnter the birthday mmddyyyy: Enter the phone number: Enter the email address: timmy.turner@fairlyoddparents.comContact Saved! Add new address:Enter the street number: Enter the street name: Middleton WayEnter the ZIP code: Enter the city: MiddletonEnter the state: CAAdd new contact:Enter the first name: KimEnter the last name: PossibleEnter the birthday mmddyyyy: Enter the phone number: Enter the email address: call.mebeep.me@kimpossible.comContact Saved! Here are the contact details for Arnold Shortman:Contactfirstname: 'Arnold', lastname: 'Shortman', birthday: phoneNumber: email: 'footballhead@heyarnold.com', homeAddress: Addressnumber: street: 'Hillwood Street', city: 'Seattle', state: WA zipCode: Here are the contact details for Timmy Turner:Contactfirstname: 'Timmy', lastname: 'Turner', birthday: phoneNumber: email: 'timmy.turner@fairlyoddparents.com', homeAddress: Address number: street: 'Dimmsdale Drive', city: 'Dimmsdale', state: CA zipCode: Here are the contact details for Kim Possible:Contactfirstname: 'Kim', lastname: 'Possible', birthday: phoneNumber: email: 'call.mebeep.me@kimpossible.com', homeAddress: Addressnumber: street: 'Middleton Way', city: 'Middleton', state: CA zipCode: SubmissionYou need to submit a single file named ContactBook.java.Grading CriteriaCode readability: Using comments to explain logic: Correctness of Java syntax no compilation error: Proper scan of System.in: Proper usage of methods: Proper indirect use of toString: Program displays all required messages when given valid input: Program displays numeric values to specification: Passing all tests:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
