Starting Out with C++ from Control Structures to Objects (8th Edition)
8th Edition
ISBN: 9780133769395
Author: Tony Gaddis
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 15, Problem 28RQE
When a pointer to a base class is made to point to a derived class, the pointer ignores any _______ the derived class performs, unless the function is _________.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
When a pointer to a base class is made to point to a derived class, the pointer ignoresany __________ the derived class performs, unless the function is __________.
Fill-in-the-Blank
A base class pointer needs a(n) _________ to be assigned to a derived class pointer.
Fill-in-the-Blank
A class with at least one pure virtual member function is called a(n) _________ class.
Chapter 15 Solutions
Starting Out with C++ from Control Structures to Objects (8th Edition)
Ch. 15.1 - Here is the first line of a class declaration....Ch. 15.1 - What is the name of the derived class in the...Ch. 15.1 - Suppose a program has the following class...Ch. 15.2 - What is the difference between private members and...Ch. 15.2 - What is the difference between member access...Ch. 15.2 - Suppose a program has the following class...Ch. 15.3 - What will the following program display? #include...Ch. 15.3 - What will the following program display? #include...Ch. 15.7 - Explain the difference between overloading a...Ch. 15.7 - Prob. 15.10CP
Ch. 15.7 - Prob. 15.11CPCh. 15.7 - What will the following program display? #include...Ch. 15.7 - What will the following program display? #include...Ch. 15.7 - What will the following program display? #include...Ch. 15.7 - What will the following program display? #include...Ch. 15.8 - Does the following diagram depict multiple...Ch. 15.8 - Does the following diagram depict multiple...Ch. 15.8 - Examine the following classes. The table lists the...Ch. 15.8 - Examine the following class declarations: class...Ch. 15 - What is an is a relationship?Ch. 15 - A program uses two classes: Dog and Poodle. Which...Ch. 15 - How does base class access specification differ...Ch. 15 - What is the difference between a protected class...Ch. 15 - Can a derived class ever directly access the...Ch. 15 - Which constructor is called first, that of the...Ch. 15 - What is the difference between redefining a base...Ch. 15 - Prob. 8RQECh. 15 - What is an abstract base class?Ch. 15 - A program has a class Potato, which is derived...Ch. 15 - What base class is named in the line below?class...Ch. 15 - What derived class is named in the line below?...Ch. 15 - What is the class access specification of the base...Ch. 15 - What is the class access specification of the base...Ch. 15 - Protected members of a base class are like...Ch. 15 - Complete the table on the next page by filling in...Ch. 15 - Complete the table below by filling in private,...Ch. 15 - Complete the table below by filling in private,...Ch. 15 - A derived class inherits the ________ of its base...Ch. 15 - When both a base class and a derived class have...Ch. 15 - An overridden base class function may be called by...Ch. 15 - When a derived class redefines a function in a...Ch. 15 - A(n) __________ member function in a base class...Ch. 15 - ________ binding is when the compiler binds member...Ch. 15 - __________ binding is when a function call is...Ch. 15 - _________ is when member functions in a class...Ch. 15 - When a pointer to a base class is made to point to...Ch. 15 - A(n) __________ class cannot be instantiated.Ch. 15 - A(n) _______ function has no body, or definition,...Ch. 15 - A(n) _________ of inheritance is where one class...Ch. 15 - _______ is where a derived class has two or more...Ch. 15 - In multiple inheritance, the derived class should...Ch. 15 - Write the first line of the declaration for a...Ch. 15 - Write the first line of the declaration for a...Ch. 15 - Suppose a class named Tiger is derived from both...Ch. 15 - Write the declaration for class B. The classs...Ch. 15 - T F The base classs access specification affects...Ch. 15 - T F The base classs access specification affects...Ch. 15 - T F Private members of a private base class become...Ch. 15 - T F Public members of a private base class become...Ch. 15 - T F Protected members of a private base class...Ch. 15 - T F Public members of a protected base class...Ch. 15 - T F Private members of a protected base class...Ch. 15 - T F Protected members of a public base class...Ch. 15 - T F The base class constructor is called after the...Ch. 15 - T F The base class destructor is called after the...Ch. 15 - T F It isnt possible for a base class to have more...Ch. 15 - T F Arguments are passed to the base class...Ch. 15 - T F A member function of a derived class may not...Ch. 15 - Prob. 51RQECh. 15 - T F A base class may not be derived from another...Ch. 15 - class Car, public Vehicle { public: Car(); Car();...Ch. 15 - class Truck, public : Vehicle, protected {...Ch. 15 - class SnowMobile : Vehicle { protected: int...Ch. 15 - class Table : public Furniture { protected: int...Ch. 15 - class Tank : public Cylinder { private: int...Ch. 15 - class Three : public Two : public One { protected:...Ch. 15 - Employee and ProductionWorker Classes Design a...Ch. 15 - ShiftSupervisor Class In a particular factory, a...Ch. 15 - TeamLeader Class In a particular factory, a team...Ch. 15 - Prob. 4PCCh. 15 - Time Clock Design a class named TimeClock. The...Ch. 15 - Essay Class Design an Essay class that is derived...Ch. 15 - PersonData and CustoraerData Classes Design a...Ch. 15 - PreferredCustomer Class A retail store has a...Ch. 15 - File Filter A file filter reads an input file,...Ch. 15 - File Double-Spacer Create a derived class of the...Ch. 15 - Course Grades In a course, a teacher gives the...Ch. 15 - Ship. CruiseShip, and CargoShip Classes Design a...Ch. 15 - Pure Abstract Base Class Project Define a pure...Ch. 15 - Prob. 14PC
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
Find the errors in the following code: 3. // Warning! This code contains ERRORS! if (num2 == 0) System.out.prin...
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
Write your own version of malloc and free, and compare its running time and space utilization to the version of...
Computer Systems: A Programmer's Perspective (3rd Edition)
Present Value Suppose you want to deposit a certain amount of money into a savings account and then leave it al...
Starting out with Visual C# (4th Edition)
ArrayOperations Class Write a class name ArrayOperations with the following static methods: getTotal. This meth...
Starting Out with Java: Early Objects (6th Edition)
Write a database description for each of the relations shown, using SQL DOL (shorten, abbreviate. or change any...
Modern Database Management
A criticism of the break statement and the continue statement is that each is unstructured. Actually, break sta...
C How to Program (8th Edition)
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(n) __________ member function in a base class expects to be overridden in a derived class.arrow_forwardFill-in-the-Blank In order to use dynamic binding, a member function of a class needs to be declared as a(n) _________ function.arrow_forwardX-Functions of a class can be called with the _______ operator using the name of the object, or the ________ operator using a pointer. VIII-Data or functions in the base class must be _____ or _____to be accessed from a member function of the derived class. A default argument has a value that A-can be provided by the calling function B-can be provided by function C-must have a variable value D-must have a constant value 4-An object's non-static functions have access to the _______ pointer. This pointer is passed as a parameter to non-static functions by the compiler. 2-A function not belonging to the class must be declared as a _______ of a class in order to gain access to the private data members of that class. 9-When a parameter is passed by reference to a function function cannot access the value of the parameter A temporary variable is created in the calling function to hold the value of the argument. A variable is created to hold the value of…arrow_forward
- Fill-in-the-Blank If you were writing the definitions for the Canine class member functions and wanted to place these in their own file, what should you name the file? ____________________arrow_forwardA nonmember function must be declared as a(n)_________ of a class to have access tothat class’s private data members.arrow_forwardFill-in-the-Blank When a member function’s body is written inside a class declaration, the function is a(n) _________ function.arrow_forward
- Casting a base-class pointer to a derived-class pointer is called_______________arrow_forwardAn object’s non-static member functions have access to a “self pointer” to the objectcalled the_______________- pointer.arrow_forwardFill-in-the-Blank It is considered good programming practice to store the declaration for a class, its function definitions, and the client program that uses the class in __________________ files.arrow_forward
- C++ requires that a copy constructor's parameter be a class object passed by _________________.arrow_forwardFill-in-the-Blank A member function of a class that is not implemented is called a(n) _________ function.arrow_forwardIf a class contains at least one pure virtual function, it’s a(n) _________class.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Introduction to Classes and Objects - Part 1 (Data Structures & Algorithms #3); Author: CS Dojo;https://www.youtube.com/watch?v=8yjkWGRlUmY;License: Standard YouTube License, CC-BY