P
P
Pitonist2242020-02-17 20:43:54
OOP
Pitonist224, 2020-02-17 20:43:54

How to implement the correct code architecture?

According to the assignment, you need to find a definite integral using 4 methods
- using the method of left rectangles
- the method of right rectangles
- the method of middle rectangles
- the trapezoid method
And draw a graph for each method. (the graph is drawn by points that are obtained in the process of finding the integral, namely in a cycle)
Graphs, like methods, are similar to each other.

What should be done?
Create a class in which to describe 4 methods for finding the integral and which will return values ​​and write points for the chart in the field, which (points) will be used already in another method of another class for the chart.
Or maybe these methods will return a tuple with a collection of points and the value of the integral.
Or maybe you should shove each method into different classes along with methods for creating graphs.

Or anyone have better ideas?

PS I, of course, could paint more ideas, but I think it's clear. There are many ways, but I don't know which one to choose.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shamanov, 2020-02-17
@Pitonist224

https://ru.wikipedia.org/wiki/%D0%A1%D1%82%D1%80%D...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question