Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming.threads > #1348

Re: Object Oriented Programming

Newsgroups comp.programming.threads
Date 2013-02-08 05:23 -0800
References <340b5a80-9f86-45fa-838d-34ca40ad866b@googlegroups.com> <5114eec7$0$13535$91cee783@newsreader04.highway.telekom.at>
Message-ID <fb5696a7-641c-4f97-a88d-cc19bc204dd0@googlegroups.com> (permalink)
Subject Re: Object Oriented Programming
From Pankaj Tiwari <pankajtiwarisagar@gmail.com>

Show all headers | View raw


On Friday, February 8, 2013 5:55:48 PM UTC+5:30, Johann Klammer wrote:
> New Baby wrote:
> 
> > They said that private declared data in a class is secured and can't be accessed from outside..I want to know what is that "outside" thing..?  is there someone sitting in my main function who can steal my beautiful integer if i declared it public...
> 
> >
> 
> > When Everything is protected inside the executable itself...what is the point behind those accessibility...are they invented to save me from the "Hacker"(as my teachers frightened me from my childhood)?
> 
> >
> 
> > Kick me..slap me..laught at me..but please Answer..i m sick of listening..i want to know today :/
> 
> 
> 
> It is not security related at all. It is interface related. If you are 
> 
> the only one hacking away at some small code snippet you can safely 
> 
> ignore all that OO-encapsulation stuff and make it all globals. If, 
> 
> however you are collaborating with several other people, someone will 
> 
> have to define public interfaces to use, and keep module internal stuff 
> 
> internal, to keep people from stepping on each others' toes. That's what 
> 
> private and protected is good for.


oh..that means when we work on different parts of program together in team...then this is used..I got it..
Thankyou Johann...:D

Back to comp.programming.threads | Previous | NextPrevious in thread | Find similar


Thread

Object Oriented Programming New Baby <pankajtiwarisagar@gmail.com> - 2013-02-07 10:05 -0800
  Re: Object Oriented Programming Noob <root@127.0.0.1> - 2013-02-08 10:15 +0100
  Re: Object Oriented Programming Johann Klammer <klammerj@NOSPAM.a1.net> - 2013-02-08 13:25 +0100
    Re: Object Oriented Programming Pankaj Tiwari <pankajtiwarisagar@gmail.com> - 2013-02-08 05:23 -0800

csiph-web