

I mean, not quite. There should be a split between backend (logic) and frontend (presentation) even for desktop applications. It’s not mandatory, but simply much better design. The ‘interface’ with which your frontend code calls the backend is much like an API (as in an API is also an interface)
Having data dependent on each other in a type means that either you have redundant data (so one of the fields should be computed) or that your container tries to be too generic (you should in this case prefer an ‘Apple’ class over a ‘Fruit’ class with an enum field ‘Type’)