C++ is most often used programming language. This slide will help you to gain more knowledge on C++ programming. In this slide you will learn the fundamentals of C++ programming. The slide will also help you to fetch more details on Object Oriented Programming concepts. Each of the concept under Object Oriented Programming is explained in detail and in more smoother way as it will helpful for everyone to understand.
A class is a code template for creating objects. Objects have member variables and have behaviour associated with them. In python a class is created by the keyword class.
An object is created using the constructor of the class. This object will then be called the instance of the class.
Inheritance and Polymorphism in Python. Inheritance is a mechanism which allows us to create a new class – known as child class – that is based upon an existing class – the parent class, by adding new attributes and methods on top of the existing class.
C++ is most often used programming language. This slide will help you to gain more knowledge on C++ programming. In this slide you will learn the fundamentals of C++ programming. The slide will also help you to fetch more details on Object Oriented Programming concepts. Each of the concept under Object Oriented Programming is explained in detail and in more smoother way as it will helpful for everyone to understand.
A class is a code template for creating objects. Objects have member variables and have behaviour associated with them. In python a class is created by the keyword class.
An object is created using the constructor of the class. This object will then be called the instance of the class.
Inheritance and Polymorphism in Python. Inheritance is a mechanism which allows us to create a new class – known as child class – that is based upon an existing class – the parent class, by adding new attributes and methods on top of the existing class.
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..
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
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
Similar to Object oriented programming in python (20)
Explore the innovative world of trenchless pipe repair with our comprehensive guide, "The Benefits and Techniques of Trenchless Pipe Repair." This document delves into the modern methods of repairing underground pipes without the need for extensive excavation, highlighting the numerous advantages and the latest techniques used in the industry.
Learn about the cost savings, reduced environmental impact, and minimal disruption associated with trenchless technology. Discover detailed explanations of popular techniques such as pipe bursting, cured-in-place pipe (CIPP) lining, and directional drilling. Understand how these methods can be applied to various types of infrastructure, from residential plumbing to large-scale municipal systems.
Ideal for homeowners, contractors, engineers, and anyone interested in modern plumbing solutions, this guide provides valuable insights into why trenchless pipe repair is becoming the preferred choice for pipe rehabilitation. Stay informed about the latest advancements and best practices in the field.
Student information management system project report ii.pdfKamal Acharya
Our project explains about the student management. This project mainly explains the various actions related to student details. This project shows some ease in adding, editing and deleting the student details. It also provides a less time consuming process for viewing, adding, editing and deleting the marks of the students.
Cosmetic shop management system project report.pdfKamal Acharya
Buying new cosmetic products is difficult. It can even be scary for those who have sensitive skin and are prone to skin trouble. The information needed to alleviate this problem is on the back of each product, but it's thought to interpret those ingredient lists unless you have a background in chemistry.
Instead of buying and hoping for the best, we can use data science to help us predict which products may be good fits for us. It includes various function programs to do the above mentioned tasks.
Data file handling has been effectively used in the program.
The automated cosmetic shop management system should deal with the automation of general workflow and administration process of the shop. The main processes of the system focus on customer's request where the system is able to search the most appropriate products and deliver it to the customers. It should help the employees to quickly identify the list of cosmetic product that have reached the minimum quantity and also keep a track of expired date for each cosmetic product. It should help the employees to find the rack number in which the product is placed.It is also Faster and more efficient way.
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Dr.Costas Sachpazis
Terzaghi's soil bearing capacity theory, developed by Karl Terzaghi, is a fundamental principle in geotechnical engineering used to determine the bearing capacity of shallow foundations. This theory provides a method to calculate the ultimate bearing capacity of soil, which is the maximum load per unit area that the soil can support without undergoing shear failure. The Calculation HTML Code included.
Overview of the fundamental roles in Hydropower generation and the components involved in wider Electrical Engineering.
This paper presents the design and construction of hydroelectric dams from the hydrologist’s survey of the valley before construction, all aspects and involved disciplines, fluid dynamics, structural engineering, generation and mains frequency regulation to the very transmission of power through the network in the United Kingdom.
Author: Robbie Edward Sayers
Collaborators and co editors: Charlie Sims and Connor Healey.
(C) 2024 Robbie E. Sayers
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdffxintegritypublishin
Advancements in technology unveil a myriad of electrical and electronic breakthroughs geared towards efficiently harnessing limited resources to meet human energy demands. The optimization of hybrid solar PV panels and pumped hydro energy supply systems plays a pivotal role in utilizing natural resources effectively. This initiative not only benefits humanity but also fosters environmental sustainability. The study investigated the design optimization of these hybrid systems, focusing on understanding solar radiation patterns, identifying geographical influences on solar radiation, formulating a mathematical model for system optimization, and determining the optimal configuration of PV panels and pumped hydro storage. Through a comparative analysis approach and eight weeks of data collection, the study addressed key research questions related to solar radiation patterns and optimal system design. The findings highlighted regions with heightened solar radiation levels, showcasing substantial potential for power generation and emphasizing the system's efficiency. Optimizing system design significantly boosted power generation, promoted renewable energy utilization, and enhanced energy storage capacity. The study underscored the benefits of optimizing hybrid solar PV panels and pumped hydro energy supply systems for sustainable energy usage. Optimizing the design of solar PV panels and pumped hydro energy supply systems as examined across diverse climatic conditions in a developing country, not only enhances power generation but also improves the integration of renewable energy sources and boosts energy storage capacities, particularly beneficial for less economically prosperous regions. Additionally, the study provides valuable insights for advancing energy research in economically viable areas. Recommendations included conducting site-specific assessments, utilizing advanced modeling tools, implementing regular maintenance protocols, and enhancing communication among system components.
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)MdTanvirMahtab2
This presentation is about the working procedure of Shahjalal Fertilizer Company Limited (SFCL). A Govt. owned Company of Bangladesh Chemical Industries Corporation under Ministry of Industries.
2. Programming Paradigm
lA fundamental style of programming that defines how the structure and basic
elements of a computer program will be built.
lStyle of writing programs and set of capabilities and limitations of a PL has
depends on programming paradigm it supports.
lPP can be classified as follows:
1. Monolithic Programming
2. Procedural Programming
3. Structured Programming
4. Object Oriented Programming
lEach of these paradigms has its own strengths and weaknesses
lNo single paradigm can suit all applications.
le.g. for designing computation intensive problems, procedure oriented
programming is preferred.
3. Monolithic Programming
lPrograms written using monolithic
programming languages such as assembly
language and BASIC consists of global data
and sequential code.
lGlobal data can be accessed and modified
from any part of program.
lSequential code is one in which all instructions
are executed in the specified sequence.
lMonolithic programs have just one program
module.
lAll the actions required to complete a task are
embedded within same application itself.
lThis makes the size of the program large and
also makes it difficult to debug and maintain.
lUsed only for small and simple applications
MOV AX, A
ADD AX, B
MOV SUM, AX
JMP STOP
……….
STOP : EXIT
ADB 10
BDB 20
SUM DB?
Global
data
Sequential
code with
jmp
instruction
4. Procedural Programming
lIn procedure language, a program is divided into n
number of subroutines that access global data.
lTo avoid repetition of code, each subroutine performs
a well defined task.
lA subroutine that needs the service provided by
another subroutine can call that subroutine.
lAdvantages:
l1. goal is to write correct program
l2. easier to write as compared to monolithic
lDisadvantages:
l1. writing program is complex
l2. No concept of reusability
l3. require more time and effort
l4. difficult to maintain
l5. global data may get altered.
Global data
Program
Subprogram
Structure of procedural program
5. Structured Programming
lAlso referred as modular programming.
lSuggested by mathematician Corrado Bohm
and Guiseppe Jacopini.
lSpecifically designed to enforce a logical
structure on the program to make it more
efficient and easier to understand and modify.
lTop-down approach
lOverall program structure is broken down into
separate modules.
lThis allows the code to be loaded into memory
more efficiently and also reused in other
programs.
lModules are coded separately and once
module is written and tested , it is then
integrated with other modules to form overall
program.
Global data
Program
Modules
Structured Program
6. Object Oriented Programming
lIt treats data as a critical element in program
development and restricts its flow freely
around the system.
lTask based and data based
lAll the data and tasks are grouped together in
entities known as objects.
lIt uses routines provided in the object.
lEvery object contains some data and the
operations, methods or functions that operate
on that data.
lIn this approach, the list is considered an
object consisting of the list, along with a
collection of routines for manipulating the list.
Object1
Object 2
Object 3
Object 4
Objects of a Program interact by
sending messages to each other
7. Object Oriented Programming
lPrograms are data centered.
lPrograms are divided into objects.
lFunctions that operate on data are tied
together with the data.
lData is hidden and not accessible by
external functions.
lNew data and functions can be easily added
as and when required.
lFollows a bottom-up approach.
Methods/functions
Private data
Object
8. PROCEDURAL ORIENTED PROGRAMMING OBJECT ORIENTED PROGRAMMING
In procedural programming, program is
divided into small parts called functions.
In object oriented programming, program
is divided into small parts called objects.
Procedural programming follows top down
approach.
Object oriented programming follows
bottom up approach.
There is no access specifier in procedural
programming.
Object oriented programming have access
specifiers like private, public, protected
etc.
Adding new data and function is not easy. Adding new data and function is easy.
Procedural programming does not have any
proper way for hiding data so it is less
secure.
Object oriented programming provides
data hiding so it is more secure.
In procedural programming, overloading is
not possible.
Overloading is possible in object oriented
programming.
In procedural programming, function is
more important than data.
In object oriented programming, data is
more important than function.
Procedural programming is based on unreal
world.
Object oriented programming is based on
real world.
Examples: C, FORTRAN, Pascal, Basic etc. Examples: C++, Java, Python, C# etc.
10. Classes
lA class is used to describe something in
the world, such as occurrences, things,
external entities, etc.
lA class provides a template or blueprint
that describes the structure and behavior
of a set of similar objects.
le.g.
lConsider class student with function
showdata() and attributes namely, rollno,
name, and course.
lOnce a class is declared, programmer can
create any number of objects of that class.
lClass defines properties and behavior of
objects.
lA class is a collection of objects
lIt is a user defined datatype that behaves
same as the built in datatypes.
class student:
def __init__(self, rollno, name,course):
self.rollno=rollno
self.name=name
self.course=course
def showdata(self):
print(“Rollno=“, self.rollno)
print(“Name=“, self.name)
print(“Course=“, self.course)
11. Objects
lObject is an instance of a class.
lEvery object contains some data and
functions.
lThese methods store data in variables
and respond to the messages that they
receive from other objects by
executing their methods.
lWhile a class is a logical structure, an
object is a physical actuality.
lTo create object:
Obj_nmae=class_name()
To create an object of class student,
Stud=student()
Object name
Attribute 1
Attribute 2
………..
Attribute n
Function 1
Function 2
…………
Function n
Representation of an object
12. Class method and self argument
Exactly same as ordinary function but with one difference
Class methods must have the first argument named as self.
You do not pass a value for this parameter when you call the method.
Python provides its value automatically.
The self argument refers to the object itself.
That is, the object that has called the method.
even if a method that takes no arguments, it should be defined to accept the self.
Since the class methods uses self, they require an object or instance of the class to be
used.
For this reason, they are often referred to as instance methods.
13. The __init__ method(the class constructor)
The __init__ method has a special significance in Python classes.
It is automatically executed when an object of a class is created.
The method is useful to initialize the variables of the class object.
__init__ is prefixed as well as suffixed by double underscores.
e.g.
class ABC()
def __init__(self, val)
print(“in class method…….”)
self.val=val
print(“the value=”, val)
obj=ABC(10)
OUTPUT:
in class method…….
The value=10
In the __init__ method we define a variable as self.val which has exactly the same name as
that specified in the argument list.
Though the two variables have the same name, they are entirely different variables.
The self.val belongs to the newly created object.
__init__ method is automatically involved when the object of the class is created.
14. Method and message passing
lA method is a function associated with
a class.
lIt defines the operation that the object
can execute when it receives a
message.
lOnly methods of the class can access
and manipulate the data stored in an
instance of the class.
lTwo objects can communicate with
each other through messages.
lAn object asks another object to
invoke one of its methods by sending it
a message.
Sender
object
Receiver
object
15. Inheritance
lA new classis created from an existing class
lNew class known as subclass, contains the
attributes and methods of the parent class.
lThe new class known as derived class in herits
the attributes and behavior of the preexisting
class which is referred as superclass or parent
class
lTherefore inheritance relation relation is also
called as ‘is-a’ relation.
lAdvantage : ability to reuse the code
e.g. class student has data members rollno,
name, course and methods getdata(), setdata().
We can inherit two classes from student class,
namely UG and PG students.
These two classes will have all the properties
and methods of class students and in addition to
that will have even more members.
Parent
features
Parent +
child
features
Parent, base or super class
Child, derived or subclass
16. Polymorphism
lRefers to having several different forms.
lIt is related to methods.
lIn Python, polymorphism exists when a number of subclasses is defined which have
methods of same name.
lA function can use objects of any of the polymorphic classes irrespective of the fact that
these classes are individually distinct.
lPolymorphism can also be applied to operators.
le.g. a+b will give result of adding a and b.
lWhen we overload the +operator to be used with strings, then result is concatenation of
two strings.
17. Containership
lIs the ability of a class to contain objects of one of more classes as member data.
le. g. Class One an have object of class Two as its data member.
lThis would allow the object of class One to call the public functions of class Two.
lHere Class One becomes the container, whereas class Two becomes the contained
class.
lContainership is also called composition because class Oneiscomposed of class Two.
lIt represents ‘has-a’ relationship.
18. Reusability
lMeans developing codes that can be reused either in same program or in different
programs.
lReusability is attained through inheritance, containership and polymorphism.
19. encapsulation
lEncapsulation defines three access levels:
1.Public: any data or function can be accessed by any function belonging to any class.
This is the lowest level of data protection.
2. Protected: any data or function can be accessed only by that class or by any class
that is inherited from it.
3. Private: any data or function can be accessed only by that class in which it is declared.
This is the highest level of data protection.
20. Delegation
lIn delegation more than one object is involved in handling request.
lThe object that receives the request for a service, delegate it to another object called its
delegate.
lDelegation is based on the property that a complex object is made of several simpler
objects.
le. g. our body is made up of brain, heart, hand, eyes etc. the functioning of the whole
body as a system rests on correct functioning of the parts it is composed of.
lIn delegation, they have ‘has-a’ relationship.
21. Data abstraction and encapsulation
lRefer to the process by which data and functions are defined in such a way that only
essential details are revealed and the implementation details are hidden.
lThe main focus of data abstraction is to separate the interface and the implementation of
a program.
le.g. as user of television set, we can switch it on or off, change the channel, set the
volume without knowing the details about how its functionality has been implemented.
lClasses provide public methods to the outside world to provide the functionality of the
object or to manipulate the objects data.
lData encapsulation also called data hiding.
lData hiding is the technique of packing data and functions into a single component to
hide implementation details of a class from the users.
lTherefore encapsulation prevents data access by any function that is not specified in the
class.
lThis ensures integrity of the data contained in the object.