473,396 Members | 2,038 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

3 Tier Inheritance

I have a Super class (class1), a sub-class (class2), and then a sub-
class of the sub-class (class3).

In Class3 would the syntax for using inheritance be

class Class3 : Class2 : Class1

or

class Class3 : Class2
*since Class2 will already inherit Class1. Is that right?*

Thanks for the help.

Apr 19 '07 #1
2 1412
zm********@gmail.com wrote:
I have a Super class (class1), a sub-class (class2), and then a sub-
class of the sub-class (class3).

In Class3 would the syntax for using inheritance be

class Class3 : Class2 : Class1

or

class Class3 : Class2
*since Class2 will already inherit Class1. Is that right?*

Thanks for the help.
So you would have Class2 : Class1, right? Then all you need in class3
is Class3 : Class2 since Class2 already inherits Class1.
--
Tom Porterfield
Apr 19 '07 #2
zm********@gmail.com <zm********@gmail.comwrote:
I have a Super class (class1), a sub-class (class2), and then a sub-
class of the sub-class (class3).

In Class3 would the syntax for using inheritance be

class Class3 : Class2 : Class1

or

class Class3 : Class2
*since Class2 will already inherit Class1. Is that right?*
The second is correct. The first won't compile.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Apr 19 '07 #3

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

Similar topics

51
by: nospam | last post by:
THIS IS the DOTNETJUNKIES MESSAGE ------------------------- We're Sorry As many of you know we have recently launched SqlJunkies.com. We have overhauled our runtime and will be using it on...
86
by: nospam | last post by:
Reasons for a 3-tier achitecture for the WEB? (NOTE: I said, WEB, NOT WINDOWS. DON'T shoot your mouth off if you don't understand the difference.) I hear only one reason and that's to switch a...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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
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...

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.