473,471 Members | 1,967 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

"Inheritance break Encapsulation "

Hi

i find Following statement while reading Design pattern in C++
( author - Erich Gamma)
"Inheritance break Encapsulation " because inheritance exposes to
subclass the detail of its parent's Implementation
Is it correct ???

as we only expose interface ( function prototype) to derived class But
not how it being implemented

Kindly give urs View regarding it

Thanks
Pallav
Jul 16 '08 #1
1 1743
On Jul 16, 10:24*am, Pallav singh <singh.pal...@gmail.comwrote:
Hi

i find Following statement while reading Design pattern in C++
( author - Erich Gamma)
"Inheritance break Encapsulation " because inheritance exposes to
subclass the detail of its parent's Implementation
Is it correct ???

as we only expose interface ( function prototype) to derived class But
not how it being implemented

Kindly give urs View regarding it
What you are saying sounds correct, but to precise public inheritance
allows inheritance of interface while private inheritance allows
inheritance of implementation.
Also you should understand in what context the author made the above
statement. What you've quoted from the textbook seems to be only a
part of the topic.
Jul 16 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: theath | last post by:
hi, i'd like to do something like while(x) if(y) break ... end while what is the equivalent of java's break statement in vb.net? i don't want to use a goto :)
3
by: Mike Wilson | last post by:
How do I turn on the VB6 "Break on All Errors" equivilent in VB.NET 2005? I want to bypass my error handling for the time being while I developer-test some parts of my application. Many...
13
by: Fao | last post by:
Hello, I am having some problems with inheritance. The compiler does not not return any error messages, but when I execute the program, it only allows me to enter the number, but nothing else...
4
by: Daniel Greene | last post by:
Dear Group, I haven't been on this newsgroup in years. Hello again to village elders Lars Eighner, Alan Flavelle, and Jukka Korpela! :-) What brings me back? I was using the W3C QA to validate...
7
by: iKiLL | last post by:
Hi all I am still pretty new to .Net and C#. I have come from a VB6 Background.
3
by: darkenergy | last post by:
Hi all, I want to do a similar thing as class inheritance in C++, but with structures in C. I have a structure A, and I want to define a second structure B (in different .h/.c files), which has...
11
by: O.B. | last post by:
Does C# support anything like PHP's break command that optionally accepts a parameter specifying how many loops to break out of?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.