sol bi upload kro yr
GDB Dated: Jan 18, 12View more random threads:
- International Marketing (MKT630) Assignment No. 01 May 3,...
- MGT402 Cost & Management Accounting Assignment No. 01...
- STA301- Statistics and Probability GDB No.1 Solution Fall...
- “financial accounting – 1 (mgt101)
- STA 301 Solution Assignment 2 Spring 2010 May 9
- MCM301 First Assignment idea solution October, fall 2012
- CS408 Human Computer Interaction Assignment No. 1 Fall...
- Mth302 Business State Math Assiment #1 Idea Solution fall...
- CS718 Wireless Networks Assignment No. 1 Evolution of...
- CS607-Artificial Intelligence Assignments No 2 (Graded)...
Dear Students,
Below is a topic for GDB. Please make sure that your reply should be precise and to the point.
GDB will remain open for two consecutive working days from 23rd January to 24th January. Also make sure you post your GDB on time as No GDB will be accepted via email in any case.
Topic is as follows:
You have two classes, Class A and Class B. Being a programmer either you can implement Class B as nested class of Class A or you can inherit Class B from Class A.
These are two ways to describe the relationship between classes. Discuses the situations in which, concept of public inheritance and nested class is more appropriate to use. Justify with solid reasons.
Sponsored Links
sol bi upload kro yr
idea solution
Any time you use public inheritance, you should make sure that any function
or object that expects a base class object will also be satisfied by a
derived class obejct as well, because the derived class object "is a" base
class object. If you're creating a class that "is a" base class (such as a
math student "is a" student), then inheritance is fine.
If your new class needs to utilize the behavior of the base class, but can't
actually be substituted for a base class object (even if just in one special
case), then layering (using a nested class) is a better approach. That's
referred to as the "is implemented in terms of" relationship.
thanks for sharing
hmmmmmmmmmmmmmm
thank u so much
okay :::))))))))
There are currently 1 users browsing this thread. (0 members and 1 guests)