InsertUserName
Member
- Joined
- Apr 19, 2020
- Messages
- 7
- Programming Experience
- 1-3
[Unity]
Hi, everybody. I try to bring my knowledge to the ideal, in particular the principles of SOLID.
Is it correct if the data class (which contains an abstraction but NOT an implementation) will have methods GetAvailableItems... that is, methods that return data of this class after the necessary processing. The class state does not change.
Or by SOLID and OOP, the class /structure data should not have an implementation at all (any methods), but only fields and properties.
Example:
Is there a violation of SOLID and OOP ?
Hi, everybody. I try to bring my knowledge to the ideal, in particular the principles of SOLID.
Is it correct if the data class (which contains an abstraction but NOT an implementation) will have methods GetAvailableItems... that is, methods that return data of this class after the necessary processing. The class state does not change.
Or by SOLID and OOP, the class /structure data should not have an implementation at all (any methods), but only fields and properties.
Example:
C#:
public class Content : ScriptableObject
{
private int _example...;
private int _example..;
private int _example.;
private int[] _items;
public int[] GetAvailableItems()
{
int[] list = new int[] {};
//....
return list;
}
}
Is there a violation of SOLID and OOP ?