Introduction to C++ : Object Oriented Technology, Advantages of OOP, Input- output in
C++, Tokens, Keywords, Identifiers, Data Types C++, Derives data types. The void data
type, Type Modifiers, Typecasting, Constant
C++ is an object-oriented programming language developed by Bjarne Stroustrup at AT&T Bell Lab in the year 1980. Initially it was named “C with classes” but later in 1983 the name changed to C++. It is an extension of C with..
What is Object-Oriented Programming?
The OOP programming approach is based on fundamental concepts of class and object.
OOP allows decomposition of a problem into a number of entities called objects and then builds data and functions around these objects.
There are many object-oriented programming languages including JavaScript, C++, Java, and Python.
It is programming style which is associated with concepts of class and object and various other concepts like:
Inheritance
polymorphism
abstraction
Encapsulation etc
Program are divided into small modules known as classes.
Function and data are tied together in an object.
Introduction to C++ : Object Oriented Technology, Advantages of OOP, Input- output in
C++, Tokens, Keywords, Identifiers, Data Types C++, Derives data types. The void data
type, Type Modifiers, Typecasting, Constant
C++ is an object-oriented programming language developed by Bjarne Stroustrup at AT&T Bell Lab in the year 1980. Initially it was named “C with classes” but later in 1983 the name changed to C++. It is an extension of C with..
What is Object-Oriented Programming?
The OOP programming approach is based on fundamental concepts of class and object.
OOP allows decomposition of a problem into a number of entities called objects and then builds data and functions around these objects.
There are many object-oriented programming languages including JavaScript, C++, Java, and Python.
It is programming style which is associated with concepts of class and object and various other concepts like:
Inheritance
polymorphism
abstraction
Encapsulation etc
Program are divided into small modules known as classes.
Function and data are tied together in an object.
Object Oriented Programming For Engineering Students as well as for B.Tech -IT. Covers Almost All From The Basics.
For more:
Google Search:: Prabhaharan Ellaiyan
This whole C++ course focus on giving the insight of different kind of data structures that could be used while dealing with a variety of data that needs to be stored depending upon the circumstances.
The course also focus on how to reduce the complexity of a code by teaching us the variety of approaches that could be employed for a solving the same problem.
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.
Acetabularia Information For Class 9 .docxvaibhavrinwa19
Acetabularia acetabulum is a single-celled green alga that in its vegetative state is morphologically differentiated into a basal rhizoid and an axially elongated stalk, which bears whorls of branching hairs. The single diploid nucleus resides in the rhizoid.
Object Oriented Programming For Engineering Students as well as for B.Tech -IT. Covers Almost All From The Basics.
For more:
Google Search:: Prabhaharan Ellaiyan
This whole C++ course focus on giving the insight of different kind of data structures that could be used while dealing with a variety of data that needs to be stored depending upon the circumstances.
The course also focus on how to reduce the complexity of a code by teaching us the variety of approaches that could be employed for a solving the same problem.
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.
Acetabularia Information For Class 9 .docxvaibhavrinwa19
Acetabularia acetabulum is a single-celled green alga that in its vegetative state is morphologically differentiated into a basal rhizoid and an axially elongated stalk, which bears whorls of branching hairs. The single diploid nucleus resides in the rhizoid.
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
Safalta Digital marketing institute in Noida, provide complete applications that encompass a huge range of virtual advertising and marketing additives, which includes search engine optimization, virtual communication advertising, pay-per-click on marketing, content material advertising, internet analytics, and greater. These university courses are designed for students who possess a comprehensive understanding of virtual marketing strategies and attributes.Safalta Digital Marketing Institute in Noida is a first choice for young individuals or students who are looking to start their careers in the field of digital advertising. The institute gives specialized courses designed and certification.
for beginners, providing thorough training in areas such as SEO, digital communication marketing, and PPC training in Noida. After finishing the program, students receive the certifications recognised by top different universitie, setting a strong foundation for a successful career in digital marketing.
A workshop hosted by the South African Journal of Science aimed at postgraduate students and early career researchers with little or no experience in writing and publishing journal articles.
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!
A Strategic Approach: GenAI in EducationPeter 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.
Executive Directors Chat Leveraging AI for Diversity, Equity, and InclusionTechSoup
Let’s explore the intersection of technology and equity in the final session of our DEI series. Discover how AI tools, like ChatGPT, can be used to support and enhance your nonprofit's DEI initiatives. Participants will gain insights into practical AI applications and get tips for leveraging technology to advance their DEI goals.
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Unit-V.pptx
1. • Programming Paradigms-monolithic, procedural, structured and object oriented ,
• Features of Object oriented programming:
• classes, objects, methods and message passing, inheritance, polymorphism,
containership, reusability, delegation, data abstraction and encapsulation
• Classes and Objects:
• classes and objects, class method and self object,
• class variables and object variables,
• public and private members, class methods.
Zeal College of Engineering and Research
UNIT: V Object Oriented Programming Lectures:
08 Hrs
2. Programming paradigm is an approach to solve problem using
some programming language.
There are lots for programming language that are known but all
of them need to follow some strategy when they are
implemented and this methodology/strategy is paradigms.
Various programming paradigms are
1. Monolithic Programming
2. Procedural Programming
3. Structural Programming
4. Object Oriented Programming
Programming Paradigm:
3. 1. Monolithic Programming:
The Program which contains a single function for the large
program is called monolithic program.
A program is not divided into parts
When program size increases it also increase difficulty.
The program is sequential code and variable used is global data.
goto statement is used for specific jump or flow control
statement.
4. Advantages:
Easy to implement programs for small applications.
Disadvantages:
If the program size is large then it is difficult to check error.
Due to single function, the program is difficult to maintain.
Code cannot be reused as it is written for specific problem.
5. 2. Procedural Programming
Procedural programming is a programming paradigm that uses
a linear or top-down approach.
It relies on functions (procedures or subroutines) to perform
computations.
Procedural programming is also known as imperative
programming.
Large programs are divided into smaller programs known as
functions.
Function access the global data.
Top down approach
6. Advantages:
Simple and easy to write.
These language have low memory utilization.
Disadvantages:
Parallel programming is not possible.
Difficult to maintain programs.
Less productive.
7. Also known as modular programming.
The structured program mainly consist of
1. Selection Statements (if, if…else, if….elif…else statements)
2. Sequence Statements
3. Iteration Statements (loops- for, while)
The program consist of structured and separate modules.
Example: C, Pascal
3. Structural Programming:
8. Advantages:
Program is easy to implement and maintain.
Programs are problem based not the machine based.
Disadvantages:
Conversion of program to machine code takes time.
Savitribai Phule Pune University -2019-20
9. 4. Object Oriented Programming:
The program is written as a collection of classes and object
which are meant for communication.
The smallest and basic entity is object and all kind of
computation is performed on the objects only.
Data and function are grouped into one entity called class.
Programs are divided into classes and member functions.
Savitribai Phule Pune University -2019-20
10. Advantages:
Importance is given to data.
Bottom up Approach
Data is hidden and can not be accessed by external functions.
Disadvantages:
Complex to implement.
Savitribai Phule Pune University -2019-20
11. Difference between procedure oriented language and object oriented language.
Savitribai Phule Pune University -2019-20
Sr
No.
Procedural Oriented
Language
Object oriented language
1
Importance is given to
algorithm
Importance is given to data
2 Top down appraoch Bottom Up Approach
3
Programs are divided into
functions
Programs are divided into objects
4 Data is not hidden
Data is hidden and can not be
accessed by external functions
5 no access specifier
private, public, protected access
specifier is used.
6 less secure more secure
7 Example: C, Pascal Example: C++, Java ,Python
12. Programming languages and the programming paradigms
they support.
C++ - Monolithic, Structured-oriented, Procedural-oriented and, Object-
oriented programming paradigm
Python - Object Oriented, Procedure, and Functional programming
paradigms
Java - Procedural and object oriented paradigm
JavaScript - functional, object-oriented, procedural, and prototypal
programming
C# - imperative, declarative, functional, generic, object-oriented (class-
based), and component-oriented
PHP - Procedural, Object-Oriented, and functional paradigm
Ruby - procedural, object-oriented, and functional programming
Visual Basic - object-oriented
13. Features of Object oriented programming:
1. Class:
class is a collection of objects.
It is a logical entity that has data members and methods
(member functions).
Once class has been defined, we can create any number of
objects belonging to that class.
Ex: Mango, Apple and Orange are the members of Fruit class.
Syntax:
class classname:
Ex:
class Fruit:
Savitribai Phule Pune University -2019-20
14. Syntax:
class classname:
statement 1 #Data members and Member functions
statement 2
statement 3
Ex:
class Student:
rollno = 101 # Data members
name = "Priya"
def fun(self):
print('Hello') # Member Functions
Savitribai Phule Pune University -2019-20
15. Class Method and self object:
The class methods are the function defined inside the class.
The class method defines the first argument as self. This is always
defined as the first argument.
If there is no argument in class method then only self is the argument for
that method.
The self argument refers to object itself.
Savitribai Phule Pune University -2019-20
16. 2. Object:
Object is an instance of class. The object is an entity that has state and
behavior.
It may be any real-world object like the person, place, bank account or
any item etc.
Everything in Python is an object.
Syntax:
objectname = classname( )
Ex:
obj = Fruit( )
Savitribai Phule Pune University -2019-20
17. Savitribai Phule Pune University -2019-20
Sr
No.
Class Object
1 Class is collection of
objects. Class is collection
of data members and
member functions.
An object is instance of a class.
2 Class is a logical entity. Object is a physical entity.
3 Class is declared once. Object is created many times.
4 Class doesn't allocated
memory when it is
created.
Object allocates memory when it
is created.
5
Ex: Class: Fruit
Ex: Object: Apple, Banana,
Mango, Guava
18. 3. Method:
The method is a function that is associated with an object.
There must be a special first argument self in all of method definitions.
Any object type can have methods.
There is usually a special method called __init__ ( )in most classes.
Savitribai Phule Pune University -2019-20
19. Example
1. Write a python program to find area of rectangle using class.
class Rect:
def __init__(self,length,breadth):
self.length=length
self.breadth=breadth
def Area(self):
print("Area of rectangle is: ",r1.length*r1.breadth)
r1 = Rect(160,120)
r1.Area()
OUTPUT:
Area of rectangle is: 19200
20. 4. Inheritance:
Inheritance is the process by which object of one class acquires
properties object of another class.
reusability concept is used.
Sub Class: The class that inherits properties from another class is called
Sub class or Derived Class.
Super Class/ Base class: The class whose properties are inherited by
sub class is called Base Class or Super class.
Example: Dog, Cat, Cow can be Derived Class of Animal Base Class.
Savitribai Phule Pune University -2019-20
21. Single Level Inheritance
class E:
def U_test_Marks(self):
print("Unit test marks submitted successfully")
def C_test_Marks(self):
print("Class test marks submitted successfully")
f1 = E()
f1.U_test_Marks()
f1.C_test_Marks()
class F(E):
pass
f2 = F()
f2.U_test_Marks()
22. 5. Reusability:
The child class inherits some behaviour of parent class.
For child class, it is not necessary to write code for inherited behavior,
i.e. child class directly used the methods written in parent class.
For instance, the class Student inherits Person class. Hence the method
such as getName( ), getAddress( ) of parent class Person can be
directly used by the Student class. The Student class can have its own
additional method such as getMarks( ).
Thus methods can be written once and can be reused.
Savitribai Phule Pune University -2019-20
23. 6. Polymorphism:
Ability to perform more than one forms.
An operation may exhibit different behaviors in different instances.
The behavior depends upon the types of data used in the operation.
Savitribai Phule Pune University -2019-20
1. Operator Overloading
2. Method Overriding
24. Method Overriding
class E:
def name1(self,name):
print(name)
f1 = E()
f1.name1("punam")
class F:
def name1 (self,name):
print(name)
f2 = F()
f1. name1("punamsawale")
25. 7. Containership:
one class contain the object of another class.
This type of relationship between classes is known as containership or
has a relationship.
The class which contains the object and members of another class in this
kind of relationship is called a container class.
Ex: 1) computer system has a hard disk
2) car has an Engine, chassis, steering wheels.
Savitribai Phule Pune University -2019-20
26.
27. 8. Delegation:
This is feature of object oriented programming by which one class
depends upon the other class.
It is represented by has a relationship.
In composition – The child cannot exist if parent class is not present i.e.
child class depends on parent class. It is strong relationship.
In delegation there is dependency of one class on another but even if
the parent class is not present the dependent class exists.
Ex: A teacher may belong to multiple departments. So, Teacher is a part
of multiple departments. But lets say if we “delete” a Department, the
Teacher will still be there. This is delegation.
A school can contain multiple classrooms. Now if we “delete” the
school, the classrooms will automatically be deleted. This is
composition.
Savitribai Phule Pune University -2019-20
28. 9. Data Abstraction and Encapsulation:
1. Data abstraction
Data abstraction means representing only essential features by hiding all
the implementation details.
Class is entity used for data abstraction.
The methods are defined in class. From main function we can access
these functionalities using objects.
2. Encapsulation
Encapsulation means binding of data and methods in single
entity called class.
The data inside the class is accessible by the function in same class.
Public and Private access specifier is used for data protection
It is normally not accessible from outside of the component.
Savitribai Phule Pune University -2019-20
30. Savitribai Phule Pune University -2019-20
Sr
No.
Data abstraction Data encapsulation
1
Representing only essential
features by hiding all the
implementation details.
binding of data and methods in
single entity called class.
2
It is used in software design
phase.
It is used in software
implementation phase.
3
abstraction using Abstract
Class.
encapsulation using Access
Modifiers (Public, Protected &
Private.)
4
Depends on object data
type.
independent on object data type.
5
Focus mainly on what
should be done.
Focus primarily on how it should
be done.
31. Class Variables and object variables
1. Class variable
The variables at the class level are called class variables.
The class variables are shared by all the instances of the class i.e. same
value is used for every instance or object
There is single copy of class variable which is shared among all the
objects, hence changes made by an object in a single copy of class
variable is reflected in all other objects.
2. Object Variable
The variable owned by each object is called object variable.
For each object or instance of class, the instance variables are different.
Object variables are defined in methods.
The changes made in one object variable will not be reflected for other
object variable.
Savitribai Phule Pune University -2019-20
32. class PPS:
Attendance = 0 #class variable
def __init__(self, var):
PPS.Attendance += 1
self.var = var #object variable
print("Lecture No: ", PPS.Attendance)
print("Total student present for lecture 1 : ", var)
obj1 = PPS(50)
obj2 = PPS(52)
obj3 = PPS(55)
Savitribai Phule Pune University -2019-20
33. Output:
Lecture No: 1
Total student present for lecture 1 : 50
Lecture No: 2
Total student present for lecture 1 : 52
Lecture No: 3
Total student present for lecture 1 : 55
Savitribai Phule Pune University -2019-20
34. Public and private members:
Public variables are those variables that are defined in the class and can be
accessed from within class and from outside the class using dot operator.
All members in a python class are public by default.
Private variables are those variables that are defined in the class but can
be accessible by the methods of that class only.
The private variables are used with double underscore( __ ) prefix.
Protected variables :The members of a class that are declared protected
are only accessible to a class derived from it.
Data members of a class are declared protected by adding a single
underscore (_) symbol before the data member of that class.
Savitribai Phule Pune University -2019-20
35. class ABC:
def __init__(self, var1, var2):
self.var1 = var1
self.__var2 = var2
def display(self):
print("From class method, variable 1 is: ", self.var1)
print("From class method, variable 2 is: ", self.__var2)
obj = ABC(10,20)
obj.display()
print("From class method, variable 1 is: ", obj.var1)
print("From class method, variable 2 is: ", obj.__var2)
Output:
From class method, variable 1 is: 10
From class method, variable 2 is: 20
From class method, variable 1 is: 10
Traceback (most recent call last)
---> 13 print("From class method, variable 2 is: ", obj.__var2)
AttributeError: 'ABC' object has no attribute '__var2'
Savitribai Phule Pune University -2019-20
36. Savitribai Phule Pune University -2019-20
To remove above error, to access private variable use
following syntax:
objectname._classname__privatevariable
Ex:
print("From class method, variable 2 is: ",obj._ABC__var2)
37. Savitribai Phule Pune University -2019-20
To access private method, use following syntax:
objectname._classname__privatemethodname
Ex:
class ABC:
def __init__(self, var):
self.__var = var
def __display(self):
print("From class method,variable is:",
self.__var)
obj = ABC(10)
obj._ABC__display()
Output:
From class method, variable is: 10
38. Savitribai Phule Pune University -2019-20
Write a program in python to Create class EMPLOYEE for storing details (Name,
Designation, gender, Date of Joining and Salary). Define function members to display all
EMPLOYEE details.
class Employee:
name = []
designation = []
gender = []
doj = []
salary = []
def __init__(self):
for i in range(3):
self.name.append(input("Enter the name:"))
self.designation.append(input("Enter the Designation:"))
self.gender.append(input("Enter the gender:"))
self.doj.append(input("Enter the doj:"))
self.salary.append(int(input("Enter the salary:")))
39. Savitribai Phule Pune University -2019-20
def display(self):
print("-------------Details of Employee-----------------")
print(" NamettDesignationtGenderttDate of
JoiningttSalary ")
print("-------------------------------------------------")
for i in range(3):
print(self.name[i],"tt",self.designation[i],"t",
self.gender[i],"tt",self.doj[i],"tt",self.salary[i] )
e = Employee()
e.display()
Output:
Enter the name:Sakshi
Enter the Designation:Manager
Enter the gender:Male
Enter the doj:10-06-2001
Enter the salary:50000
40. Savitribai Phule Pune University -2019-20
Enter the name:Rohit
Enter the Designation:Developer
Enter the gender:Male
Enter the doj:10-05-2009
Enter the salary:35000
Enter the name:Riya
Enter the Designation:Tester
Enter the gender:Female
Enter the doj:10-02-2012
Enter the salary:20000
----------------------Details of Employee--------------------------
Name Designation Gender Date of Joining Salary
-------------------------------------------------------------------
Sakshi Manager Male 10-06-2001 50000
Rohit Developer Male 10-05-2009 35000
Riya Tester Female 10-02-2012 20000