B
B
beginer1232017-09-08 13:03:05
Python
beginer123, 2017-09-08 13:03:05

How to rewrite programs for the OOP paradigm?

Hello, there are several programs in JS and Python.
They are written in a functional style and 100% fulfill their tasks
in them about 20-30 functions.
However, in order to study OOP, I would like to rewrite them using classes, prototypes, etc.
Are there any examples of how code written in a functional style is rewritten in OOP ?
What is the problem?
I myself understand how OOP works, but I just can’t start writing, because I don’t know the best practices and experience in OOP (except for simple examples from books)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladimir, 2017-09-08
@Casufi

https://www.amazon.com/Design-Patterns-Object-Orie...

A
Alexander, 2017-09-09
@Survtur

  1. Select objects that are being worked on or are being worked on - these are classes .
    It must be remembered that an object can contain other objects. That it is possible to operate with lists of objects. That objects can be passed to each other as parameters, etc.

C
chichackles, 2017-11-21
@chichackles

Learn C ++, OOP is normally organized there. In JS and PHP, this is all on strings, and by and large - a tribute to fashion, not a necessity. OOP is needed in complex projects, not in the web.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question