473,394 Members | 1,694 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,394 software developers and data experts.

General OOP question

I did not know where else to post this since there is no forum for general OOP questions.
I am just getting into OOP after a lifetime of procedural programming.
I'm developing a Help Desk Ticketing System and am struggling with what should be classes and what things should be properties of classes.
So far I have for classes Tickets and People.
I know both will need subclasses.
Some of the ticket properties will be Problem and Solution.
But now I'm wondering if these should be separate classses?
What are the 'rules' for determining what should be classes, subclasses and properties?
Jul 21 '05 #1
2 1287
If a Problem has several properties (e.g. Summary,
StepsToReproduce,ExpectedResult) or methods, then it sounds like it needs to
be its own class. If the Problem is just a string containing the problem,
then probably not.

Also, be careful with the term 'subclass'. Typically that refers to
inheritence, not to classes that contain references to instances of other
classes.

"kneejerkreaction" <kn**************@discussions.microsoft.com> wrote in
message news:00**********************************@microsof t.com...
I did not know where else to post this since there is no forum for general OOP questions. I am just getting into OOP after a lifetime of procedural programming.
I'm developing a Help Desk Ticketing System and am struggling with what should be classes and what things should be properties of classes. So far I have for classes Tickets and People.
I know both will need subclasses.
Some of the ticket properties will be Problem and Solution.
But now I'm wondering if these should be separate classses?
What are the 'rules' for determining what should be classes, subclasses

and properties?
Jul 21 '05 #2
Welcome to OO programming.

Start here:
http://biztalkbum.blogspot.com/2004/...-oriented.html

Next: buy Alan Shalloway's excellent book: Introduction To Design Patterns
....and read it.

Nothing I say on a newsgroup can shed as much light on the topic as this
slim volume can.

As for your Help Desk Ticketing System:
start with the tradition advice, and then refactor your design...
so, start with the nouns...
what kinds of tickets will you have.
What kinds of problems will you track seperately?
Will you have a Knowledge Base? If so, will there be a taxonomy for
categorizing the information in it?

Look for things that are "in common." Look for things that vary. Pull the
common things into base classes. Pull variations into classes that either
inherit or "contain" the common objects (called composition). Draw the
relationships. Factor in design patterns where they simplify the situation.

Note: Common things are not just things... they can be techniques for
creating the object, methods for manipulating the object, or tools for
hiding what's in the object.

Confused? Read the Shalloway book. Leave a budget for more books as
well... you're just getting started...

--- Nick

"kneejerkreaction" <kn**************@discussions.microsoft.com> wrote in
message news:00**********************************@microsof t.com...
I did not know where else to post this since there is no forum for general OOP questions. I am just getting into OOP after a lifetime of procedural programming.
I'm developing a Help Desk Ticketing System and am struggling with what should be classes and what things should be properties of classes. So far I have for classes Tickets and People.
I know both will need subclasses.
Some of the ticket properties will be Problem and Solution.
But now I'm wondering if these should be separate classses?
What are the 'rules' for determining what should be classes, subclasses

and properties?
Jul 21 '05 #3

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

Similar topics

15
by: John Salerno | last post by:
After my last post, I thought of another question as a result of the following: ------------------------------ Mike Meyer wrote: > John Salerno <johnjsal@NOSPAMgmail.com> writes: > > >>So...
3
by: JezB | last post by:
What's the generally accepted approach for using Styles and Stylesheets in a web application based on .aspx files, Web Controls, User Controls, and code-behind modules (c# in my case)? Most style...
2
by: ZorpiedoMan | last post by:
I'm new to the world of sockets, and this question is not VB specific: If multiple clients access the same server on the same port, and the server is set up to do some async communication, does...
105
by: Christoph Zwerschke | last post by:
Sometimes I find myself stumbling over Python issues which have to do with what I perceive as a lack of orthogonality. For instance, I just wanted to use the index() method on a tuple which does...
1
by: Mark Fink | last post by:
Hi there, unfortunately I am new to Jython and my "Jython Essentials" book is still in the mail. I looked into the Jython API Doc but could not find the information. I am porting a Python...
0
by: Yong | last post by:
I'm not getting any reply to my previous thread so I'm stating a new one. I get a General Network Error due to my SqlCommand object not having a big enough CommandTimeout to complete very long...
4
by: Viviana Vc | last post by:
Hi all, I've read the WindowsVistaUACDevReqs.doc documentation and I have done different small tests on Vista to understand the bahaviour and now I have a few questions. 1) If I create a...
2
by: sharan | last post by:
Hello Friends I have a problem in Data Structure (In C) i want to emplement a General tree having three child nodes of each parent node ...please send me any simple Example( code) by which i can...
2
by: SpotNet | last post by:
Scott M. Have your experiences shown you that programmers may give the best computer advice, analysis, and solutions even at the worst of times, for a PC user? ;~D Haven't crossed many Network...
3
by: =?Utf-8?B?Ymxi?= | last post by:
I am posting to the general discussion group - but I cannot find my postings... or replies...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
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...
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...

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.