473,789 Members | 2,728 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"Inheritanc e break Encapsulation "

Hi

i find Following statement while reading Design pattern in C++
( author - Erich Gamma)
"Inheritanc e 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 1762
On Jul 16, 10:24*am, Pallav singh <singh.pal...@g mail.comwrote:
Hi

i find Following statement while reading Design pattern in C++
( author - Erich Gamma)
"Inheritanc e 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
53625
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
10984
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 thanks! Mike
13
3261
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 happend. I think the problem may be in my input function or in the main function. If anyone out there can help me it woul be greatly appreciated. Here is the code: #include <iostream>
4
2126
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 my XHTML the other day, and I came across this "tip of the day" called "Use standard redirects: don't break the back button!" It said, "If you want http://www.example.org/foo to actually display what's at http://www.example.org/bar you should...
7
6571
by: iKiLL | last post by:
Hi all I am still pretty new to .Net and C#. I have come from a VB6 Background.
3
18589
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 the same variables as A plus some additional ones. I want to use the existing functions that manipulate and create A also for B and, using some new functions, add the bits about the additional variables. If possible, it will not be necessary to...
11
9716
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
9666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9511
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10200
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10142
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9986
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7529
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3703
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.