Is it a good practice for a class to have only public (no private or protected) methods and variables?

  access-modifiers, c++

recently I am doing a project for a school course. I always declare all variables and methods inside every classes public because It helps me access those variables easier while developing and less coding for the get(); and set(); functions. However, i think this is the wrong way of doing OOP. Any ideas?

Source: Windows Questions C++

LEAVE A COMMENT