0
I need to work with a JSON that has recipe information. This JSON has an object (Recipe) with some object arrays (Ingredients, Steps).
What would be more appropriate from the point of view of object orientation: create 3 classes-- Recipes
, Ingredients
, Steps
-- with the attributes received by JSON (id, name for the Recipes class, Quantity, Measure, ingredient for the Ingredients class, etc...) or create a single class (Recipes) with its attributes (id, name) and two ArrayList
of HashMap
with Ingredients and Steps values? And why?
Do not use screenshots instead of code, please. This disrupts the search and disrupts the reading by screen reader users.
– Pablo Almeida