This PPT contains all information about friend function in objective oriented programming. that is need, characteristic and syntax of friend function. Although I used cpp in this ppt.
Constructors are special class functions which performs initialization of every object. The Compiler calls the Constructor whenever an object is created. Destructor on the other hand is used to destroy the class object.
Constructors are special class functions which performs initialization of every object. The Compiler calls the Constructor whenever an object is created. Destructor on the other hand is used to destroy the class object.
This presentation is Unary operator overloading(prefix).
Here ,I try to describe how to Unary operator overloaded and its types with example. may be you can happily read this.
View study notes of Function overloading .you can also visit Tutorialfocus.net to get complete description step wise of the concerned topic.Other topics and notes of C++ are also explained.
C++ allows the common function to be made friendly with both the classes, thereby allowing the function to have access to the private data of these classes. Such a function need not be a member of any of these classes.
This presentation is Unary operator overloading(prefix).
Here ,I try to describe how to Unary operator overloaded and its types with example. may be you can happily read this.
View study notes of Function overloading .you can also visit Tutorialfocus.net to get complete description step wise of the concerned topic.Other topics and notes of C++ are also explained.
C++ allows the common function to be made friendly with both the classes, thereby allowing the function to have access to the private data of these classes. Such a function need not be a member of any of these classes.
Classes extend the built-in capabilities of C++ able you in representing and solving complex, real-world problems. A class is an organization of data and functions which operate on them. Data structures are called data members and the functions are called member functions, the combination of data members and member functions constitute a data
object or simply an object.
Class is a group of data member and member functions. Another word class is a collection of objects of similar type.
To create a class, use the class keyword followed by a name for the object. Like any other declared variable, the class declaration ends with a semi-colon. The name of a class follows the rules we have applied for variable and function names.
Intro to Python for High School Students.
Unit #2: classes, as well as docstrings, lambda, map, filter, logging, testing, debugging
Does not include GUI content
This report is about a 1 week's trip from Madhya Pradesh to Manipur. We visited Manipur for 5 days. This trip was fully sponsored by the government. Under EK Bharat Shreshth Bharat Yuva Sangam Campaign 55 delegates visited Manipur. This report contains photos, fun, and all information about our visit to Manipur.
Mathematical Model for Waste Water Treatment.pptxJagrati Mehra
This PPT is all about Mathematical modeling for waste water treatment. It contains introduction to waste water and waste water treatment. Aim for mathematical model. Then we took some assumptions for black box system. It contains system characterization. I mentioned variables and parameters that is used in mathematical model. causal relationship and formulation of mathematical model for single tank system and double tank system. To treat waste water we are using organisms like bacteria, protozoa etc. it contain picture of method of waste water treatment.
Self Learning, Cooperative and Collaborative LearningJagrati Mehra
This PPT contains definition, benefits and limitations of Self Learning, Cooperative & Collaborative Learning. Also it contains difference between Cooperative Learning & Collaborative Learning.
This PPT is all about learner as a developing individual. This PPT contains Piaget's 4 stages of cognitive development and Erikson's 8 stages of psychosocial development. Other than how can be learner consider as psychosocial entity is explained in this PPT.
This PPT Contains All about Plato's Philosophy of Mathematics. His early life and how he get interest in Mathematics and his great contribution to Mathematics.
Issue related to teacher motivation, working conditions in urban and rural areasJagrati Mehra
This ppt contains definition of teacher motivation, types of teacher motivation, issues related to teacher motivation, teacher absenteeism, working condition in both urban and rural areas and Maslow's Hierarchy of needs.
This PPT contains all about Buddhist Education. That is about Mahatma Buddha, Buddhist scriptures, noble truths, Pubjja and Upsampada ceremony and famous Buddhist universities.
This PPT contains all about cyclotron. That is introduction, history, types, uses, construction, working and limitations of cyclotron. This PPT also contains derivation and formula for cyclotron. Pictorial presentation is understandable for higher secondary school student. Although it is for Bachelor's level.
This PPT contains definition, types, signs, source and effects of water pollution. Prevention of water pollution and some data of water pollution of world. It contains pictures so high school grade student can also go through this PPT. Although It is for Bachelor's level.
Embracing GenAI - A Strategic ImperativePeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
Normal Labour/ Stages of Labour/ Mechanism of LabourWasim Ak
Normal labor is also termed spontaneous labor, defined as the natural physiological process through which the fetus, placenta, and membranes are expelled from the uterus through the birth canal at term (37 to 42 weeks
Honest Reviews of Tim Han LMA Course Program.pptxtimhan337
Personal development courses are widely available today, with each one promising life-changing outcomes. Tim Han’s Life Mastery Achievers (LMA) Course has drawn a lot of interest. In addition to offering my frank assessment of Success Insider’s LMA Course, this piece examines the course’s effects via a variety of Tim Han LMA course reviews and Success Insider comments.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
2. Suppose there is two different objects of two
different classes.
class ABC
ABC a
int data
function()
{
........
}
class XYZ
XYZ x
int data
function()
{
........
}
3. class ABC
ABC a
int data
function()
{
........
}
class XYZ
XYZ x
int data
function()
{
........
}
But what if I need to access both data and
information ?
Here we use friend function.
Access not
possible
..!!!
4. Simple only add friend in front of member function. We
don’t need to write (friend) while defining out of class.
void display
{
//body
}
friend void display
{
//body
}
How is friend function is different from
normal function?
Let understand by a program-
Normal function Friend function
6. void test::display()//normal function in scope of class.
{
cout<<“data 1= ”<<data1;//directly access private variable
cout<<“data 2=“<<data2<<endl;
}
void multiply(test t)//object as argument.
{
int data0;
data0=t.data1*t.data2;//need object name and dot(.)
cout<<“multiplication =“<<data0;
}
void main()
{
test obj(100,200);
obj.display();//need object name and dot(.) while calling.
multiply(obj);//direct calling.
getch();
}
7. friend function need not required scope
resolution operator.
friend function can be declared in private or
public doesn’t matter.
friend function can not be called using object of
the class.
friend function need object name and dot (.) to
access private members.
Usually it passes objects as arguments.
The function can define anywhere like a normal
function.
8. friend void total(boss b,employee e);
class boss
boss b
int salary
void display()
{
........
}
class employee
employee e
int salary
void display()
{
........
}
9. #include<iostream.h>
#include<conio.h>
class boss
{
int salary;
public:
boss()
{}
boss(int a)
{
salary=a;
}
void display()
{
cout<<“Boss Salary =“<<salary;
}
friend void total(boss,employee);
};
class employee
{
int salary;
public:
employee()
{}
employee(int b)
{
salary=b;
}
void display()
{
cout<<“Employee Salary =“<<salary;
}
friend void total(boss,employee);
};
10. void total_salary(boss b,employee e)
{
int total;
total=b.salary+e.salary;
cout<<“Total Salary =“<<total<<endl;
}
void main()
{
boss b(50000);
b.display();
employee e(25000);
e.display();
total(b,e);
getch();
}
Boss Salary =50000
Employee Salary=25000
Total Salary = 75000