Object oriented programming (oop)

  • Thread starter Thread starter PainterGuy
  • Start date Start date
  • Tags Tags
    Oop Programming
Click For Summary

Discussion Overview

The discussion centers around the basics of object-oriented programming (OOP), particularly aimed at beginners who are unfamiliar with programming concepts. Participants explore the nature of objects in programming, the transition from procedural to object-oriented paradigms, and resources for learning C++ and OOP.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant expresses confusion about the concept of objects in programming, questioning how programming languages can be based on objects rather than instructions.
  • Another participant suggests that objects can be thought of as tools and emphasizes the importance of understanding basic syntax and data structures before delving into OOP.
  • A participant explains that OOP emerged to manage larger software projects and describes objects as self-contained entities that help organize programs and data.
  • Several participants recommend textbooks and online resources for learning C++ and OOP, highlighting the importance of structured learning rather than piecemeal information from the internet.
  • One participant references a historical paper by Bjarne Stroustrup, discussing the evolution of programming paradigms leading to OOP and the unresolved challenges it presents.
  • There are repeated suggestions that beginners should first learn basic programming concepts before tackling OOP, with some participants agreeing on the necessity of foundational knowledge.
  • Another participant reiterates the importance of using proper language in forum discussions to gain respect and clarity.

Areas of Agreement / Disagreement

Participants generally agree that foundational programming knowledge is essential before learning OOP. However, there are varying opinions on the best resources and approaches to learning OOP, and some participants express differing views on the complexity of OOP concepts for beginners.

Contextual Notes

Some participants note that the discussion may be too advanced for complete beginners, and there are references to various resources that may or may not align with the needs of the original poster. The conversation reflects a range of experiences and suggestions without a clear consensus on the best path forward.

Who May Find This Useful

Beginners interested in learning programming, particularly those looking to understand object-oriented programming concepts and seeking resources for learning C++.

PainterGuy
Messages
938
Reaction score
73
hello,

i have tried to read wikipedia and wisegeek articles on _objected oritented programming_ but didn't learn a bit. I'm simply trying to learn the basics and know almost nothing abt programming so far. can u give me some basic understanding of this oop, please? wut r these objects? i thought computer anguages are written using instruction not objects... please show me the light. peace
 
Technology news on Phys.org
Hate to come off a little abrasive, but please make an attempt to use proper English while on the forums, I know that English isn't your first language, but you're not going to get much respect here when you use words like 'wat, r, wud, etc'.

painterguy said:
what are these objects? i thought computer languages are written using instruction not objects... please show me the light. peace

C++ is written using instructions, but you can think of these objects as tools. This is fairly advanced for someone who is just learning; usually you try to get the basic syntax and basic data structures down before learning Object Orientated Programming. These objects are data structures. These data structures are data types can can be decomposed into simpler data types. An example of an early data structure is an array, an array can be broken down into the individual elements that occupies it. A more complex data structure that is largely the foundation of OOP, is a class structure.

I highly suggest that for now you forget about the fact that C++ is an object orientated language and focus on learning the syntax and early data types.
 
Read this: https://www.physicsforums.com/showthread.php?t=32703

Or if you want something a little more thorough, this is my textbook from my first C++ class:
https://www.amazon.com/dp/0619216778/?tag=pfamazon01-20

This textbook pretty much covers everything you would ever need to know, even though now that I'm in a class that covers object orientated programming we don't use it.
We use this one now:
http://www.amazon.com/dp/0132129485/?tag=pfamazon01-20

I guess that first textbook is good for a pretty general overview of everything, but the second textbook gets into data structures much more deeply.
 
Last edited by a moderator:
painterguy said:
can u give me some basic understanding of this oop, please? wut r these objects? i thought computer anguages are written using instruction not objects...

OOP came about when software became so large that it was unmanageable using traditional functional programming. Objects are essentially a way to organize your program and data in a logical manner. Like putting your tools and parts in a nicely organized toolbox, rather than have them lying all over your garage (and never being able to find them).

An object is self-contained with its own constructor/destructor, functions, variables, and even operators. Each of those can be made inaccessible outside the object, which helps prevent bugs: if you accidentally try to access a non-public member, the compiler with say: “nope, can't do that!” You can also derive objects from other objects, which makes them reusable so you don't have to rewrite code over and over.

But on a lower level, C++ (OOP) is not that different from C (non-OOP).
 
Try a C++ textbook. You can't expect to learn OOP (or C++ for that matter, if it's your first programming language) in dribs and drabs from web pages scattered all over the Internet.

Bruce Eckels's book "Thinking in C++" is available online for free. I've seen many people recommend it, although I haven't used it myself.
 
I'd recommend learning how to program at all before trying to learn object oriented programming. You need to learn to walk before you can run...
 
Jocko Homo said:
I'd recommend learning how to program at all before trying to learn object oriented programming. You need to learn to walk before you can run...

Agreed. But it doesn't hurt to be curious.
 
  • #10
In 1988 in IEEE Computer Bjarne Stroustrup wrote "What is Object Oriented Programming?", there is a 1991 revision of this on the web if you search for the title in quotes.

Based on the description of the background of the person who posed the question I suspect the article might be a bit too complicated for him yet, so I will take the liberty of simplifying just a bit. The rest of you can breeze through the the paper itself.

He claimed that back in the olden days there was:
Procedural programming, decide what procedures and algorithms to use.

That was fine and then we wanted to write bigger and more complicated programs, so next was:
Data hiding, decide on what modules to use and hide data inside them, use procedural programming to implement these.

That was fine and then we wanted to write bigger and more complicated programs, so next was:
Data abstraction, decide what types and provide operations for these using data hiding.

That was fine and then we wanted to write bigger and more complicated programs, so next was:
Object oriented programming, decide what classes you want and use data abstraction to implement these.

In his paper he gives a lot more detail and describes the problems with each method that led to the next method.

In the 1988 paper he concluded with a statement something like "and these are the problems with Object Oriented programming, today nobody knows what the answers to these problems are, but in ten years someone will have found an answer." I always wondered what that answer turned out to be. The 1991 revision of the paper snipped off that summary and a few other things.
 
  • #11
jtbell said:
Try a C++ textbook. You can't expect to learn OOP (or C++ for that matter, if it's your first programming language) in dribs and drabs from web pages scattered all over the Internet.

Bruce Eckels's book "Thinking in C++" is available online for free. I've seen many people recommend it, although I haven't used it myself.

I second that recommendation. It is a good book that is very thorough.
 
  • #12
KrisOhn said:
Hate to come off a little abrasive, but please make an attempt to use proper English while on the forums, I know that English isn't your first language, but you're not going to get much respect here when you use words like 'wat, r, wud, etc'.

KrisOhn: thanks for the help. i would try my best to use proper full english words in future.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 32 ·
2
Replies
32
Views
7K
  • · Replies 24 ·
Replies
24
Views
3K
  • · Replies 43 ·
2
Replies
43
Views
7K
Replies
4
Views
5K
Replies
8
Views
1K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 13 ·
Replies
13
Views
9K
  • Sticky
  • · Replies 13 ·
Replies
13
Views
8K