Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

These are from \"Engineering Problem Solving with C++ second edition by Etter an

ID: 3535600 • Letter: T

Question

These are from "Engineering Problem Solving with C++ second edition by Etter and Ingber, pg. 518

True or false?

1) A derived class inherits the constructor functions of the base class.

2) Overloaded functions must have unique function signatures.

3) The function signature of an overridden function must be unique.

4) A virtual function is called based on the dynamic data type of the calling object.

5) A friend function of a class has access to all of the public, protected, and private members of the class.

Multiple choice

6) Assume that the following function prototype is provided in the declaration of a class nambed Myclass:

friend void input(istream&, Myclass&);

Which of the following is a valid function header for this prototype?

a) friend void input(istream& in, Myclass C)

b) friend void Myclass::input(istream& in, Myclass C)

c) Myclass::input(istream& in, Myclass C)

d) void input(istream& in, Myclass)

e) Myclass::friend input(istream& in)

7) Assume that the following function prototype is provided in the declaration of a class named Myclass:

virtual void input(istream&);

Which of the following is a valid function header for this prototype?

a) virtual void input(istream& in)

b) virtual void Myclass::input(istream& in)

c) void Myclass::input(istream& in)

d) void input(istream& in)

e) void Myclass::virtual input(istream& in)

Programming problems

http://imgur.com/bN8XxXB http://imgur.com/RqZaddc

8) Add a recursive method to the BinaryTree class that returns a count of the number of leaf nodes in the tree.

9) Write a program that uses the BinaryTree class to order a set of data read from a data file. Your program should open a data file, read the data and store it in your tree, then print the data using the inOrder print method.

Explanation / Answer

1.true

2.true

3.false

4.true

5.false

6. c) Myclass::input(istream& in, Myclass

7. b) virtual void Myclass::input(istream& in

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote