Inheritance in C++ Part 1:
Concept of Inheritance
Advantages of Inheritance
General Syntax of Inheritance
Inheritance Access specifier/ Visibility modes.
Public mode.
Protected mode.
Private mode.
Inheritance allows classes to inherit properties from other classes, making code reuse and maintenance easier. There are several types of inheritance in C++. Public inheritance allows derived classes to access public and protected members of the base class. Protected inheritance makes public and protected base class members protected in derived classes. Private inheritance makes public and protected base members private in derived classes. Common inheritance types include single inheritance, multilevel inheritance, multiple inheritance, hierarchical inheritance, and hybrid inheritance.
Inheritance allows new classes called derived classes to be created from existing classes called base classes. Derived classes inherit all features of the base class and can add new features. There are different types of inheritance including single, multilevel, multiple, hierarchical, and hybrid. A derived class can access public and protected members of the base class but not private members. Constructors and destructors of the base class are executed before and after those of the derived class respectively.
This document discusses inheritance in object-oriented programming. Inheritance allows objects of one class to inherit properties from another class. The key advantages of inheritance are that it saves memory space, time, and development efforts by allowing code reuse. Inheritance increases reliability and removes frustration by building on existing classes. There are several types of inheritance including single, multiple, multilevel, hierarchical, and hybrid inheritance. Inheritance is controlled by the visibility mode (public, private, or protected) which determines how members of the base class are available in derived classes.
The document discusses different types of inheritance in C++ including single, multiple, hierarchical, and multilevel inheritance. Single inheritance involves one base class and derived class. Multiple inheritance allows a class to inherit from multiple base classes. Hierarchical inheritance uses a single base class to derive multiple classes. Multilevel inheritance involves a derived class acting as a base class to further derived classes. Examples of code implementing these inheritance types are provided.
The document discusses inheritance in C++. It defines inheritance as creating new classes from existing classes where the new classes inherit properties of the existing classes. There are different types of inheritance including single, multiple, hierarchical and multilevel inheritance. The relationship between base and derived classes is described. Access specifiers like public, private and protected are also discussed which determine how members of base classes can be accessed in derived classes. Examples of code implementing single inheritance between two classes are provided.
This document discusses inheritance in C++. It defines inheritance as a mechanism that allows classes to acquire properties from other classes. The class that inherits properties is called the derived or child class, while the class being inherited from is called the base or parent class. The key advantages of inheritance are that it increases code reusability, saves memory and development time. The document provides examples of single inheritance with one parent and one child class, and multiple inheritance with a class inheriting from more than one parent class.
This document discusses inheritance in C++. It defines inheritance as a mechanism that allows classes to acquire properties from other classes. The class that inherits properties is called the derived or child class, while the class being inherited from is called the base or parent class. The key advantages of inheritance are that it saves memory, time, and development efforts by promoting code reuse. The document provides examples of single inheritance with one parent and one child class, and multiple inheritance with a class inheriting from multiple parent classes.
Inheritance in C++ Part 1:
Concept of Inheritance
Advantages of Inheritance
General Syntax of Inheritance
Inheritance Access specifier/ Visibility modes.
Public mode.
Protected mode.
Private mode.
Inheritance allows classes to inherit properties from other classes, making code reuse and maintenance easier. There are several types of inheritance in C++. Public inheritance allows derived classes to access public and protected members of the base class. Protected inheritance makes public and protected base class members protected in derived classes. Private inheritance makes public and protected base members private in derived classes. Common inheritance types include single inheritance, multilevel inheritance, multiple inheritance, hierarchical inheritance, and hybrid inheritance.
Inheritance allows new classes called derived classes to be created from existing classes called base classes. Derived classes inherit all features of the base class and can add new features. There are different types of inheritance including single, multilevel, multiple, hierarchical, and hybrid. A derived class can access public and protected members of the base class but not private members. Constructors and destructors of the base class are executed before and after those of the derived class respectively.
This document discusses inheritance in object-oriented programming. Inheritance allows objects of one class to inherit properties from another class. The key advantages of inheritance are that it saves memory space, time, and development efforts by allowing code reuse. Inheritance increases reliability and removes frustration by building on existing classes. There are several types of inheritance including single, multiple, multilevel, hierarchical, and hybrid inheritance. Inheritance is controlled by the visibility mode (public, private, or protected) which determines how members of the base class are available in derived classes.
The document discusses different types of inheritance in C++ including single, multiple, hierarchical, and multilevel inheritance. Single inheritance involves one base class and derived class. Multiple inheritance allows a class to inherit from multiple base classes. Hierarchical inheritance uses a single base class to derive multiple classes. Multilevel inheritance involves a derived class acting as a base class to further derived classes. Examples of code implementing these inheritance types are provided.
The document discusses inheritance in C++. It defines inheritance as creating new classes from existing classes where the new classes inherit properties of the existing classes. There are different types of inheritance including single, multiple, hierarchical and multilevel inheritance. The relationship between base and derived classes is described. Access specifiers like public, private and protected are also discussed which determine how members of base classes can be accessed in derived classes. Examples of code implementing single inheritance between two classes are provided.
This document discusses inheritance in C++. It defines inheritance as a mechanism that allows classes to acquire properties from other classes. The class that inherits properties is called the derived or child class, while the class being inherited from is called the base or parent class. The key advantages of inheritance are that it increases code reusability, saves memory and development time. The document provides examples of single inheritance with one parent and one child class, and multiple inheritance with a class inheriting from more than one parent class.
This document discusses inheritance in C++. It defines inheritance as a mechanism that allows classes to acquire properties from other classes. The class that inherits properties is called the derived or child class, while the class being inherited from is called the base or parent class. The key advantages of inheritance are that it saves memory, time, and development efforts by promoting code reuse. The document provides examples of single inheritance with one parent and one child class, and multiple inheritance with a class inheriting from multiple parent classes.
The document discusses inheritance in C++. Inheritance allows a derived class to inherit attributes and behaviors from a base class. This establishes an "is-a" relationship where the derived class is a specialized form of the base class. There are different types of inheritance including single inheritance, multilevel inheritance, multiple inheritance, and hierarchical inheritance. Inheritance provides benefits like code reuse and extending existing functionality while maintaining relationships between classes.
This document discusses inheritance in C++. It defines inheritance as creating new classes from existing classes. There are different types of inheritance including single, multiple, hierarchical, multilevel, and hybrid inheritance. Inheritance provides advantages like reusability, extensibility, data hiding, and overriding. The document also discusses protected access specifiers and how members with protected access can be accessed from derived classes but not outside classes. It provides an example of public inheritance and function overriding.
Inheritance allows the creation of new classes from existing classes. A general base class can define common traits that are inherited by derived classes, which can add their own unique properties. There are several types of inheritance including single, multiple, hierarchical, multilevel, and hybrid. Inheritance provides advantages like reusability, extensibility, data hiding, and overriding. Protected access specifies that members are accessible only by the class itself and its derived classes. Function overriding occurs when a derived class redefines a function from its base class with the same name, return type, and parameters.
Inheritance allows a class to inherit properties and methods from another class. A subclass inherits attributes and behavior from a base class without modifying the base class. There is single inheritance, where a subclass inherits from only one superclass, and multiple inheritance, where a subclass can inherit from more than one superclass. When an object is created, it allocates memory for all inherited instance variables from its parent classes.
Inheritance allows reuse of properties and behaviors of an existing class when creating new classes. The existing class is called the base/parent class, while the new class is the derived/child class. The child class inherits all properties and behaviors of the parent class and can define additional properties and behaviors of its own. There are different types of inheritance like single, multilevel, multiple and hierarchical inheritance which define how properties and behaviors are inherited between parent and child classes.
The document discusses inheritance in object-oriented programming. It defines inheritance as a class deriving from an existing class, allowing the derived class to access members of the base class. It describes three types of inheritance: public, private, and protected. It provides examples of single and multiple inheritance, and discusses how constructors are handled in derived classes.
Inheritance allows one class to acquire the properties and behaviors of another class, known as the base or parent class, allowing code reuse and extension of existing classes without modification. There are different types of inheritance like simple, multilevel, and multiple inheritance that build upon the base class in various ways. Inheritance provides benefits like code reuse, extension of existing classes, and ability to override methods of the base class in the derived class.
This document discusses object-oriented programming (OOP) concepts like classes, objects, inheritance, encapsulation, abstraction, and polymorphism in C++. It provides examples of how each concept is implemented in C++. It explains that classes are user-defined data types that contain data fields and methods. Objects are instances of classes. Inheritance allows classes to inherit attributes from other classes. Encapsulation binds data to the methods that operate on it. Abstraction hides unnecessary details and displays only essential information. Polymorphism allows one message to have multiple implementations.
Inheritance allows a derived class to inherit features from a base class. A derived class inherits data members and member functions from the base class and can add its own members. Private members of the base class cannot be accessed directly in the derived class. Constructors are not inherited. Single inheritance refers to deriving from one base class, while multiple inheritance allows deriving from more than one base class. Access restrictions of public, protected, and private determine which members can be accessed where.
The document discusses various concepts related to inheritance in C++ including types of inheritance (single, multiple, hierarchical, multilevel, hybrid), defining derived classes, visibility modes (private, public), constructors and destructors in derived classes, virtual base classes, virtual functions, pure virtual functions, and abstract base classes. It provides examples and explanations for each concept.
This document discusses inheritance in C++. It defines inheritance as deriving a new class from an existing class, called the base class. The derived class inherits properties from the base class. There are different types of inheritance including single inheritance with one base class, multiple inheritance with multiple base classes, hierarchical inheritance where one base class has multiple derived classes, and multilevel inheritance where a class derives from another derived class. The document also explains how to define a derived class and the visibility of inherited members depending on whether the inheritance is public, private, or protected.
The document discusses inheritance in object-oriented programming, which allows a subclass to inherit attributes and behaviors from a parent superclass, creating an "is-a" relationship. Inheritance enables code reuse as subclasses inherit functionality from the superclass and can add additional specialized attributes and behaviors. The different types of inheritance covered are single, multilevel, multiple, and hybrid inheritance, along with access specifiers like public, private, and protected that determine which superclass members are inherited by subclasses.
oop database doc for studevsgdy fdsyn hdfitxminahil29
Inheritance allows classes to inherit properties and characteristics from other classes. There are three main types of inheritance: public, private, and protected inheritance which determine how members of the base class are accessed in the derived class. The document also discusses single, multiple, multilevel, hierarchical, and hybrid inheritance providing syntax examples for each. Inheritance is used in object-oriented programming to avoid code redundancy when classes are logically related.
This document discusses inheritance in object-oriented programming. It defines inheritance as allowing code reuse through classes inheriting traits from parent classes. The document covers different types of inheritance like single, multi-level, multiple and hierarchical inheritance. It also discusses inheritance in various programming languages like C++, Java, Python and ADA. The advantages of inheritance are code reuse and extending parent classes without modifying them, while disadvantages include subclasses being brittle and inheritance relationships not changing at runtime.
This document discusses inheritance in C++, which allows classes to extend existing classes and inherit their properties. It covers different types of inheritance like single, multiple, multilevel, hierarchical, and hybrid inheritance. It also discusses protected members, virtual base classes, abstract classes, constructors in derived classes, and member/nested classes. The key points covered are:
- Inheritance allows classes to inherit properties from base classes to extend their functionality.
- Different types of inheritance include single, multiple, multilevel, hierarchical, and hybrid.
- Protected members can be inherited while private members cannot.
- Virtual base classes prevent duplicate inheritance of common base class properties.
- Abstract classes are designed only to act as base
This document provides an overview of the basic concepts of object-oriented programming including objects, classes, data abstraction, encapsulation, hiding, inheritance, polymorphism, binding, and message passing. Objects are instances of classes that interact at runtime and have state and behavior. Classes are collections of similar objects that bind data and functions. Access specifiers include private, public, and protected. Inheritance allows new classes to inherit properties from existing classes. Polymorphism allows different behaviors for the same operation. Binding links procedure calls to execution code. Message passing establishes communication between objects.
Inheritance allows one class to acquire properties and behaviors of another class. This allows code reusability and runtime polymorphism through method overriding. There are three types of inheritance in Java: single, multilevel, and hierarchical. Multiple inheritance is not supported in Java through classes due to complexity and ambiguity issues that can arise.
Inheritance allows one class to inherit properties from another base class, creating a hierarchy from general to specific classes. Derived classes inherit all public and protected members of the base class and can add new, class-specific features. This allows for code reuse and reduces time/effort. Access specifiers like public, private, and protected determine which members are inherited. Constructors and destructors execute in order of derivation, with base constructors first and destructors last. Virtual functions support runtime polymorphism by allowing overriding in derived classes. Pure virtual functions define an interface without implementation.
The document discusses inheritance in C++. Inheritance allows a derived class to inherit attributes and behaviors from a base class. This establishes an "is-a" relationship where the derived class is a specialized form of the base class. There are different types of inheritance including single inheritance, multilevel inheritance, multiple inheritance, and hierarchical inheritance. Inheritance provides benefits like code reuse and extending existing functionality while maintaining relationships between classes.
This document discusses inheritance in C++. It defines inheritance as creating new classes from existing classes. There are different types of inheritance including single, multiple, hierarchical, multilevel, and hybrid inheritance. Inheritance provides advantages like reusability, extensibility, data hiding, and overriding. The document also discusses protected access specifiers and how members with protected access can be accessed from derived classes but not outside classes. It provides an example of public inheritance and function overriding.
Inheritance allows the creation of new classes from existing classes. A general base class can define common traits that are inherited by derived classes, which can add their own unique properties. There are several types of inheritance including single, multiple, hierarchical, multilevel, and hybrid. Inheritance provides advantages like reusability, extensibility, data hiding, and overriding. Protected access specifies that members are accessible only by the class itself and its derived classes. Function overriding occurs when a derived class redefines a function from its base class with the same name, return type, and parameters.
Inheritance allows a class to inherit properties and methods from another class. A subclass inherits attributes and behavior from a base class without modifying the base class. There is single inheritance, where a subclass inherits from only one superclass, and multiple inheritance, where a subclass can inherit from more than one superclass. When an object is created, it allocates memory for all inherited instance variables from its parent classes.
Inheritance allows reuse of properties and behaviors of an existing class when creating new classes. The existing class is called the base/parent class, while the new class is the derived/child class. The child class inherits all properties and behaviors of the parent class and can define additional properties and behaviors of its own. There are different types of inheritance like single, multilevel, multiple and hierarchical inheritance which define how properties and behaviors are inherited between parent and child classes.
The document discusses inheritance in object-oriented programming. It defines inheritance as a class deriving from an existing class, allowing the derived class to access members of the base class. It describes three types of inheritance: public, private, and protected. It provides examples of single and multiple inheritance, and discusses how constructors are handled in derived classes.
Inheritance allows one class to acquire the properties and behaviors of another class, known as the base or parent class, allowing code reuse and extension of existing classes without modification. There are different types of inheritance like simple, multilevel, and multiple inheritance that build upon the base class in various ways. Inheritance provides benefits like code reuse, extension of existing classes, and ability to override methods of the base class in the derived class.
This document discusses object-oriented programming (OOP) concepts like classes, objects, inheritance, encapsulation, abstraction, and polymorphism in C++. It provides examples of how each concept is implemented in C++. It explains that classes are user-defined data types that contain data fields and methods. Objects are instances of classes. Inheritance allows classes to inherit attributes from other classes. Encapsulation binds data to the methods that operate on it. Abstraction hides unnecessary details and displays only essential information. Polymorphism allows one message to have multiple implementations.
Inheritance allows a derived class to inherit features from a base class. A derived class inherits data members and member functions from the base class and can add its own members. Private members of the base class cannot be accessed directly in the derived class. Constructors are not inherited. Single inheritance refers to deriving from one base class, while multiple inheritance allows deriving from more than one base class. Access restrictions of public, protected, and private determine which members can be accessed where.
The document discusses various concepts related to inheritance in C++ including types of inheritance (single, multiple, hierarchical, multilevel, hybrid), defining derived classes, visibility modes (private, public), constructors and destructors in derived classes, virtual base classes, virtual functions, pure virtual functions, and abstract base classes. It provides examples and explanations for each concept.
This document discusses inheritance in C++. It defines inheritance as deriving a new class from an existing class, called the base class. The derived class inherits properties from the base class. There are different types of inheritance including single inheritance with one base class, multiple inheritance with multiple base classes, hierarchical inheritance where one base class has multiple derived classes, and multilevel inheritance where a class derives from another derived class. The document also explains how to define a derived class and the visibility of inherited members depending on whether the inheritance is public, private, or protected.
The document discusses inheritance in object-oriented programming, which allows a subclass to inherit attributes and behaviors from a parent superclass, creating an "is-a" relationship. Inheritance enables code reuse as subclasses inherit functionality from the superclass and can add additional specialized attributes and behaviors. The different types of inheritance covered are single, multilevel, multiple, and hybrid inheritance, along with access specifiers like public, private, and protected that determine which superclass members are inherited by subclasses.
oop database doc for studevsgdy fdsyn hdfitxminahil29
Inheritance allows classes to inherit properties and characteristics from other classes. There are three main types of inheritance: public, private, and protected inheritance which determine how members of the base class are accessed in the derived class. The document also discusses single, multiple, multilevel, hierarchical, and hybrid inheritance providing syntax examples for each. Inheritance is used in object-oriented programming to avoid code redundancy when classes are logically related.
This document discusses inheritance in object-oriented programming. It defines inheritance as allowing code reuse through classes inheriting traits from parent classes. The document covers different types of inheritance like single, multi-level, multiple and hierarchical inheritance. It also discusses inheritance in various programming languages like C++, Java, Python and ADA. The advantages of inheritance are code reuse and extending parent classes without modifying them, while disadvantages include subclasses being brittle and inheritance relationships not changing at runtime.
This document discusses inheritance in C++, which allows classes to extend existing classes and inherit their properties. It covers different types of inheritance like single, multiple, multilevel, hierarchical, and hybrid inheritance. It also discusses protected members, virtual base classes, abstract classes, constructors in derived classes, and member/nested classes. The key points covered are:
- Inheritance allows classes to inherit properties from base classes to extend their functionality.
- Different types of inheritance include single, multiple, multilevel, hierarchical, and hybrid.
- Protected members can be inherited while private members cannot.
- Virtual base classes prevent duplicate inheritance of common base class properties.
- Abstract classes are designed only to act as base
This document provides an overview of the basic concepts of object-oriented programming including objects, classes, data abstraction, encapsulation, hiding, inheritance, polymorphism, binding, and message passing. Objects are instances of classes that interact at runtime and have state and behavior. Classes are collections of similar objects that bind data and functions. Access specifiers include private, public, and protected. Inheritance allows new classes to inherit properties from existing classes. Polymorphism allows different behaviors for the same operation. Binding links procedure calls to execution code. Message passing establishes communication between objects.
Inheritance allows one class to acquire properties and behaviors of another class. This allows code reusability and runtime polymorphism through method overriding. There are three types of inheritance in Java: single, multilevel, and hierarchical. Multiple inheritance is not supported in Java through classes due to complexity and ambiguity issues that can arise.
Inheritance allows one class to inherit properties from another base class, creating a hierarchy from general to specific classes. Derived classes inherit all public and protected members of the base class and can add new, class-specific features. This allows for code reuse and reduces time/effort. Access specifiers like public, private, and protected determine which members are inherited. Constructors and destructors execute in order of derivation, with base constructors first and destructors last. Virtual functions support runtime polymorphism by allowing overriding in derived classes. Pure virtual functions define an interface without implementation.
Introduction- e - waste – definition - sources of e-waste– hazardous substances in e-waste - effects of e-waste on environment and human health- need for e-waste management– e-waste handling rules - waste minimization techniques for managing e-waste – recycling of e-waste - disposal treatment methods of e- waste – mechanism of extraction of precious metal from leaching solution-global Scenario of E-waste – E-waste in India- case studies.
An improved modulation technique suitable for a three level flying capacitor ...IJECEIAES
This research paper introduces an innovative modulation technique for controlling a 3-level flying capacitor multilevel inverter (FCMLI), aiming to streamline the modulation process in contrast to conventional methods. The proposed
simplified modulation technique paves the way for more straightforward and
efficient control of multilevel inverters, enabling their widespread adoption and
integration into modern power electronic systems. Through the amalgamation of
sinusoidal pulse width modulation (SPWM) with a high-frequency square wave
pulse, this controlling technique attains energy equilibrium across the coupling
capacitor. The modulation scheme incorporates a simplified switching pattern
and a decreased count of voltage references, thereby simplifying the control
algorithm.
Advanced control scheme of doubly fed induction generator for wind turbine us...IJECEIAES
This paper describes a speed control device for generating electrical energy on an electricity network based on the doubly fed induction generator (DFIG) used for wind power conversion systems. At first, a double-fed induction generator model was constructed. A control law is formulated to govern the flow of energy between the stator of a DFIG and the energy network using three types of controllers: proportional integral (PI), sliding mode controller (SMC) and second order sliding mode controller (SOSMC). Their different results in terms of power reference tracking, reaction to unexpected speed fluctuations, sensitivity to perturbations, and resilience against machine parameter alterations are compared. MATLAB/Simulink was used to conduct the simulations for the preceding study. Multiple simulations have shown very satisfying results, and the investigations demonstrate the efficacy and power-enhancing capabilities of the suggested control system.
Software Engineering and Project Management - Introduction, Modeling Concepts...Prakhyath Rai
Introduction, Modeling Concepts and Class Modeling: What is Object orientation? What is OO development? OO Themes; Evidence for usefulness of OO development; OO modeling history. Modeling
as Design technique: Modeling, abstraction, The Three models. Class Modeling: Object and Class Concept, Link and associations concepts, Generalization and Inheritance, A sample class model, Navigation of class models, and UML diagrams
Building the Analysis Models: Requirement Analysis, Analysis Model Approaches, Data modeling Concepts, Object Oriented Analysis, Scenario-Based Modeling, Flow-Oriented Modeling, class Based Modeling, Creating a Behavioral Model.
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...IJECEIAES
Climate change's impact on the planet forced the United Nations and governments to promote green energies and electric transportation. The deployments of photovoltaic (PV) and electric vehicle (EV) systems gained stronger momentum due to their numerous advantages over fossil fuel types. The advantages go beyond sustainability to reach financial support and stability. The work in this paper introduces the hybrid system between PV and EV to support industrial and commercial plants. This paper covers the theoretical framework of the proposed hybrid system including the required equation to complete the cost analysis when PV and EV are present. In addition, the proposed design diagram which sets the priorities and requirements of the system is presented. The proposed approach allows setup to advance their power stability, especially during power outages. The presented information supports researchers and plant owners to complete the necessary analysis while promoting the deployment of clean energy. The result of a case study that represents a dairy milk farmer supports the theoretical works and highlights its advanced benefits to existing plants. The short return on investment of the proposed approach supports the paper's novelty approach for the sustainable electrical system. In addition, the proposed system allows for an isolated power setup without the need for a transmission line which enhances the safety of the electrical network
Comparative analysis between traditional aquaponics and reconstructed aquapon...bijceesjournal
The aquaponic system of planting is a method that does not require soil usage. It is a method that only needs water, fish, lava rocks (a substitute for soil), and plants. Aquaponic systems are sustainable and environmentally friendly. Its use not only helps to plant in small spaces but also helps reduce artificial chemical use and minimizes excess water use, as aquaponics consumes 90% less water than soil-based gardening. The study applied a descriptive and experimental design to assess and compare conventional and reconstructed aquaponic methods for reproducing tomatoes. The researchers created an observation checklist to determine the significant factors of the study. The study aims to determine the significant difference between traditional aquaponics and reconstructed aquaponics systems propagating tomatoes in terms of height, weight, girth, and number of fruits. The reconstructed aquaponics system’s higher growth yield results in a much more nourished crop than the traditional aquaponics system. It is superior in its number of fruits, height, weight, and girth measurement. Moreover, the reconstructed aquaponics system is proven to eliminate all the hindrances present in the traditional aquaponics system, which are overcrowding of fish, algae growth, pest problems, contaminated water, and dead fish.
Batteries -Introduction – Types of Batteries – discharging and charging of battery - characteristics of battery –battery rating- various tests on battery- – Primary battery: silver button cell- Secondary battery :Ni-Cd battery-modern battery: lithium ion battery-maintenance of batteries-choices of batteries for electric vehicle applications.
Fuel Cells: Introduction- importance and classification of fuel cells - description, principle, components, applications of fuel cells: H2-O2 fuel cell, alkaline fuel cell, molten carbonate fuel cell and direct methanol fuel cells.
Rainfall intensity duration frequency curve statistical analysis and modeling...bijceesjournal
Using data from 41 years in Patna’ India’ the study’s goal is to analyze the trends of how often it rains on a weekly, seasonal, and annual basis (1981−2020). First, utilizing the intensity-duration-frequency (IDF) curve and the relationship by statistically analyzing rainfall’ the historical rainfall data set for Patna’ India’ during a 41 year period (1981−2020), was evaluated for its quality. Changes in the hydrologic cycle as a result of increased greenhouse gas emissions are expected to induce variations in the intensity, length, and frequency of precipitation events. One strategy to lessen vulnerability is to quantify probable changes and adapt to them. Techniques such as log-normal, normal, and Gumbel are used (EV-I). Distributions were created with durations of 1, 2, 3, 6, and 24 h and return times of 2, 5, 10, 25, and 100 years. There were also mathematical correlations discovered between rainfall and recurrence interval.
Findings: Based on findings, the Gumbel approach produced the highest intensity values, whereas the other approaches produced values that were close to each other. The data indicates that 461.9 mm of rain fell during the monsoon season’s 301st week. However, it was found that the 29th week had the greatest average rainfall, 92.6 mm. With 952.6 mm on average, the monsoon season saw the highest rainfall. Calculations revealed that the yearly rainfall averaged 1171.1 mm. Using Weibull’s method, the study was subsequently expanded to examine rainfall distribution at different recurrence intervals of 2, 5, 10, and 25 years. Rainfall and recurrence interval mathematical correlations were also developed. Further regression analysis revealed that short wave irrigation, wind direction, wind speed, pressure, relative humidity, and temperature all had a substantial influence on rainfall.
Originality and value: The results of the rainfall IDF curves can provide useful information to policymakers in making appropriate decisions in managing and minimizing floods in the study area.
2. CLASS & OBJECTS
Class is a blueprint or template of an object.
It is a user – defined datatype that has data
members & member functions.
Objects are real world entity or instance of class,
such as pen , laptop, mobile, chair etc.
We define a class using the keyword “class”.
Syntax :
class class_name{
//data_members
//member_functions
};
3. There are four fundamentals of OOPs which
are:
1. Inheritance
2. Abstraction
3. Polymorphism
4. Encapsulation
FUNDAMENTALS OF OOPS
4. Inheritance is the capability of one class to inherit
properties from another class.
This process of creating new classes from the existing
class is called inheritance.
The class whose property is inherited is called the Base
Class or Super-Class or Parent Class.
The class who inherits the property is called the Derived
Class or Sub-Class or Child Class.
INTRODUCTION TO INHERITANCE
6. PROGRAM
class rectangle{
protected:
float l,b;
public:
void get(float x,float y){
l=x;
b=y; }
void area(){
cout<<"Area = "<<l*b<<endl;}
};
class cuboid: public rectangle {
float h;
public:
void height(float z){
h=z; }
void volume(){
cout<<"Volume= "<<l*b*h<<endl; }
};
7. PRIVATE & PROTECTED MEMBERS
Private members cannot be inherited by the
derived class.
Only protected and public members can be
accessed by member functions of its own class and
in any class derived from its own class.
Protected members can’t be accessed from
function outside these classes.
8. 1. Single Inheritance
2. Multiple Inheritance
3. Multi-level Inheritance
4. Hierarchical Inheritance
5. Hybrid Inheritance
TYPES OF INHERITANCE
9. SINGLE INHERITANCE
Derivation of a class from only one base class is
called Single Inheritance.
Syntax:
class base_class_name{
//data_members
//member_functions
};
class derived_class_name: access_specifier
base_class_name {
//data_members
//member_functions
};
Base
Class
Derived
Class
10. MULTIPLE INHERITANCE
Here, the derived class is derive from more than one base
classes, called Multiple Inheritance.
Syntax:
class derived_class: access_specifier base_class1,
access_specifier base_class2,… access_specifier
base_classn {
//Data_members & Member_functions
};
Example-
class A{
//Data_members & Member_functions };
class B{
//Data_members & Member_functions };
class C: public A, public B{
//Data_members & Member_functions };
A B
C
11. MULTI-LEVEL INHERITANCE
When a sub-class is derived from a base class
which itself is derived from another class, it is
known as Multi-level Inheritance.
Example:
X
Y
Z
12. Syntax:
class base_class{
//Data members & Member Function
};
class derived_class1: access_specifier
base_class {
//Data members & Member Function
};
class derived_class2: access_specifier
derived_class1 {
//Data members & Member Function
};
14. Syntax:
class base_class{
//Data members & Member Function
};
class derived_class1: access_specifier {
//Data members & Member Function
};
class derived_class2: access_specifier base_class{
//Data members & Member Function
};
15. HYBRID INHERITANCE
Derivation of a class involving more than one form
of Inheritance (i.e. Single Inheritance, Multiple
inheritance, Multi-Level Inheritance or
Hierarchical Inheritance), is known as Hybrid
Inheritance.
Example:
A
C
B D
Single Inheritance
Multi-level Inheritance
Multiple Inheritance
Hierarchical Inheritance