G
G
gitdev2018-03-01 21:32:18
OOP
gitdev, 2018-03-01 21:32:18

Is it correct to use a method that is not currently created?

1. There is an abstract class that implements some logic (sendRequest), declares an abstract method (sendHttp) and calls it.
2. This abstract method will be defined in the child class. And the sendRequest method will be called.
This is implemented in the backend part of the application.
Is this method definition correct, if not, what is the appropriate variant for this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2018-03-02
@qonand

Yes it is quite normal approach from the point of view of OOP. If you provided the code, it would be possible to give a more detailed comment.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question