Pls...could any one tell me that whether we can access the
public data memeber of a class from another class with in
the same program.
Awaiting for your response Thanku
Answers were Sorted based on User's Feedback
Answer / naveen
yes, by using inheritance we can access public members of
class in other class
Is This Answer Correct ? | 8 Yes | 0 No |
Answer / pramod
If it's about the data accessing, whether public or private
... you can use friend function.This friend function can be
member of 2nd class and friend for the 1st class.
Is This Answer Correct ? | 6 Yes | 0 No |
Answer / poorna chandar rao
yes accesses the public member of data of another class by
using Extend from another class
Is This Answer Correct ? | 2 Yes | 1 No |
What makes a language oop?
Is this job good for future? can do this job post grduate student?
What is abstraction?
for example A,B,C,D are class all the 4 class contain one method who() but the method who() implementaion is differnet among each class. the relation among the 4 class are A is base class and is inherited by B and C.and from this two B and C where D is inherited. the question is i want to display the output who() method in all the classes(A,B,C,D)the output of who() method is diferrent amond all the class(A,B,C,D) ------A------ virtuval who(print a) override | | who(print b) B C override who(print c) | | -------D------ override who(print d)
2. Give the different notations for the class.\
can you explain how to use JavaBean in Project
In OverLoading concept,Why they are not consider return value and why they are consider only parameters in method? For ex: public int Add(int a,int b){...} public String Add(int a,int b){...}
Why is abstraction needed?
Can we have a private constructor ?
12 Answers HSBC, Ness Technologies, TCS, Wipro,
how much classes are used in c++
What is DeadlyDiamondDeathProblem ?
Write a program to demonstrate the use of 'Composition' in C++