is there give me basic ideas planning concept of c++ project?
i have gui 2 line-edits , button , result-field. ( later want have many line-edits input , result want keep simple) idea combine input-data in new class ( class input ) . result want combine result-data in class ( class result). calculating results want create method (something result sum ( input in ) ). don`t want of in 1 class, need input , result classes because have many data-fields in final version
would concept? if so, write method of calculation (sum()) ? in input class, result class or main.cpp ?
typically if have kind of input/output(or results) design, want third entity: evaluator/operator
kind of thing feed in input , output result.
so if want flexibility, i'd @ 3 entities, not two:
input
encapsulate user input.evaluator/operator
takes input , outputsresult
.result
encapsulate computed result operator.
that'll give 3 separate entities: 1 focus on computation, , other 2 deal representing data.
this common nodal designs, so:
that's flexible design, suggests multiple relatively simple evaluators
taking multiple simple inputs , outputs.
that might overkill in case if need 1 complex evaluator , 1 complex string input , output. i'd still stick 3-entity/interface separation less monolithic/fussy design , clear separation of responsibilities.
Comments
Post a Comment