
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
In this exercise, you will design the class memberType.
- Each object of memberType can hold the name of a person, member ID, number of books bought, and amount spent.
- Include the member functions to perform the various operations on the objects of memberType—for example, modify, set, and show a person’s name. Similarly, up-date, modify, and show the number of books bought and the amount spent.
- Add the appropriate constructors.
- Write the definitions of the member functions of memberType.
- Write a program to test various operations of your class memberType.
![(829 X
O Hom x O Merr X
O C-25. X
O Prog X
* Mind x
O cis2 X
O cis25 X
E Untit X
E Untit X
b In thi X
T Subs X
(Solv X
b My C X
+
PHY X
A ng.cengage.com/static/nb/ui/evo/index.html?deploymentld=5781122055515575690743039334&elSBN=9781337274715&snapshotld=1982158&id=934535651&takeld=743e2e43-944d-46e2-95..
WILLIYAM Y
CENGAGE MINDTAP
Q Search this course
A My Home
Programming Exercise 10-13
| Instructions
memberT... sample
| +
+
Courses
main.cpp
member...
memberT...
>_ Terminal
1 4
O Catalog and Study Tools
In this exercise, you will design the
2 10
Program For Demonstration on Class M
emebr Function
**Record The Person Details**
Enter The No.of Person Details
class memberType .
3 John Williams
A-Z
Partner Offers
4 0
5 0
EE Rental Options
1. Each object of memberType can hold
6 20
College Success Tips
the name of a person, member ID,
7 Lisa Berry
8 2
number of books bought, and
Career Success Tips
9 35.50
amount spent.
10 30
RECOMMENDED FOR YOU
11 Ron Brown
2. Include the member functions to
12 10
perform the various operations on
13 255.68
the objects of memberType -for
14 40
example, modify, set, and show a
15 Jessey Smith
16 0
Check In! Sleep Self-
person's name. Similarly, up-date,
17 0
Assessment Take the quiz!]
modify, and show the number of
18
books bought and the amount spent.
Help
3. Add the appropriate constructors.
Give Feedback
4. Write the definitions of the member
functions of memberType .
5. Write a program to test various
operations of your
class memberType .
6 V i 3:03](https://content.bartleby.com/qna-images/question/fea7db84-1c24-4b74-999d-45b7b72031d9/6a013be4-a083-4ab3-8ac1-0ddf13b49610/2241kzl_thumbnail.png)
Transcribed Image Text:(829 X
O Hom x O Merr X
O C-25. X
O Prog X
* Mind x
O cis2 X
O cis25 X
E Untit X
E Untit X
b In thi X
T Subs X
(Solv X
b My C X
+
PHY X
A ng.cengage.com/static/nb/ui/evo/index.html?deploymentld=5781122055515575690743039334&elSBN=9781337274715&snapshotld=1982158&id=934535651&takeld=743e2e43-944d-46e2-95..
WILLIYAM Y
CENGAGE MINDTAP
Q Search this course
A My Home
Programming Exercise 10-13
| Instructions
memberT... sample
| +
+
Courses
main.cpp
member...
memberT...
>_ Terminal
1 4
O Catalog and Study Tools
In this exercise, you will design the
2 10
Program For Demonstration on Class M
emebr Function
**Record The Person Details**
Enter The No.of Person Details
class memberType .
3 John Williams
A-Z
Partner Offers
4 0
5 0
EE Rental Options
1. Each object of memberType can hold
6 20
College Success Tips
the name of a person, member ID,
7 Lisa Berry
8 2
number of books bought, and
Career Success Tips
9 35.50
amount spent.
10 30
RECOMMENDED FOR YOU
11 Ron Brown
2. Include the member functions to
12 10
perform the various operations on
13 255.68
the objects of memberType -for
14 40
example, modify, set, and show a
15 Jessey Smith
16 0
Check In! Sleep Self-
person's name. Similarly, up-date,
17 0
Assessment Take the quiz!]
modify, and show the number of
18
books bought and the amount spent.
Help
3. Add the appropriate constructors.
Give Feedback
4. Write the definitions of the member
functions of memberType .
5. Write a program to test various
operations of your
class memberType .
6 V i 3:03
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps

Knowledge Booster
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
- A design class must be fully specified: Which is correct? A. all attributes must be complete B. all operations must be complete C. all attributes and operations (including return types and parameter lists) D. must be complete D. None of thesearrow_forwardWhich of the following best describes data encapsulation in Object-Oriented Programming? A. The process of inheriting properties from a base class. B. The bundling of data with the methods that operate on that data. C. The ability of different classes to use the same method name. D. The concept of restricting access to the direct modification of an object's attributes.arrow_forwardFor this assignment you will be building on the Fraction class you began last week. All the requirements from that class are still in force. You'll be making five major changes to the class. Delete your set() function. Add two constructors, a default constructor (a constructor that takes no parameters) and a parameterized constructor (a constructor that takes parameters). The default constructor assigns the value 0 to the Fraction. In the parameterized constructor, the first parameter will represent the initial numerator of the Fraction, and the second parameter will represent the initial denominator of the Fraction.Since Fractions cannot have denominators of 0, the default constructor should assign 0 to the numerator and 1 to the denominator. Also, the parameterized constructor should check to make sure that the second parameter is not a 0 by using the statement "assert(denominatorParameter != 0);". To use the assert() function you'll also need to #include <cassert>.assert() is…arrow_forward
- For this assignment you will be building on the Fraction class you began last week. All the requirements from that class are still in force. You'll be making five major changes to the class. Delete your set() function. Add two constructors, a default constructor (a constructor that takes no parameters) and a parameterized constructor (a constructor that takes parameters). The default constructor assigns the value 0 to the Fraction. In the parameterized constructor, the first parameter will represent the initial numerator of the Fraction, and the second parameter will represent the initial denominator of the Fraction.Since Fractions cannot have denominators of 0, the default constructor should assign 0 to the numerator and 1 to the denominator. Also, the parameterized constructor should check to make sure that the second parameter is not a 0 by using the statement "assert(denominatorParameter != 0);". To use the assert() function you'll also need to #include <cassert>. (Note, I…arrow_forwardIf you are designing an application for a car dealership, you will create a Vehicle parent class and then extend the class into Car, Truck, SUV child classes. The Vehicle class will have the general attributes and behaviors. Then, you only need to code the specific differences in the child classes. Give us an example of objects that might have similar attributes and behaviors but enough differences to warrant an inheritance relationship. Then, explain the relationship and teach your classmates about inheritance.arrow_forwardUse the Animal class file given on the final exam module. Use Inheritance and Polymorphism concepts to create the following classes and functions. Create the following classes that derive from the Animal class. Monkey Kangaroo Create a derived class named Spider Monkey whose base class is Monkey. Create constructors for each class. Create destructors for each class. All classes will have the following private instance fields, including Animal legs that will initialize to 0 boolean swim that will initialize to false; All classes will have the following polymorphic methods, including Animal getLegs( ) – this returns the number of legs the animal has makeSount( ) – this outputs the type of sound the animal makes makeSound( ) method will be a virtual function in the Animal class Create an exception in the getLegs( ) method that makes sure the number of legs are valid (only allow positive number amount of legs) Create a main method to demonstrate the all functions including the…arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

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)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education