Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a new class called CustomerRecord. This class describes a companys customer and is derived from PersonRecord (below). It contains the following additional fields: customerID
Create a new class called CustomerRecord. This class describes a companys customer and is derived from PersonRecord (below). It contains the following additional fields:
customerID a customer ID (type: String)
creditCardType a credit card type (ex: Visa, MC, Amex, etc.) (type: String)
creditCardNumber a credit card number (type: String)
creditCardDate a credit card date (ex: 12/19) (type: String)
Create the new class with the above fields, a constructor, and getters and setters. (Use the Generate capability in IntelliJ IF possible) public class PersonRecord { private PersonName name; private Address address; private PhoneNumber homePhone; private PhoneNumber workPhone; private PhoneNumber cellPhone; // Constructor public PersonRecord(PersonName name, Address address, PhoneNumber homePhone, PhoneNumber workPhone, PhoneNumber cellPhone) { this.name = name; this.address = address; this.homePhone = homePhone; this.workPhone = workPhone; this.cellPhone = cellPhone; } // Accessors / Mutators public PersonName getName() { return name; } public void setName(PersonName name) { this.name = name; } public Address getAddress() { return address; } public void setAddress(Address address) { this.address = address; } public PhoneNumber getHomePhone() { return homePhone; } public void setHomePhone(PhoneNumber homePhone) { this.homePhone = homePhone; } public PhoneNumber getWorkPhone() { return workPhone; } public void setWorkPhone(PhoneNumber workPhone) { this.workPhone = workPhone; } public PhoneNumber getCellPhone() { return cellPhone; } public void setCellPhone(PhoneNumber cellPhone) { this.cellPhone = cellPhone; }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started