473,513 Members | 2,601 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Beginner Question: Windows Object Oriented Programming

I have a "Generic Application Class" which does tasks such as setup
and register the window, etc. The general idea was I could make a
child class of this for my project and inherit all of the necesary
methods. This works fine. My question is in regards to things like
"DirectX" and "Networking". As far as I can tell, I guess I have 2
options in order to implement these things:

1 - Make classes that sit in the hierarchy between my "Generic
Application Class" and my "Application Class" which handle all of the
aspects of these things, like initializing DirectX, Connecting to a
remote server, etc. Then my "Application Class" would just inherit
these methods and call them as needed.

2 - Make independent classes like a "NetworkObject Class" or a
"DirectXObject Class" and just have my "Application Class" create
instances of each of these things and call the methods on the
instantiated objects as needed.

I was leaning toward going with Option 1 because each application
would only require one of each of these type classes (DirectX and
Networking) so I thought that would make more sense.

I just want to know if I am thinking through this properly or am I
heading down the wrong learning path?

Any advice is greatly appreciated.

Thanks!

-JH
Jul 22 '05 #1
1 1289
"JHenstay" <Jo************@yahoo.com> wrote...
I have a "Generic Application Class" which does tasks such as setup
and register the window, etc. The general idea was I could make a
child class of this for my project and inherit all of the necesary
methods. This works fine. My question is in regards to things like
"DirectX" and "Networking". As far as I can tell, I guess I have 2
options in order to implement these things:

1 - Make classes that sit in the hierarchy between my "Generic
Application Class" and my "Application Class" which handle all of the
aspects of these things, like initializing DirectX, Connecting to a
remote server, etc. Then my "Application Class" would just inherit
these methods and call them as needed.

2 - Make independent classes like a "NetworkObject Class" or a
"DirectXObject Class" and just have my "Application Class" create
instances of each of these things and call the methods on the
instantiated objects as needed.

I was leaning toward going with Option 1 because each application
would only require one of each of these type classes (DirectX and
Networking) so I thought that would make more sense.

I just want to know if I am thinking through this properly or am I
heading down the wrong learning path?


This is a C++ language newsgroup, please try to use it to ask C++
language questions. There is another newsgroup for issues like
yours, it's called comp.object. What you're trying to get a grasp
on is called "Object Oriented Design". Once you get the hierarchy
straight, it doesn't matter in what language you'll implement it.
Take my advice, ask in comp.object.

Victor
Jul 22 '05 #2

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

Similar topics

5
2906
by: Martin | last post by:
When was inheritance intruduced into object oriented programming? More generally, does anyone know or have any sources on when the different features were introduced into object oriented...
44
4126
by: lester | last post by:
a pre-beginner's question: what is the pros and cons of .net, compared to ++ I am wondering what can I get if I continue to learn C# after I have learned C --> C++ --> C# ?? I think there...
5
1165
by: Rasmus Kromann-Larsen | last post by:
Hey, I just started out using Visual C# (Visual Studio .NET 2003), but am having a little problem figuring out where to place my datastructure. I've worked with programming alot before, but this...
7
1900
by: MounilK | last post by:
Hi all, I am not sure if this is the right NG to post this question. If that's the case please point me to the correct NG. I have a class library(myLib.dll) which has a class(myClass) which has...
6
1559
by: Alex | last post by:
Hello I am intersting in developing and my background is VBA used in Excel and a brief intro to Java. I am interested in learning beyond VB and feel that C++ would be a very good language to...
12
2089
by: Joshua Rulz | last post by:
Hi, i want to learn to program im quite skilled with computers and want to learn c++. is there anyone who can teach me or tell me a good website to learn it? all replies will be appreciated.
8
1276
by: Support | last post by:
Hello: I am deploying a new web site that will have over 100 pages. In the ASP world, I would create templtes - include files, etc... to easily "manage" the site. In asp.net 2.0 I want to create...
47
5898
by: Thierry Chappuis | last post by:
Hi, I'm interested in techniques used to program in an object-oriented way using the C ANSI language. I'm studying the GObject library and Laurent Deniau's OOPC framework published on his web...
29
2195
by: Brad Pears | last post by:
Here is a simple OO design question... I have a Contract class. The user can either save an existing contract or they start off fresh with a blank contract, fill in the data and then save a...
0
7259
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
7380
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,...
1
7098
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
7523
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...
1
5085
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
4745
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...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1592
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
455
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...

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.