Make the data members private and any member functions that manipulate those data members public. Ensure the member functions do any error checking required, rather than blithely making changes that leave class members in an invalid state.

Don't pass arguments to functions by (non-const) reference unless you intend the function to change that argument - pass by value instead, which has the effect of passing a copy of the supplied argument to the function. If you want to pass by reference (eg because the argument is a large data structure, so creating a copy is expensive) but not change the argument at all, then pass by const reference.

The above are initial tips to get you started, not laws of nature. If you can't justify doing things differently than I have suggested, then don't. However, as you get more experience you will find circumstances where the tips don't apply - and find justifications for doing things differently.