473,396 Members | 1,804 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.

Converting procedural type code to OO code

Any pointers as to how one should go about porting procedural type
code into object
oriented code??

---
Mohit

Jul 12 '07 #1
4 2746
On 7 12 , 1 31 , Mohitz <coolmoh...@gmail.comwrote:
Any pointers as to how one should go about porting procedural type
code into object
oriented code??

---
Mohit
>From my perspective, the most importance point is that you should put
data and relevant operations in one class. What's more, only when
necessary, data and operations should be "public".
In addition, inheritance, encapsulation and polymorphism are the three
major characteristics of object-oriented programming.

Jul 12 '07 #2
Mohitz wrote:
Any pointers as to how one should go about porting procedural type
code into object
oriented code??
Simple: don't.

If you have a model you need to program, program that model.
But don't "port" anything anywhere.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Jul 12 '07 #3
"Victor Bazarov" wrote:
Mohitz wrote:
>Any pointers as to how one should go about porting procedural type
code into object
oriented code??

Simple: don't.

If you have a model you need to program, program that model.
But don't "port" anything anywhere.
That sounds like pretty good advice to me. I wonder if that is how
Microsoft Foundation Classes came to be? Someone told someone to convert
the code into objects and they came up with wrappers that no one outside of
Redmond could love.

If you are told to do it and can't get out of it, I would say "just do it".
Jul 12 '07 #4
"Mohitz" <co********@gmail.comwrote in message
news:11**********************@o61g2000hsh.googlegr oups.com...
Any pointers as to how one should go about porting procedural type
code into object
oriented code??
Object oriented code is a different paradigm than procedural code. Meaning
that the design of the entire program is usually different in an OOPs
langauge than a procedural language. Trying to force procedural code into
OOPs wrappers doesn't do much to change the paradigm of the code itself.

So basically, don't.

It is better to design an object oriented program from the ground up.
Jul 12 '07 #5

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

Similar topics

8
by: Adam Greifer | last post by:
Hi! I'm a newbie at DB2 but have 13 years of SQL Server. I need to convert over 100 SQL Server procs to DB2. I haven't had much luck with the IBM Integration Toolkit and want to avoid ER/win...
2
by: John Gabriele | last post by:
The way I've always "designed" procedural C programs has just been to: A. Think about what I need to do B. Draw a flowchart with pencil and paper C. Implement the flowchart in C from the top...
13
by: parley | last post by:
After several years of programming WWW applications in ASP.NET (and several other frameworks) our division has come to what might seem a counterintiutive conclusion: Writing ASP.NET code in a...
5
by: Robert | last post by:
I have a series of web applications (configured as separate applications) on a server. There is a main application at the root and then several virtual directories that are independant...
16
by: Manuel | last post by:
Please, excuse me for starting this discussion. I'm not a troll, and I love the OOP architecture. However I'm a C++ newbie, and sometimes it's hard for me to fully understand the improvement of...
7
by: Coleen | last post by:
Does anyone have any good detailed information on the conversion process? We are in the process of converting 2 projects from 2003 to 2005 and have some conversion errors that I can not find...
2
by: shenanwei | last post by:
DB2 V8.2 on AIX, type II index is created. I see this from deadlock event monitor. 5) Deadlocked Connection ... Participant no.: 2 Lock wait start time: 09/18/2006 23:04:09.911774 .........
0
by: FLANDERS | last post by:
Hi all, Is it possible to declare a SQL type of result set or similar? I want to do use the IN predicate like you can in a non-procedural SQL like this: UPDATE TABLE1 SET COL1 = 123 WHERE COL2 IN...
14
by: mesut | last post by:
hi colleagues, I don't know if this is the right group for but it's in C# so I try. I have a #3 procedural function called GetInfo.. and those are 3 overloaded methods. I would like to use the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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...

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.