Object Oriented Programming vs Structural Programming

Click For Summary

Discussion Overview

The discussion revolves around the differences between Object Oriented Programming (OOP) and Structural Programming, focusing on their paradigms, features, and practical applications. Participants explore concepts such as encapsulation, inheritance, polymorphism, and the organization of code within these paradigms.

Discussion Character

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

Main Points Raised

  • Fog37 expresses confusion about the differences between structural programming and OOP, noting that OOP is centered around data and involves classes, objects, and methods.
  • Some participants suggest that OOP emphasizes objects, which encapsulate both data and methods, rather than data alone.
  • One participant provides an example of a traffic simulation to illustrate how OOP organizes behavior and properties of different vehicle objects.
  • Another participant emphasizes that both data and methods are equally important in OOP, highlighting the need to understand encapsulation, inheritance, and polymorphism.
  • Fog37 questions how methods can operate without input parameters, suggesting that external variables might be considered inputs.
  • Some participants clarify that methods can indeed have arguments and return results, and suggest that practical coding examples would aid understanding.
  • Fog37 mentions abstraction as a feature of OOP that simplifies user interaction with objects by hiding certain properties and methods.

Areas of Agreement / Disagreement

Participants generally agree on the importance of understanding both paradigms and their features, but there is no consensus on the specifics of how methods operate without inputs or outputs, and the discussion remains unresolved regarding the nuances of these programming paradigms.

Contextual Notes

Participants express varying levels of familiarity with OOP concepts, and some foundational assumptions about programming paradigms may be missing. The discussion includes multiple perspectives on the role of methods and the organization of code, which may depend on individual interpretations of OOP principles.

  • #31
Thank you. You are right. I guess I was my question was implicitly referring to the Java language...
 
Technology news on Phys.org
  • #32
"The line of code Servo myservo creates the object."

I think the above statement is not precisely accurate. "Servo myservo" declares the name-and-type of an object that the programmer intends to use subsequently. Actually to create (i.e., allocate memory for) the object requires an assignment statement, such as "myservo = new Servo".
 
  • Like
Likes   Reactions: QuantumQuest and Chestermiller
  • #33
OOP reflects the real world behavior of how things work. It is important because
  • It make visualization easier because it is closest to real world scenarios.
  • You can reuse the code, this saves time, and shrinks your project.
  • Once you know the concept, it makes you a cooler coder among your friends ;) .
There are 3 basic features of object oriented programming language:
  • Inheritance
  • Polymorphism
  • Encapsulation
By using these features you can easily reuse your program or part of your program. Object oriented programming provides you a power to do programming in a very effective manner. Learn OOP concept and implement it in your daily programs.
 
  • Like
Likes   Reactions: FactChecker

Similar threads

Replies
86
Views
2K
  • · Replies 22 ·
Replies
22
Views
2K
  • · Replies 54 ·
2
Replies
54
Views
5K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
10
Views
5K
  • · Replies 24 ·
Replies
24
Views
3K
  • · Replies 26 ·
Replies
26
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K
  • Sticky
  • · Replies 13 ·
Replies
13
Views
8K
  • · Replies 6 ·
Replies
6
Views
2K