Question: Background: Question: public class Contact Add private instance variables here. See the class structure given in the assignment description. private Name name private String phoneNumber;

Background:

Background: Question: public class Contact Add private instance variables here. See the

class structure given in the assignment description. private Name name private String

Question:

phoneNumber; Implement your constructor here. Initialize the phoneNumber to null. rt public

public class Contact Add private instance variables here. See the class structure given in the assignment description. private Name name private String phoneNumber; Implement your constructor here. Initialize the phoneNumber to null. rt public Contact (Name name) phoneNumber -null; this.name-name; ImpLement your addPhoneNumber method here. rt The phone number should be in the format of three digits followed by a dash, *followed by another three digits, followed by a dash, and finally followed by four digits (i.e., 301-405-2755). Return false if the phone number format is *incorrect or null. public boolean addPhoneNumberCString pNumber) t if(pNumber.lengthO12) if(java. lang. Character. isDigit(pNumber.charAt(0)) && java.lang. Character. isDigit(pNumber.charAt(1)) && java.lang. Character.isDigit(pNumber.charAt(2)) && java.lang.Character.isDigit(pNumber.charAt(4))&&

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!