SlideShare a Scribd company logo
1 of 30
UNIT2
PROGRAM DEVELOPMENT LIFE CYCLE
• The Program Development Life Cycle (PDLC) in C++ follows a structured
approach to develop software applications.
• The Program Development Life Cycle (PDLC) is a process used in software
engineering to manage the development of software programs. The PDLC is
similar to the Software Development Life Cycle (SDLC) but is applied at a
higher level, to manage the development of multiple software programs or
projects.
What is PDLC?
• The PDLC is an iterative process that allows for feedback and adjustments to
be made at each phase, to ensure that the final product meets the needs of
the stakeholders and is of high quality.
• Program Development Life Cycle (PDLC) is a systematic way of developing
quality software.
• It provides an organized plan for breaking down the task of program
development into manageable chunks, each of which must be completed
before moving on to the next phase.
Phases of PDLC
• Planning: In this phase, the goals and objectives of the program are defined, and a
plan is developed to achieve them. This includes identifying the resources required
and determining the budget and schedule for the program.
• Analysis: In this phase, the requirements for the program are defined and analysed.
This includes identifying the stakeholders, their needs and expectations, and
determining the functional and non-functional requirements for the program.
• Design: In this phase, the program’s architecture and design are developed. This
includes creating a detailed design of the program’s components and interfaces, as
well as determining how the program will be tested and deployed.
• Implementation: In this phase, the program is developed and coded. This includes
writing the program’s source code and creating any necessary documentation.
• Testing: In this phase, the program is tested to ensure that it meets the
requirements and is free of defects.
• Deployment: In this phase, the program is deployed and made available to users.
• Maintenance: After the deployment, the program is maintained by fixing any bugs
or errors that are found and updating the program to meet changing requirements.
Steps in PDLC
• Defining the Problem
The first step is to define the problem. In major software projects, this is a job
for system analyst, who provides the results of their work to programmers in
the form of a program specification. The program specification defines the
data used in program, the processing that should take place while finding a
solution, the format of the output and the user interface.
Designing the Program
Program design starts by focusing on the main goal that the program is trying to
achieve and then breaking the program into manageable components, each of which
contributes to this goal. This approach of program design is called top-bottom
program design or modular programming. The first step involve identifying main
routine, which is the one of program’s major activity. From that point, programmers
try to divide the various components of the main routine into smaller parts called
modules. For each module, programmer draws a conceptual plan using an appropriate
program design tool to visualize how the module will do its assign job.
• Structure Charts: A structure chart, also called Hierarchy chart, show top-
down design of program. Each box in the structure chart indicates a task
that program must accomplish. The Top module, called the Main module or
Control module.
• Algorithms: An algorithm is a step-by-step description of how to arrive at a
solution in the most easiest way. Algorithms are not restricted to computer
world only. In fact, we use them in everyday life.
BUILDING BLOCKS
In C++, building blocks refer to the fundamental components used to create programs. These
building blocks include variables, data types, operators, control structures (such as loops and
conditional statements), functions, classes, and objects. Each of these elements plays a
crucial role in constructing and executing C++ programs.
In C++, building blocks refer to the fundamental components or features of the language that allow developers to create complex programs.
Here are some of the key building blocks in C++:
1.Variables and Data Types: Variables are used to store data, and data types define the type of data that can be stored in a
variable.
C++ supports various built-in data types such as integers, floating-point numbers, characters, Booleans, etc.,
and also allows defining user-defined data types through classes and structures.
2.Operators: Operators are symbols used to perform operations on variables and values.
C++ supports various types of operators such as arithmetic operators (+, -, *, /), relational operators (==, !=, <, >), logical
operators (&&, ||, !), etc
.
3.Control Structures: Control structures are used to control the flow of execution in a program. C++ supports three main types
of control structures:
•Selection structures (if, else if, else, switch): These structures are used to execute different blocks of code based on
certain conditions.
•Iteration structures (for, while, do-while): These structures are used to execute a block of code repeatedly as long as a
condition is true.
•Jump statements (break, continue, return, goto): These statements are used to alter the flow of control in a program.
EXAMPLE OF EQUALITY SYMBOL
• int a = 5;
• int b = 7;
• if (a == b) {
• // This block will not be executed because a is not equal to b
• cout << "a is equal to b";
• } else {
• cout << "a is not equal to b"; // This will be printed
• }
4.Functions: Functions are self-contained blocks of code that perform a specific task. They allow code
reusability and modular programming. C++ supports both built-in functions (like printf() and scanf()) and user-
defined functions.
5.Arrays and Strings: Arrays are collections of similar data elements stored in contiguous memory locations,
and strings are arrays of characters. C++ provides built-in support for arrays and strings, along with various
functions and operations to manipulate them.
6.Classes and Objects: Classes are user-defined data types that encapsulate data and behavior (functions)
into a single unit. Objects are instances of classes. Classes and objects form the basis of object-oriented
programming (OOP) in C++, providing features such as encapsulation, inheritance, and polymorphism.
7.Pointers and References: Pointers are variables that store memory addresses, allowing direct manipulation
of memory. References are aliases to existing variables. Both pointers and references are powerful features in
C++ for efficient memory management and for working with complex data structures.
8.Inheritance:
9.Polymorphism:
10.Templates
FUNCTIONS
• Functions are sub-program i.e the part of a program that are intended to
perform a particular task;
• Remember, it is not a complete program.
• Functions are of two types:
Library Function/Built in Functions
User-defined funtions
CONT..
A function is a group of statements that together perform a task.
Every c++ program has at least one function, which is main().
void main()
{
Statements;
}
Difference
User defined function Library function
These functions are not predefined in the
Compiler.
These functions are predefined in the compiler of
C++ language.
These functions are created by users as per their
own requirements.
These functions are not created by users as their
own.
User-defined functions are not stored in library
files.
Library Functions are stored in a special library file.
Execution of the program begins from the user-
define function.
Execution of the program does not begin from the
library function.
Example: sum(), fact(),…etc. Example: printf(), scanf(), sqrt(),…etc.
ARRAY
• An array is a collection of items of same data type stored at contiguous
memory locations.
Cont..
• The array has a fixed size meaning once the size is given to it, it cannot be
changed i.e. you can’t shrink it nor can you expand it.
• Indexing of an array starts from 0. It means the first element is stored at the
0th index, the second at 1st, and so on.
• Elements of an array can be accessed using their indices.
• Once an array is declared its size remains constant throughout the program.
• An array can have multiple dimensions.
Array Declaration in C++
• In C++, we can declare an array by simply specifying the data type first and
then the name of an array with its size.
• data_type array_name[size of array];
• EXAMPLE:
• Int arr[5];
PROGRAM
#include <iostream>
using namespace std;
int main()
{
int arr[3];
// Inserting elements in an array
arr[0] = 10;
arr[1] = 20;
arr[2] = 30;
// Accessing and printing elements of the array
cout << "arr[0]: " << arr[0] << endl;
cout << "arr[1]: " << arr[1] << endl;
cout << "arr[2]: " << arr[2] << endl;
return 0;
}
Pointer
• A pointer in C++ is a variable that stores the memory address of another
variable. In simpler terms, a pointer "points to" or "references" a memory
location where some other data is stored. Pointers are powerful features of
the C++ language that allow you to work directly with memory addresses,
enabling dynamic memory allocation, manipulation of data structures, and
efficient passing of parameters to functions.
• #include <iostream>
• using namespace std;
• int main() {
• int x = 10; // Declare an integer variable
• int* b; // Declare a pointer to an integer
• b = &x; // Assign the address of x to the pointer ptr
• cout << "Value of x: " << x << endl; // Output: Value of x: 10
• cout << "Address of x: " << &x << endl; // Output: Address of x: <memory address>
• cout << "Value stored in b: " << b << endl; // Output: Value stored in b: <memory address>
• cout << "Value pointed to by b: " << *b << endl; // Output: Value pointed to by ptr: 10
IDENTIFIER
• In C++, an identifier is a name used to identify various elements in a
program such as variables, functions, classes, labels, etc. Identifiers are used
to give names to program elements, making it easier for programmers to
refer to them in their code.
Naming Rules
•Identifiers can consist of letters (both uppercase and lowercase), digits, and underscore _.
•The first character of an identifier must be a letter or underscore.
•Identifiers are case-sensitive. For example, Variable, variable, and VARIABLE are considered
different identifiers.
•C++ reserves certain identifiers for language keywords (e.g., if, for, int, etc.), so you cannot use them as identifiers for
your own variables or functions.
PROGRAM
• #include <iostream>
• using namespace std;
• int main() {
• int numberOfStudents = 50; // Variable declaration with an identifier numberOfStudents
• cout << "Number of students: " << numberOfStudents << endl;
• return 0;
• }
KEYWORDS
• In C++, a keyword is a reserved word that has a predefined meaning and
cannot be used as an identifier (such as variable names or function names) in
the program. Keywords are an integral part of the language syntax and are
used to define the structure and behaviour of C++ programs.
• keywords like "int", "if", "else", "for", "while", "class", "public", "private",
etc., have specific meanings and functionalities within the C++ language
EXAMPLES
• auto: Specifies automatic type deduction for variables.
• bool: Represents Boolean type with true or false values.
• break: Terminates the current loop or switch statement.
• case: Defines a particular case in a switch statement.
• char: Represents a single character data type.
• class: Declares a class.
• const: Defines a variable as constant.
Cont..
• default: Defines the default case in a switch statement.
• delete: Deallocates memory allocated by new.
• friend: Grants access to private and protected members of a class to another
function or class.
• goto: Transfers control to a labeled statement.

More Related Content

Similar to object oriented programming part inheritance.pptx (20)

Unit-1 (introduction to c language).pptx
Unit-1 (introduction to c language).pptxUnit-1 (introduction to c language).pptx
Unit-1 (introduction to c language).pptx
 
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTTC programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
 
OODPunit1.pdf
OODPunit1.pdfOODPunit1.pdf
OODPunit1.pdf
 
Notes of c programming 1st unit BCA I SEM
Notes of c programming  1st unit BCA I SEMNotes of c programming  1st unit BCA I SEM
Notes of c programming 1st unit BCA I SEM
 
cs8251 unit 1 ppt
cs8251 unit 1 pptcs8251 unit 1 ppt
cs8251 unit 1 ppt
 
Pc module1
Pc module1Pc module1
Pc module1
 
Unit 1 introduction to c++.pptx
Unit 1 introduction to c++.pptxUnit 1 introduction to c++.pptx
Unit 1 introduction to c++.pptx
 
Computer Programming In C.pptx
Computer Programming In C.pptxComputer Programming In C.pptx
Computer Programming In C.pptx
 
Technical Interview
Technical InterviewTechnical Interview
Technical Interview
 
Unit 1
Unit  1Unit  1
Unit 1
 
10tait
10tait10tait
10tait
 
Chapter 10
Chapter 10 Chapter 10
Chapter 10
 
C++ Constructs.pptx
C++ Constructs.pptxC++ Constructs.pptx
C++ Constructs.pptx
 
Prog1-L1.pdf
Prog1-L1.pdfProg1-L1.pdf
Prog1-L1.pdf
 
Part 1
Part 1Part 1
Part 1
 
Lecture 1 uml with java implementation
Lecture 1 uml with java implementationLecture 1 uml with java implementation
Lecture 1 uml with java implementation
 
Unit-III(Design).pptx
Unit-III(Design).pptxUnit-III(Design).pptx
Unit-III(Design).pptx
 
Vedic Calculator
Vedic CalculatorVedic Calculator
Vedic Calculator
 
Bcsl 031 solve assignment
Bcsl 031 solve assignmentBcsl 031 solve assignment
Bcsl 031 solve assignment
 
Anagha
AnaghaAnagha
Anagha
 

More from urvashipundir04

inheriTANCE IN OBJECT ORIENTED PROGRAM.pptx
inheriTANCE IN OBJECT ORIENTED PROGRAM.pptxinheriTANCE IN OBJECT ORIENTED PROGRAM.pptx
inheriTANCE IN OBJECT ORIENTED PROGRAM.pptxurvashipundir04
 
static members in object oriented program.pptx
static members in object oriented program.pptxstatic members in object oriented program.pptx
static members in object oriented program.pptxurvashipundir04
 
constructor in object oriented program.pptx
constructor in object oriented program.pptxconstructor in object oriented program.pptx
constructor in object oriented program.pptxurvashipundir04
 
UNIT3 on object oriented programming.pptx
UNIT3 on object oriented programming.pptxUNIT3 on object oriented programming.pptx
UNIT3 on object oriented programming.pptxurvashipundir04
 
HOMEOPATHY A new approach to medicines.pptx
HOMEOPATHY A new approach to medicines.pptxHOMEOPATHY A new approach to medicines.pptx
HOMEOPATHY A new approach to medicines.pptxurvashipundir04
 
concepts of object and classes in OOPS.pptx
concepts of object and classes in OOPS.pptxconcepts of object and classes in OOPS.pptx
concepts of object and classes in OOPS.pptxurvashipundir04
 
Analysis of variance(one way ANOVA).pptx
Analysis of variance(one way ANOVA).pptxAnalysis of variance(one way ANOVA).pptx
Analysis of variance(one way ANOVA).pptxurvashipundir04
 
ETHICAL ISSUES RELATED TO DATA COLLECTION.pptx
ETHICAL ISSUES RELATED TO DATA COLLECTION.pptxETHICAL ISSUES RELATED TO DATA COLLECTION.pptx
ETHICAL ISSUES RELATED TO DATA COLLECTION.pptxurvashipundir04
 
Scientific Conduct (Part-1)on research.pptx
Scientific Conduct (Part-1)on research.pptxScientific Conduct (Part-1)on research.pptx
Scientific Conduct (Part-1)on research.pptxurvashipundir04
 
INTRODUCTION on hardware and software.pptx
INTRODUCTION on hardware and software.pptxINTRODUCTION on hardware and software.pptx
INTRODUCTION on hardware and software.pptxurvashipundir04
 
INTRODUCTIONTO BASICS OF PROGRAMMING.pptx
INTRODUCTIONTO BASICS OF PROGRAMMING.pptxINTRODUCTIONTO BASICS OF PROGRAMMING.pptx
INTRODUCTIONTO BASICS OF PROGRAMMING.pptxurvashipundir04
 
INTRODUCTION ON ANOVA TECHNIQUE ONE .pptx
INTRODUCTION ON ANOVA TECHNIQUE ONE .pptxINTRODUCTION ON ANOVA TECHNIQUE ONE .pptx
INTRODUCTION ON ANOVA TECHNIQUE ONE .pptxurvashipundir04
 

More from urvashipundir04 (12)

inheriTANCE IN OBJECT ORIENTED PROGRAM.pptx
inheriTANCE IN OBJECT ORIENTED PROGRAM.pptxinheriTANCE IN OBJECT ORIENTED PROGRAM.pptx
inheriTANCE IN OBJECT ORIENTED PROGRAM.pptx
 
static members in object oriented program.pptx
static members in object oriented program.pptxstatic members in object oriented program.pptx
static members in object oriented program.pptx
 
constructor in object oriented program.pptx
constructor in object oriented program.pptxconstructor in object oriented program.pptx
constructor in object oriented program.pptx
 
UNIT3 on object oriented programming.pptx
UNIT3 on object oriented programming.pptxUNIT3 on object oriented programming.pptx
UNIT3 on object oriented programming.pptx
 
HOMEOPATHY A new approach to medicines.pptx
HOMEOPATHY A new approach to medicines.pptxHOMEOPATHY A new approach to medicines.pptx
HOMEOPATHY A new approach to medicines.pptx
 
concepts of object and classes in OOPS.pptx
concepts of object and classes in OOPS.pptxconcepts of object and classes in OOPS.pptx
concepts of object and classes in OOPS.pptx
 
Analysis of variance(one way ANOVA).pptx
Analysis of variance(one way ANOVA).pptxAnalysis of variance(one way ANOVA).pptx
Analysis of variance(one way ANOVA).pptx
 
ETHICAL ISSUES RELATED TO DATA COLLECTION.pptx
ETHICAL ISSUES RELATED TO DATA COLLECTION.pptxETHICAL ISSUES RELATED TO DATA COLLECTION.pptx
ETHICAL ISSUES RELATED TO DATA COLLECTION.pptx
 
Scientific Conduct (Part-1)on research.pptx
Scientific Conduct (Part-1)on research.pptxScientific Conduct (Part-1)on research.pptx
Scientific Conduct (Part-1)on research.pptx
 
INTRODUCTION on hardware and software.pptx
INTRODUCTION on hardware and software.pptxINTRODUCTION on hardware and software.pptx
INTRODUCTION on hardware and software.pptx
 
INTRODUCTIONTO BASICS OF PROGRAMMING.pptx
INTRODUCTIONTO BASICS OF PROGRAMMING.pptxINTRODUCTIONTO BASICS OF PROGRAMMING.pptx
INTRODUCTIONTO BASICS OF PROGRAMMING.pptx
 
INTRODUCTION ON ANOVA TECHNIQUE ONE .pptx
INTRODUCTION ON ANOVA TECHNIQUE ONE .pptxINTRODUCTION ON ANOVA TECHNIQUE ONE .pptx
INTRODUCTION ON ANOVA TECHNIQUE ONE .pptx
 

Recently uploaded

Soil pollution causes effects remedial measures
Soil pollution causes effects remedial measuresSoil pollution causes effects remedial measures
Soil pollution causes effects remedial measuresvasubhanot1234
 
webinaire-green-mirror-episode-2-Smart contracts and virtual purchase agreeme...
webinaire-green-mirror-episode-2-Smart contracts and virtual purchase agreeme...webinaire-green-mirror-episode-2-Smart contracts and virtual purchase agreeme...
webinaire-green-mirror-episode-2-Smart contracts and virtual purchase agreeme...Cluster TWEED
 
(NANDITA) Hadapsar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune ...
(NANDITA) Hadapsar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune ...(NANDITA) Hadapsar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune ...
(NANDITA) Hadapsar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune ...ranjana rawat
 
Hi FI Call Girl Ahmedabad 7397865700 Independent Call Girls
Hi FI Call Girl Ahmedabad 7397865700 Independent Call GirlsHi FI Call Girl Ahmedabad 7397865700 Independent Call Girls
Hi FI Call Girl Ahmedabad 7397865700 Independent Call Girlsssuser7cb4ff
 
(ANIKA) Call Girls Wagholi ( 7001035870 ) HI-Fi Pune Escorts Service
(ANIKA) Call Girls Wagholi ( 7001035870 ) HI-Fi Pune Escorts Service(ANIKA) Call Girls Wagholi ( 7001035870 ) HI-Fi Pune Escorts Service
(ANIKA) Call Girls Wagholi ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
VIP Call Girls Service Bandlaguda Hyderabad Call +91-8250192130
VIP Call Girls Service Bandlaguda Hyderabad Call +91-8250192130VIP Call Girls Service Bandlaguda Hyderabad Call +91-8250192130
VIP Call Girls Service Bandlaguda Hyderabad Call +91-8250192130Suhani Kapoor
 
(PARI) Viman Nagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune ...
(PARI) Viman Nagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune ...(PARI) Viman Nagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune ...
(PARI) Viman Nagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune ...ranjana rawat
 
VIP Call Girls Mahadevpur Colony ( Hyderabad ) Phone 8250192130 | ₹5k To 25k ...
VIP Call Girls Mahadevpur Colony ( Hyderabad ) Phone 8250192130 | ₹5k To 25k ...VIP Call Girls Mahadevpur Colony ( Hyderabad ) Phone 8250192130 | ₹5k To 25k ...
VIP Call Girls Mahadevpur Colony ( Hyderabad ) Phone 8250192130 | ₹5k To 25k ...Suhani Kapoor
 
Mumbai Call Girls, 💞 Prity 9892124323, Navi Mumbai Call girls
Mumbai Call Girls, 💞  Prity 9892124323, Navi Mumbai Call girlsMumbai Call Girls, 💞  Prity 9892124323, Navi Mumbai Call girls
Mumbai Call Girls, 💞 Prity 9892124323, Navi Mumbai Call girlsPooja Nehwal
 
Species composition, diversity and community structure of mangroves in Barang...
Species composition, diversity and community structure of mangroves in Barang...Species composition, diversity and community structure of mangroves in Barang...
Species composition, diversity and community structure of mangroves in Barang...Open Access Research Paper
 
办理学位证(KU证书)堪萨斯大学毕业证成绩单原版一比一
办理学位证(KU证书)堪萨斯大学毕业证成绩单原版一比一办理学位证(KU证书)堪萨斯大学毕业证成绩单原版一比一
办理学位证(KU证书)堪萨斯大学毕业证成绩单原版一比一F dds
 
(AISHA) Wagholi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(AISHA) Wagholi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(AISHA) Wagholi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(AISHA) Wagholi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Abu Dhabi Sea Beach Visitor Community pp
Abu Dhabi Sea Beach Visitor Community ppAbu Dhabi Sea Beach Visitor Community pp
Abu Dhabi Sea Beach Visitor Community pp202215407
 
Environmental Management System - ISO 14001:2015-
Environmental Management System      - ISO 14001:2015-Environmental Management System      - ISO 14001:2015-
Environmental Management System - ISO 14001:2015-Kawther MEKNI
 
Determination of antibacterial activity of various broad spectrum antibiotics...
Determination of antibacterial activity of various broad spectrum antibiotics...Determination of antibacterial activity of various broad spectrum antibiotics...
Determination of antibacterial activity of various broad spectrum antibiotics...Open Access Research Paper
 
Call Girls Ahmedabad 7397865700 Ridhima Hire Me Full Night
Call Girls Ahmedabad 7397865700 Ridhima Hire Me Full NightCall Girls Ahmedabad 7397865700 Ridhima Hire Me Full Night
Call Girls Ahmedabad 7397865700 Ridhima Hire Me Full Nightssuser7cb4ff
 

Recently uploaded (20)

Soil pollution causes effects remedial measures
Soil pollution causes effects remedial measuresSoil pollution causes effects remedial measures
Soil pollution causes effects remedial measures
 
webinaire-green-mirror-episode-2-Smart contracts and virtual purchase agreeme...
webinaire-green-mirror-episode-2-Smart contracts and virtual purchase agreeme...webinaire-green-mirror-episode-2-Smart contracts and virtual purchase agreeme...
webinaire-green-mirror-episode-2-Smart contracts and virtual purchase agreeme...
 
(NANDITA) Hadapsar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune ...
(NANDITA) Hadapsar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune ...(NANDITA) Hadapsar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune ...
(NANDITA) Hadapsar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune ...
 
Hi FI Call Girl Ahmedabad 7397865700 Independent Call Girls
Hi FI Call Girl Ahmedabad 7397865700 Independent Call GirlsHi FI Call Girl Ahmedabad 7397865700 Independent Call Girls
Hi FI Call Girl Ahmedabad 7397865700 Independent Call Girls
 
(ANIKA) Call Girls Wagholi ( 7001035870 ) HI-Fi Pune Escorts Service
(ANIKA) Call Girls Wagholi ( 7001035870 ) HI-Fi Pune Escorts Service(ANIKA) Call Girls Wagholi ( 7001035870 ) HI-Fi Pune Escorts Service
(ANIKA) Call Girls Wagholi ( 7001035870 ) HI-Fi Pune Escorts Service
 
Sexy Call Girls Patel Nagar New Delhi +918448380779 Call Girls Service in Del...
Sexy Call Girls Patel Nagar New Delhi +918448380779 Call Girls Service in Del...Sexy Call Girls Patel Nagar New Delhi +918448380779 Call Girls Service in Del...
Sexy Call Girls Patel Nagar New Delhi +918448380779 Call Girls Service in Del...
 
VIP Call Girls Service Bandlaguda Hyderabad Call +91-8250192130
VIP Call Girls Service Bandlaguda Hyderabad Call +91-8250192130VIP Call Girls Service Bandlaguda Hyderabad Call +91-8250192130
VIP Call Girls Service Bandlaguda Hyderabad Call +91-8250192130
 
(PARI) Viman Nagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune ...
(PARI) Viman Nagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune ...(PARI) Viman Nagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune ...
(PARI) Viman Nagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune ...
 
VIP Call Girls Mahadevpur Colony ( Hyderabad ) Phone 8250192130 | ₹5k To 25k ...
VIP Call Girls Mahadevpur Colony ( Hyderabad ) Phone 8250192130 | ₹5k To 25k ...VIP Call Girls Mahadevpur Colony ( Hyderabad ) Phone 8250192130 | ₹5k To 25k ...
VIP Call Girls Mahadevpur Colony ( Hyderabad ) Phone 8250192130 | ₹5k To 25k ...
 
Mumbai Call Girls, 💞 Prity 9892124323, Navi Mumbai Call girls
Mumbai Call Girls, 💞  Prity 9892124323, Navi Mumbai Call girlsMumbai Call Girls, 💞  Prity 9892124323, Navi Mumbai Call girls
Mumbai Call Girls, 💞 Prity 9892124323, Navi Mumbai Call girls
 
Call Girls In Dhaula Kuan꧁❤ 🔝 9953056974🔝❤꧂ Escort ServiCe
Call Girls In Dhaula Kuan꧁❤ 🔝 9953056974🔝❤꧂ Escort ServiCeCall Girls In Dhaula Kuan꧁❤ 🔝 9953056974🔝❤꧂ Escort ServiCe
Call Girls In Dhaula Kuan꧁❤ 🔝 9953056974🔝❤꧂ Escort ServiCe
 
Species composition, diversity and community structure of mangroves in Barang...
Species composition, diversity and community structure of mangroves in Barang...Species composition, diversity and community structure of mangroves in Barang...
Species composition, diversity and community structure of mangroves in Barang...
 
Escort Service Call Girls In Shakti Nagar, 99530°56974 Delhi NCR
Escort Service Call Girls In Shakti Nagar, 99530°56974 Delhi NCREscort Service Call Girls In Shakti Nagar, 99530°56974 Delhi NCR
Escort Service Call Girls In Shakti Nagar, 99530°56974 Delhi NCR
 
办理学位证(KU证书)堪萨斯大学毕业证成绩单原版一比一
办理学位证(KU证书)堪萨斯大学毕业证成绩单原版一比一办理学位证(KU证书)堪萨斯大学毕业证成绩单原版一比一
办理学位证(KU证书)堪萨斯大学毕业证成绩单原版一比一
 
E Waste Management
E Waste ManagementE Waste Management
E Waste Management
 
(AISHA) Wagholi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(AISHA) Wagholi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(AISHA) Wagholi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(AISHA) Wagholi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Abu Dhabi Sea Beach Visitor Community pp
Abu Dhabi Sea Beach Visitor Community ppAbu Dhabi Sea Beach Visitor Community pp
Abu Dhabi Sea Beach Visitor Community pp
 
Environmental Management System - ISO 14001:2015-
Environmental Management System      - ISO 14001:2015-Environmental Management System      - ISO 14001:2015-
Environmental Management System - ISO 14001:2015-
 
Determination of antibacterial activity of various broad spectrum antibiotics...
Determination of antibacterial activity of various broad spectrum antibiotics...Determination of antibacterial activity of various broad spectrum antibiotics...
Determination of antibacterial activity of various broad spectrum antibiotics...
 
Call Girls Ahmedabad 7397865700 Ridhima Hire Me Full Night
Call Girls Ahmedabad 7397865700 Ridhima Hire Me Full NightCall Girls Ahmedabad 7397865700 Ridhima Hire Me Full Night
Call Girls Ahmedabad 7397865700 Ridhima Hire Me Full Night
 

object oriented programming part inheritance.pptx

  • 2. PROGRAM DEVELOPMENT LIFE CYCLE • The Program Development Life Cycle (PDLC) in C++ follows a structured approach to develop software applications. • The Program Development Life Cycle (PDLC) is a process used in software engineering to manage the development of software programs. The PDLC is similar to the Software Development Life Cycle (SDLC) but is applied at a higher level, to manage the development of multiple software programs or projects.
  • 3. What is PDLC? • The PDLC is an iterative process that allows for feedback and adjustments to be made at each phase, to ensure that the final product meets the needs of the stakeholders and is of high quality. • Program Development Life Cycle (PDLC) is a systematic way of developing quality software. • It provides an organized plan for breaking down the task of program development into manageable chunks, each of which must be completed before moving on to the next phase.
  • 4. Phases of PDLC • Planning: In this phase, the goals and objectives of the program are defined, and a plan is developed to achieve them. This includes identifying the resources required and determining the budget and schedule for the program. • Analysis: In this phase, the requirements for the program are defined and analysed. This includes identifying the stakeholders, their needs and expectations, and determining the functional and non-functional requirements for the program. • Design: In this phase, the program’s architecture and design are developed. This includes creating a detailed design of the program’s components and interfaces, as well as determining how the program will be tested and deployed.
  • 5. • Implementation: In this phase, the program is developed and coded. This includes writing the program’s source code and creating any necessary documentation. • Testing: In this phase, the program is tested to ensure that it meets the requirements and is free of defects. • Deployment: In this phase, the program is deployed and made available to users. • Maintenance: After the deployment, the program is maintained by fixing any bugs or errors that are found and updating the program to meet changing requirements.
  • 6. Steps in PDLC • Defining the Problem The first step is to define the problem. In major software projects, this is a job for system analyst, who provides the results of their work to programmers in the form of a program specification. The program specification defines the data used in program, the processing that should take place while finding a solution, the format of the output and the user interface.
  • 7. Designing the Program Program design starts by focusing on the main goal that the program is trying to achieve and then breaking the program into manageable components, each of which contributes to this goal. This approach of program design is called top-bottom program design or modular programming. The first step involve identifying main routine, which is the one of program’s major activity. From that point, programmers try to divide the various components of the main routine into smaller parts called modules. For each module, programmer draws a conceptual plan using an appropriate program design tool to visualize how the module will do its assign job.
  • 8. • Structure Charts: A structure chart, also called Hierarchy chart, show top- down design of program. Each box in the structure chart indicates a task that program must accomplish. The Top module, called the Main module or Control module.
  • 9.
  • 10. • Algorithms: An algorithm is a step-by-step description of how to arrive at a solution in the most easiest way. Algorithms are not restricted to computer world only. In fact, we use them in everyday life.
  • 11. BUILDING BLOCKS In C++, building blocks refer to the fundamental components used to create programs. These building blocks include variables, data types, operators, control structures (such as loops and conditional statements), functions, classes, and objects. Each of these elements plays a crucial role in constructing and executing C++ programs.
  • 12. In C++, building blocks refer to the fundamental components or features of the language that allow developers to create complex programs. Here are some of the key building blocks in C++: 1.Variables and Data Types: Variables are used to store data, and data types define the type of data that can be stored in a variable. C++ supports various built-in data types such as integers, floating-point numbers, characters, Booleans, etc., and also allows defining user-defined data types through classes and structures. 2.Operators: Operators are symbols used to perform operations on variables and values. C++ supports various types of operators such as arithmetic operators (+, -, *, /), relational operators (==, !=, <, >), logical operators (&&, ||, !), etc . 3.Control Structures: Control structures are used to control the flow of execution in a program. C++ supports three main types of control structures: •Selection structures (if, else if, else, switch): These structures are used to execute different blocks of code based on certain conditions. •Iteration structures (for, while, do-while): These structures are used to execute a block of code repeatedly as long as a condition is true. •Jump statements (break, continue, return, goto): These statements are used to alter the flow of control in a program.
  • 13. EXAMPLE OF EQUALITY SYMBOL • int a = 5; • int b = 7; • if (a == b) { • // This block will not be executed because a is not equal to b • cout << "a is equal to b"; • } else { • cout << "a is not equal to b"; // This will be printed • }
  • 14. 4.Functions: Functions are self-contained blocks of code that perform a specific task. They allow code reusability and modular programming. C++ supports both built-in functions (like printf() and scanf()) and user- defined functions. 5.Arrays and Strings: Arrays are collections of similar data elements stored in contiguous memory locations, and strings are arrays of characters. C++ provides built-in support for arrays and strings, along with various functions and operations to manipulate them. 6.Classes and Objects: Classes are user-defined data types that encapsulate data and behavior (functions) into a single unit. Objects are instances of classes. Classes and objects form the basis of object-oriented programming (OOP) in C++, providing features such as encapsulation, inheritance, and polymorphism. 7.Pointers and References: Pointers are variables that store memory addresses, allowing direct manipulation of memory. References are aliases to existing variables. Both pointers and references are powerful features in C++ for efficient memory management and for working with complex data structures.
  • 16. FUNCTIONS • Functions are sub-program i.e the part of a program that are intended to perform a particular task; • Remember, it is not a complete program. • Functions are of two types: Library Function/Built in Functions User-defined funtions
  • 17. CONT.. A function is a group of statements that together perform a task. Every c++ program has at least one function, which is main(). void main() { Statements; }
  • 18. Difference User defined function Library function These functions are not predefined in the Compiler. These functions are predefined in the compiler of C++ language. These functions are created by users as per their own requirements. These functions are not created by users as their own. User-defined functions are not stored in library files. Library Functions are stored in a special library file. Execution of the program begins from the user- define function. Execution of the program does not begin from the library function. Example: sum(), fact(),…etc. Example: printf(), scanf(), sqrt(),…etc.
  • 19. ARRAY • An array is a collection of items of same data type stored at contiguous memory locations.
  • 20. Cont.. • The array has a fixed size meaning once the size is given to it, it cannot be changed i.e. you can’t shrink it nor can you expand it. • Indexing of an array starts from 0. It means the first element is stored at the 0th index, the second at 1st, and so on. • Elements of an array can be accessed using their indices. • Once an array is declared its size remains constant throughout the program. • An array can have multiple dimensions.
  • 21. Array Declaration in C++ • In C++, we can declare an array by simply specifying the data type first and then the name of an array with its size. • data_type array_name[size of array]; • EXAMPLE: • Int arr[5];
  • 22. PROGRAM #include <iostream> using namespace std; int main() { int arr[3]; // Inserting elements in an array arr[0] = 10; arr[1] = 20; arr[2] = 30; // Accessing and printing elements of the array cout << "arr[0]: " << arr[0] << endl; cout << "arr[1]: " << arr[1] << endl; cout << "arr[2]: " << arr[2] << endl; return 0; }
  • 23. Pointer • A pointer in C++ is a variable that stores the memory address of another variable. In simpler terms, a pointer "points to" or "references" a memory location where some other data is stored. Pointers are powerful features of the C++ language that allow you to work directly with memory addresses, enabling dynamic memory allocation, manipulation of data structures, and efficient passing of parameters to functions.
  • 24. • #include <iostream> • using namespace std; • int main() { • int x = 10; // Declare an integer variable • int* b; // Declare a pointer to an integer • b = &x; // Assign the address of x to the pointer ptr • cout << "Value of x: " << x << endl; // Output: Value of x: 10 • cout << "Address of x: " << &x << endl; // Output: Address of x: <memory address> • cout << "Value stored in b: " << b << endl; // Output: Value stored in b: <memory address> • cout << "Value pointed to by b: " << *b << endl; // Output: Value pointed to by ptr: 10
  • 25. IDENTIFIER • In C++, an identifier is a name used to identify various elements in a program such as variables, functions, classes, labels, etc. Identifiers are used to give names to program elements, making it easier for programmers to refer to them in their code.
  • 26. Naming Rules •Identifiers can consist of letters (both uppercase and lowercase), digits, and underscore _. •The first character of an identifier must be a letter or underscore. •Identifiers are case-sensitive. For example, Variable, variable, and VARIABLE are considered different identifiers. •C++ reserves certain identifiers for language keywords (e.g., if, for, int, etc.), so you cannot use them as identifiers for your own variables or functions.
  • 27. PROGRAM • #include <iostream> • using namespace std; • int main() { • int numberOfStudents = 50; // Variable declaration with an identifier numberOfStudents • cout << "Number of students: " << numberOfStudents << endl; • return 0; • }
  • 28. KEYWORDS • In C++, a keyword is a reserved word that has a predefined meaning and cannot be used as an identifier (such as variable names or function names) in the program. Keywords are an integral part of the language syntax and are used to define the structure and behaviour of C++ programs. • keywords like "int", "if", "else", "for", "while", "class", "public", "private", etc., have specific meanings and functionalities within the C++ language
  • 29. EXAMPLES • auto: Specifies automatic type deduction for variables. • bool: Represents Boolean type with true or false values. • break: Terminates the current loop or switch statement. • case: Defines a particular case in a switch statement. • char: Represents a single character data type. • class: Declares a class. • const: Defines a variable as constant.
  • 30. Cont.. • default: Defines the default case in a switch statement. • delete: Deallocates memory allocated by new. • friend: Grants access to private and protected members of a class to another function or class. • goto: Transfers control to a labeled statement.