0

I had to do a true or false homework here, and I have my doubts with these three things I've been reading but the more I read the more kind of confused I get. Here are my conclusions I hope you can help me understand better.

1) "Object-oriented design is hard because object-oriented technologies are tied close to peoples mental models". I find this true because OOP is a way for humans to see problems and its solution.

2) "in object-oriented programming a complex system is decomposed into a hierarchy of collaborating objects". I said it's true but I have my doubts, because I'm not sure if its right to say collaborating "objects" I feel like it should be components or something different but at the same time I understand that in OOP objects of a class collaborate with objects of another class.

3) Finally "procedural programs are easier to design than object-oriented programs" I said it was true but I'm not sure why what I was reading was that in procedural the programmer writes like a history, he just goes on programming the solution and doesn't make a full model of it, he uses something called "top-down" and yeah that's what I caught that procedural is easier to design but harder to make changes while OOP is harder to design but easier to make changes.

halfer
  • 19,824
  • 17
  • 99
  • 186
BugsForBreakfast
  • 712
  • 10
  • 30
  • Is there a difference between the "POO" you use and the "OOP" I would expect in this context? – Yunnosch Aug 08 '18 at 04:38
  • Oh yeah its OOP sorry is just that im spanish so it is "programacion orientada a objetos (POO)" Sorry i forgot that lol – BugsForBreakfast Aug 08 '18 at 04:47
  • I see, interesting. Without implying that Spanish is wrong, I recommend to edit your question and use the English acronym, just to help those poor souls who only speak other languages. ;-) – Yunnosch Aug 08 '18 at 04:53
  • Possible duplicate of [OOP vs Functional Programming vs Procedural](https://stackoverflow.com/questions/552336/oop-vs-functional-programming-vs-procedural) – Andreas is moving to Codidact Aug 08 '18 at 09:04

2 Answers2

1

1)Object-oriented design is not hard. It's just that, you should learn procedural programming first for its limitations to be visible. Unless a student learns procedural programming, OOP doesn't seem very useful to the student.

2) In OOP, A class is designed with a specific goal. Its purpose must be clear to the users. An entity in solving a problem is categorized as a class if there is a need for more than one instance of this class. Also, it is very important to entrust a responsibility to an object. Presenting simply the behaviors such as reading data and displaying data in a class is a poor design of a class. To perform complex tasks, one class must jointly work with the other classes to perform the task. This approach is known as collaboration among classes. The class must be designed with essential attributes and behavior to reflect an idea in the real world.

3) Finally, yes you are true in a sense that, Procedural programming is a top-down approach and OOP is a bottom-up approach which starts with a solution. If there is an existing solution, that solution is studied first and the necessary details are identified and organized in a suitable manner. For a problem not having a solution, the domain experts (i.e., experts who are capable of providing useful information and future requirements) are consulted with the conventional solution to start with. Since the software is developed by analyzing the solution first, this approach is known as bottom-up approach

Yunnosch
  • 26,130
  • 9
  • 42
  • 54
Trupti J
  • 512
  • 1
  • 4
  • 16
0

1) I think your reason is a reason for saying that OOP is NOT hard.

2) For me "components" are pieces of software (very context-specific definition of the term).
Each component defines one or more (maybe even zero) classes of objects. Objects are instances of classes. What is actually collaborating are the objects, behaving as defined by their classes, which are coded in components.

3) It might be easier to design a procedural program than an OOP program (in seeming contrast to 1) ), if your programming thinking is "I want to have this happen". If you are able to put the human thinking models into design and then into code, OOP is easier.
Hard to say, but cynically I would answer "No", just because anybody teaching OOP and making an exam for it will probably have spent a year to tell you that OOP is better in each and every aspect. (Excuse the exaggeration of how extreme the teacher is. The better they are, the more balanced the teachings will of course be.)

Yunnosch
  • 26,130
  • 9
  • 42
  • 54