Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

bartleby

Concept explainers

Question

Create a Person class for a user of the system. Create person.h and person.cpp files for this class.
The class should contain the following data of a person in the system:
• first name,
• last name,
• user ID, and
• email address.
These data should be accessible in its derived class. (Consider should the data be private, public,
or protected?)
This class should contain:
• a default constructor,
• a value constructor that receives all of the data to be placed into the data members as its
parameters,
• a copy constructor.
The class should also contain:
• “get” methods to allow the client to obtain information about a person.
o getFirstName, getLastName, getID, getEmail
• “set” methods to allow the client to assign information to a seller.
o setFirstName, setLastName, setID, setEmail, and optionally setAllInfo
• overloaded operators
o overloaded == method that returns true if two sellers have identical names and
email address; otherwise it returns false.
o overloaded !=, <, and > operators (for > and < operators, comparisons are based
on last names)
• An overloaded assignment = operator.
• Overloaded << and >> operators (consider should these be friend functions?)
• print() – a virtual function that displays on screen all the information of a person with
appropriate messages
• read() – a virtual function that reads in the information of a Person from an input file stream
Consider which of these methods should be const method?

Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education