November 2002
I was a Computer Science Lecturer for
Degree and PG Students, at S Ch College, in Maddirala.
... .... ... ... ...
One day, I went to the classroom to explain
a topic, friend function. It’s a typical
topic in C++. Because, this friend
function concept violates the basic standards of OOPs (Object Oriented
Programming Concepts).
As per OOPs, a non-member function can’t access
the private data of a Class.
But, a non-member function can access the
private data of a Class, using 'friend function'.
Initially, I have given (technical)
explanation about friend function with an example. Later, I wanted to explain the typical
variation with a simple general example.
I said “Let’s understand the concept, with
a simple general example.
In a family (i.e., Class), private data is
not shared (i.e., accessed) by non-members.
A friend is a non-member in the family (i.e., Class), but share (i.e.,
access) the private data.
In general, we would like to share our
private matters with our friends.”.
I have observed a smile in Students, after
knowing this example.
I have mentioned the Students, to note down
this (general) example as a hint for reference.
---------
March 2003
[ In
our College, there is a procedure during Public Exams, i.e., when Students are
writing the final exam for a subject; that subject related Lecturer will meet
all his Students at end of the exam, to know their progress, and also involve
in their happiness. ]
Generally, our College is the Examination
Centre, for Public Exams. But, in the
year 2003, C R College is the Examination Centre, for our College Students.
C R College is in Chilakaluripet (pronunciation Chilakalooripeata à°šిలకలూà°°ిà°ªేà°Ÿ).
Exam Timings are 2 PM to 5 PM.
My best friend Mr. RamaKrishna B has given drop on his bike, in the College premises, by 4 PM.
I know C R College (Computer Science
Department) Staff. By seeing me in the
College, they wished me; and asked me the reason for my arrival. By knowing that I came to meet my Students,
at end of their exam; they said “Sir, your Students are very
sincere. Exam-halls are pin-drop
silent. They are taking many additional
sheets. They are staying in the
exam-halls, till end of the exam.”.
I
was smiled; and said “They know the value of time.”.
C R College Staff invited me into the
Staffroom. But, I said “Your college is
covered with full of Trees. Your college
atmosphere is excellent. Sitting outside
(under Tree) is much cooler than sitting inside (Staffroom).
Then, they said “Yes, Sir. It’s true.
We too like to stay outside, during summer.”. Then, they asked me anything for drink, i.e.,
Tea or Coffee. I have requested them for
Water.
Then, I have observed that there are
(stone-made) benches under some of the Trees.
I have chosen one of the Tree, that is near to our College’s Bus; and
sat on the Bench. Meanwhile, C R College
Office-Boy brought Water for me.
Our College Bus Staff wished me; and telling
me about Students’ progress in exams (for the past few days).
In the C R College premises, we heard the (exam) warning Bell, i.e., 5 minutes before 5 PM.
Later, Students were coming outside, slowly. By seeing them, Bus Staff said “Sir. Our Students are coming. Our Bus will start by 5.15 PM, from
here.”. Then, they moved towards Bus, to
make everything ready.
As my waiting place is clearly visible to
the Students, they saw me from faraway, and coming towards me in fast. Then, they started telling about their
experience in exam.
At that moment, a Student saw me, from
faraway; and started moving towards me in fast.
She came to near me; and tried to tell something with (breath)
breaks.
Then, I said “Just relax for a
minute. I know that you wanted to tell a
wonderful matter.”. She was a silent,
for a minute. At that time, remaining
Students were telling about their experience in exam.
After a minute, I turned towards her; and
said “Now, you tell me.”.
She started telling as “After reading the entire Exam
paper, I have identified that I forgot friend function concept, which is Short
Answer Question.
I got remember your Tips (while writing the
Exam).
So, I have started writing Answers which
are well-known to me.
After writing all known Answers, only one
question left, i.e., friend function.
Now, I have only half-an-hour time. Then, I came to know about your hint (for
recollecting information from memory). … … … …
First, I concentrated my mind.
Later, I took a rough sheet; and started
writing the words “friend function”.
Then, started writing their related words,
i.e, function, member function, and non-member function.
Next, started writing remaining related
words, i.e., access… sharing… accessing... private... matters.... data...
Now, I got to recollect general example… …
… … …
we would like to share our private matters
with our friends.
Then, I wrote general example, first. … … … … …
A friend is a non-member in the family, but
share the private data.
Updated it slightly. … … … … …
A friend is a non-member in the family
(i.e., Class), but share (i.e., access) the private data.
Later, I have restructured this general
example, in to the actual definition. …
… … …
A non-member function can access the
private data of a Class, using 'friend function'. … … … … …
Oh.
I am done.”.
I said “Wonderful.
I have designed the general example as a
hint, to remember the topic with definition.
But, you have invented topic with definition, from general example; … … in
reverse.
You have done… … Reverse
Engineering”.
Everyone smiled… a lot.
I said “Is your exam time sufficient, for
you… to do the entire analysis.”.
She said “I have managed all this… … in 20
minutes. Later, I have verified Answer
sheets, and then, tagged them.”.
I said “This memory mining task may be
suitable for one or two questions… maximum.”.
She said “Yes, Sir. Otherwise, it’s waste of time. Because, if we spend most of time for
analysis, when will write Exam ?”.
Then, all were laughed… a lot.
Another Student said “Sir…! You have mentioned this instruction also, in the
classroom.”.
Finally, College Bus was started. Then, we went into the Bus.
* * * * * THE END * * * * *