Implement the Seller class as a derived class of Person class. Create the seller.h and seller.cpp files for this class. The Seller class contains additional data members that hold a seller’s: o average star rating received from the buyers, and o total number of items sold. These data should be accessible by its derived classes. (should these data be private, public, or protected?) The following methods are included in the seller class: • A default constructor and a copy constructor • A constructor that receives all of the data for a seller. (for the constructors, make sure to call the base class constructor as appropriate) • Appropriate get and set functions for the new data in this class • print() – overrides the base class print() to print the base class data and print all additional seller data with appropriate messages. Make sure to call the base class print to print the base class data. • read() – overrides the base class read() to read the base class data and reads all additional seller data items, one data per line in the given order. Make sure to call the base class read to read in the base class data. Here is an example data for a Seller S <- indicate a seller record Joseph <- first name Edmondson <- last name jed2k <- user ID jed2k@apple.com <- email 3.6 <- seller rating 1400 <- total number of items sold

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Implement the Seller class as a derived class of Person class. Create the seller.h and seller.cpp
files for this class. The Seller class contains additional data members that hold a seller’s:
o average star rating received from the buyers, and
o total number of items sold.
These data should be accessible by its derived classes. (should these data be private, public, or
protected?)


The following methods are included in the seller class:
• A default constructor and a copy constructor
• A constructor that receives all of the data for a seller.
(for the constructors, make sure to call the base class constructor as appropriate)
• Appropriate get and set functions for the new data in this class
• print() – overrides the base class print() to print the base class data and print all additional
seller data with appropriate messages. Make sure to call the base class print to print the
base class data.
• read() – overrides the base class read() to read the base class data and reads all additional
seller data items, one data per line in the given order. Make sure to call the base class
read to read in the base class data.


Here is an example data for a Seller
S <- indicate a seller record
Joseph <- first name
Edmondson <- last name
jed2k <- user ID
jed2k@apple.com <- email
3.6 <- seller rating
1400 <- total number of items sold

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Class
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education