This is what I need completed. Using a class, create an online phone book that k
ID: 3659880 • Letter: T
Question
This is what I need completed. Using a class, create an online phone book that keeps track of first names and last names, dates of birth of family members and close friends, and phone numbers. The program should be able to take in a maximum of 50 entries. It should perform these operations: a. Appropriate constructors to initialize the member variables b. Set last name c. Set first name d. Set phone number e. Set date of birth f. Load the data into the address book from a disk. g. Return phone number for particular person h. Return date of birthrate for a particular person i. Print the phone number and date of birth of a given person. j. Print the names of the people whose birthdays are in a given month. k. Save the data into the address book on a disk.Explanation / Answer
public class phonebook { String firstname; String lastname; String dateofbirth; String phonenumber; public phonebook(String f,String l,String d,String p) { firstname=f;; lastname=l; dateofbirth=d; phonenumber=p; } void setFirstname(String f) { firstname=f; } void setLastname(String l) { lastname=l; } void setPhonenumber(String p) { phonenumber=p; } void setDateofbirth(String d) { dateofbirth=d; } String getPhonenumber() { return phonenumber; } String getDateofbirth() { return dateofbirth; } void printPhonenumberAndDateofbirth() { System.out.println("Phone Number: "+phonenumber); System.out.println("Date of Birth: "+dateofbirth); }
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.