Answer the question
In order to leave comments, you need to log in
What is the best way to organize the class structure?
Hello.
I am getting acquainted with OOP and decided to write a small project using mvc. A simple console application that prints weather data given input into the console. A little more detail:
Answer the question
In order to leave comments, you need to log in
If mvc, then in a simple application there are 3 packages: controller-class (classes) accept a request from the user and pass it to the model. In OOP mvc there is no business logic in the controller. model - it contains data structures, business logic (working with api in your case), parsing. It can be divided into subpackages within model. View - a class (classes) accept a ready-made object (objects) and display it on the screen, as needed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question