Answered step by step
Verified Expert Solution
Question
1 Approved Answer
answer the following in C++ QUESTION 1. This is a compulsory question related to OOP. You are required to provide an answer that includes code
answer the following in C++
QUESTION 1. This is a compulsory question related to OOP. You are required to provide an answer that includes code written in C++; A telephone directory is made up of a list of telephone records. Each telephone record consists of a name, a surname, and a telephone number. Implement a class TelephoneRecord that will contain the mentioned attributes and also functions to allow the user to enter the telephone record details and display the telephone record details. The following are the (public) headers of these two functions: void enterDetails() void displayDetails ( Implement as well two (overloaded) functions that can be used to compare the current telephone record to a given name or surname or to a given name and surname respectively. These two functions should be overloaded and should return a Boolean (bool) value. The following are the (public) headers of these two functions: bool equals(string name, string surname) bool equals(string nameOrSurname) The class should follow the concept of encapsulation. Every attribute should be set to private and getter and setter functions should be implemented. Include as well an empty and parameter less constructor and another constructor that accepts all the attribute values as parametersStep 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