Define a new class BoreIng
SuperClassSome typical questions: Suppose you have a class defined as follows: class Bore { public: Bore(); Void print_stuff(); protected: int a; int b; }; What is the difference between using “protected:” above versus using “private:?” Define a new class BoreIng that is derived from Bore such that: The class BoreIng has a new public member function deep that takes an input integer c and returns a Boolean test whether a*c is the same as b; (So show both the interface and implementation.) a. Explain what “late-binding” means and what does it have to do with “polymorphism? What does it have to do with “virtual functions?” What is a “virtual function?” Give an example. b. Explain what we mean by redefining a virtual function. Give an example. Suppose you have a binary tree with 600 nodes. Each node has 82 member variables named field1,field2, … field80, left, right. The field left is a pointer to the next tree entry down left and right points at the next tree pointer right. (A NULL value means there is no next node on that side. A pointer variable named root points at the first entry (the root node). Suppose the root node has two children. You decide it is time to make some changes. You want to change the left child of root to be the new root. It keeps both its children. You then want to put old root and its children back in the tree where they would go to keep it ordered. How can you do that? Consider the binary tree of question 4. Suppose field1 is a unique key and that the tree was built in field1 order. Write a function to search the tree recursively for a value of any type to match field1. Have your function return that record’s field2 presumed to be some positive integer. Return a negative if no record has the input value for field1. Explain the difference between IPO and Event driven programming? Explain what a message map does. Explain what we mean by a document and a view in a Windows program. Sketcher is a MDI application, not an SDI...
10 years ago
Purchase the answer to view it

- define_a_new_class_boreing.docx