I have a class CreateDxf that writes DXF entity codes (line, circle etc) to a text file. Now I want to add dimension entity also.
The dimension entity shall have many parameters, so I want to make it a separate class. Then in my main code, I will create new Dimension objects and store them in a vector. I will provide this vector to the CreateDxf Class function that will output the codes to the text file.
Now I want to know the best method by which this CreateDxf class function can access Dimension class members. I have heard that the use of public methods like getters and setters is not considered a good practise as it violates the principle of encapsulation.
Is there any good way in which I can achieve the above?