Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

lab 3 pointers and operator overloading c + + 1 Intro and Problem In this lab we will be creating a database for contacts to

lab 3 pointers and operator overloading c++1 Intro and Problem
In this lab we will be creating a database for contacts to be stored. Devices having overlapping contacts is
inefficient as each device storing duplicate contacts wastes space. So, in this lab all Contact information
will be stored in one place, and on each persons device will be a single ContactBook object, a class/struct
that you will implement, along with a Contact class/struct you will implement. The ContactBook object
will only hold pointers of contacts, to greatly reduce the total amount of memory used for a large
database. So now when two devices have the same contact, they will both only hold a pointer to the
same contact in memory, instead of there being two copies of the contact.
More specifically, a pointer in cpp on a 64 bit device is only taking up 8 bytes, where a contact might be
holding way more bytes of information. In our example, there is only two strings for a contact to make
it simpler(name and number), but it wouldnt be difficult to add things like email, profile picture, and
more to each contact, which would take up a lot more memory.

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

DB2 9 For Linux UNIX And Windows Advanced Database Administration Certification Certification Study Guide

Authors: Roger E. Sanders, Dwaine R Snow

1st Edition

1583470808, 978-1583470800

More Books

Students also viewed these Databases questions

Question

10. Describe the relationship between communication and power.

Answered: 1 week ago