Answered step by step
Verified Expert Solution
Link Copied!

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++

image text in transcribed

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 parameters

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database Design With Microcomputer Applications

Authors: Glenn A. Jackson

1st Edition

0137718411, 978-0137718412

More Books

Students also viewed these Databases questions