Virtual functions allow functions to be overridden in derived classes. They are useful for runtime polymorphism. A pure virtual function is a virtual function in a base class that has no definition, serving as a placeholder that must be overridden in derived classes. Derived classes that override all pure virtual functions from their base classes can have objects instantiated.
Linked list
Advantages and disadvantages
Types of linked lists
Singly linked list
Doubly linked list
Header linked lists
Applications of linked list
Algorithm to search a value
Example of LinkedList
Algorithm for inserting a node
single link list
Applications of Arrays
data in continuous memory
queues
stacks
beginning of a linked list
traversing a linked list
Algorithm for traversing
Grounded header linked list
Circular Header linked list
Linked list
Advantages and disadvantages
Types of linked lists
Singly linked list
Doubly linked list
Header linked lists
Applications of linked list
Algorithm to search a value
Example of LinkedList
Algorithm for inserting a node
single link list
Applications of Arrays
data in continuous memory
queues
stacks
beginning of a linked list
traversing a linked list
Algorithm for traversing
Grounded header linked list
Circular Header linked list
Data structure Stack presentation for university student .this presentation created by "Sheikh-Monirul-Hasan " in Department of computer science at Green University of Bangladesh.
Python Class | Python Programming | Python Tutorial | EdurekaEdureka!
( Python Training : https://www.edureka.co/python )
This Edureka Python Class tutorial (Python Tutorial Blog: https://goo.gl/wd28Zr) will help you understand Python Classes and Objects with examples. It will also explain the concept of Abstract Classes and Inheritance in python.
Check out our Python Training Playlist: https://goo.gl/Na1p9G
This Python Programming tutorial video helps you to learn following topics:
1. Python Classes and Objects
2. Inheritance
3. Abstract Classes
Data structure Stack presentation for university student .this presentation created by "Sheikh-Monirul-Hasan " in Department of computer science at Green University of Bangladesh.
Python Class | Python Programming | Python Tutorial | EdurekaEdureka!
( Python Training : https://www.edureka.co/python )
This Edureka Python Class tutorial (Python Tutorial Blog: https://goo.gl/wd28Zr) will help you understand Python Classes and Objects with examples. It will also explain the concept of Abstract Classes and Inheritance in python.
Check out our Python Training Playlist: https://goo.gl/Na1p9G
This Python Programming tutorial video helps you to learn following topics:
1. Python Classes and Objects
2. Inheritance
3. Abstract Classes
Final project report on grocery store management system..pdfKamal Acharya
In today’s fast-changing business environment, it’s extremely important to be able to respond to client needs in the most effective and timely manner. If your customers wish to see your business online and have instant access to your products or services.
Online Grocery Store is an e-commerce website, which retails various grocery products. This project allows viewing various products available enables registered users to purchase desired products instantly using Paytm, UPI payment processor (Instant Pay) and also can place order by using Cash on Delivery (Pay Later) option. This project provides an easy access to Administrators and Managers to view orders placed using Pay Later and Instant Pay options.
In order to develop an e-commerce website, a number of Technologies must be studied and understood. These include multi-tiered architecture, server and client-side scripting techniques, implementation technologies, programming language (such as PHP, HTML, CSS, JavaScript) and MySQL relational databases. This is a project with the objective to develop a basic website where a consumer is provided with a shopping cart website and also to know about the technologies used to develop such a website.
This document will discuss each of the underlying technologies to create and implement an e- commerce website.
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.
Forklift Classes Overview by Intella PartsIntella Parts
Discover the different forklift classes and their specific applications. Learn how to choose the right forklift for your needs to ensure safety, efficiency, and compliance in your operations.
For more technical information, visit our website https://intellaparts.com
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...Amil Baba Dawood bangali
Contact with Dawood Bhai Just call on +92322-6382012 and we'll help you. We'll solve all your problems within 12 to 24 hours and with 101% guarantee and with astrology systematic. If you want to take any personal or professional advice then also you can call us on +92322-6382012 , ONLINE LOVE PROBLEM & Other all types of Daily Life Problem's.Then CALL or WHATSAPP us on +92322-6382012 and Get all these problems solutions here by Amil Baba DAWOOD BANGALI
#vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore#blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #blackmagicforlove #blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #Amilbabainuk #amilbabainspain #amilbabaindubai #Amilbabainnorway #amilbabainkrachi #amilbabainlahore #amilbabaingujranwalan #amilbabainislamabad
Welcome to WIPAC Monthly the magazine brought to you by the LinkedIn Group Water Industry Process Automation & Control.
In this month's edition, along with this month's industry news to celebrate the 13 years since the group was created we have articles including
A case study of the used of Advanced Process Control at the Wastewater Treatment works at Lleida in Spain
A look back on an article on smart wastewater networks in order to see how the industry has measured up in the interim around the adoption of Digital Transformation in the Water Industry.
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.
We have compiled the most important slides from each speaker's presentation. This year’s compilation, available for free, captures the key insights and contributions shared during the DfMAy 2024 conference.
HEAP SORT ILLUSTRATED WITH HEAPIFY, BUILD HEAP FOR DYNAMIC ARRAYS.
Heap sort is a comparison-based sorting technique based on Binary Heap data structure. It is similar to the selection sort where we first find the minimum element and place the minimum element at the beginning. Repeat the same process for the remaining elements.
1. Example for Virtual Function and
Pure Virtual Function
1
Prepared by
Dr.S.Raja Ratna
2. 2
Virtual Function
● A virtual function is a member function which is declared within a
base class and is re-defined (overridden) by a derived class.
● They are mainly used to achieve Runtime polymorphism. The
resolving of function call is done at runtime.
● It is not mandatory for the derived class to override (or re-define the
virtual function), in that case, the base class version of the function
is used.
● Functions are declared with a virtual keyword in base class.
3. Rules for Virtual Functions
● Virtual functions cannot be static.
● A virtual function can be a friend function of another class.
● Virtual functions should be accessed using pointer or reference of base
class type to achieve runtime polymorphism.
● The prototype of virtual functions should be the same in the base as well
as derived class.
● They are always defined in the base class and overridden in a derived
class.
● A class may have virtual destructor but it cannot have a virtual
constructor.
3
4. Example 1 (Virtual Function)
#include<iostream>
using namespace std;
class base {
public:
virtual void print()
{
cout << "print base classn"; }
void show()
{
cout << "show base classn";
}
};
class derived : public base {
public:
void print()
{
cout << "print derived classn";
}
4
5. void show()
{
cout << "show derived classn";
}
};
int main()
{
base *bptr;
derived d;
bptr = &d;
// Virtual function, binded at runtime
bptr->print();
// Non-virtual function, binded at compile time
bptr->show();
return 0;
}
Output:
print derived class
show base class
5
6. Explanation for Example 1:
● Runtime polymorphism is achieved only through a pointer (or reference) of
base class type.
● Also, a base class pointer can point to the objects of base class as well as
to the objects of derived class. In above code, base class pointer ‘bptr’
contains the address of object ‘d’ of derived class.
● Late binding (Runtime) is done in accordance with the content of pointer )
and Early binding (Compile time) is done according to the type of pointer.
● Since print() function is declared with virtual keyword so it will be bound at
runtime (output is print derived class as pointer is pointing to object of
derived class) and show() is non-virtual so it will be bound during compile
time (output is show base class as pointer is of base type).
6
7. Example 2 (Virtual Function)
#include <iostream>
class A
{
int x=5;
public:
void display()
{
cout << "Value of x is : " << x;
}
};
class B: public A
{
int y = 10;
public:
void display()
{
cout << "Value of y is : " <<y;
}
};
7
8. int main()
{
A *a;
A a1;
B b;
a = & a1;
a1->display();
a = &b;
a->display();
return 0;
}
Output:
Value of x is : 5
Value of y is : 10
8
9. Explanation for Example 2
• In the above example, * a is the base class pointer.
• The pointer can only access the base class members but not the members
of the derived class.
• Although C++ permits the base pointer to point to any object derived from
the base class, it cannot directly access the members of the derived class.
• Therefore, there is a need for virtual function which allows the base pointer
to access the members of the derived class.
9
10. Pure Virtual Function
• A virtual function is not used for performing any task. It only serves as a
placeholder.
• When the function has no definition, such function is known as "do-
nothing" function.
• The "do-nothing" function is known as a pure virtual function. A pure
virtual function is a function declared in the base class that has no definition
relative to the base class.
• A class containing the pure virtual function cannot be used to declare the
objects of its own, such classes are known as abstract base classes.
10
11. Example (Pure Virtual Function)
#include <iostream>
class Base
{
public:
virtual void show() = 0;
};
class Derived : public Base
{
public:
void show()
{
cout << "Derived class is derived from the base class.“ ;
}
};
11
12. int main()
{
Base *bptr; //Base b;
Derived d;
bptr = &d;
bptr->show();
return 0;
}
Output:
Derived class is derived from the base class.
● In the above example, the base class contains the pure virtual function.
Therefore, the base class is an abstract base class. We cannot create
the object of the base class.
12