class object privacy and public