SlideShare a Scribd company logo
Slide 1 of 25Session 2Ver. 1.0
Object-Oriented Programming Using C#
In this session, you will learn to:
Use various operators:
Arithmetic
Arithmetic Assignment
Unary
Comparison
Logical
Use conditional constructs
Use looping constructs
Objectives
Slide 2 of 25Session 2Ver. 1.0
Object-Oriented Programming Using C#
Applications use operators to process the data entered by a
user.
Operators in C# can be classified as follows:
Arithmetic operators
Arithmetic Assignment operators
Unary operators
Comparison operators
Logical operators
Using Operators
Slide 3 of 25Session 2Ver. 1.0
Object-Oriented Programming Using C#
Arithmetic operators are the symbols that are used to
perform arithmetic operations on variables.
The following table describes the commonly used arithmetic
operators.
Arithmetic Operators
Operator Description Example
+ Used to add two
numbers
X=Y+Z;
If Y is equal to 20 and Z is equal to 2, X will have the
value 22.
- Used to subtract two
numbers
X=Y-Z;
If Y is equal to 20 and Z is equal to 2, X will have the
value 18.
* Used to multiply two
numbers
X=Y*Z;
If Y is equal to 20 and Z is equal to 2, X will have the
value 40.
/ Used to divide one
number by another
X=Y/Z;
If Y is equal to 21 and Z is equal to 2, X will have the
value 10.
But, if Y is equal to 21.0 and Z is equal to 2, X will
have the value 10.5.
% Used to divide two
numbers and return the
remainder
X=Y%Z;
If Y is equal to 21 and Z is equal to 2, X will contain
the value 1.
Slide 4 of 25Session 2Ver. 1.0
Object-Oriented Programming Using C#
Arithmetic assignment operators are used to perform
arithmetic operations to assign a value to an operand.
The following table lists the usage and describes the
commonly used assignment operators.
Arithmetic Assignment Operators
Operator Usage Description
= X = 5; Stores the value 5 in the variable X.
+= X+=Y; Same as:
X = X + Y;
-= X-=Y; Same as:
X = X - Y;
*= X*=Y; Same as:
X = X * Y;
/= X/=Y; Same as:
X = X / Y;
%= X%=Y; Same as:
X = X % Y;
Slide 5 of 25Session 2Ver. 1.0
Object-Oriented Programming Using C#
Unary operators are used to increment or decrement the
value of an operand by 1.
The following table explains the usage of the increment and
decrement operators.
Unary Operators
Operator Usage Description Example
++ ++Operand;
(Preincrement operator)
Or,
Operand++;
(Postincrement operator)
Used to
increment the
value of an
operand by 1
Y = ++X;
If the initial value of X is 5, after the
execution of the preceding statement, values
of both X and Y will be 6.
Y = X++;
If the initial value of X is 5, after the
execution of the preceding statement, value
of X will be 6 and the value of Y will be 5.
-- --Operand;
(Predecrement operator)
Or,
Operand--;
(Postdecrement)
Used to
decrement the
value of an
operand by 1
Y = --X;
If the initial value of X is 5, after the
execution of the preceding statement, values
of X and Y will be 4.
Y = X--;
If the initial value of X is 5, after the
execution of the preceding statement, value
of X will be 4 and the value of Y will be 5.
Slide 6 of 25Session 2Ver. 1.0
Object-Oriented Programming Using C#
Comparison operators are used to compare two values and
perform an action on the basis of the result of that
comparison.
The following table explains the usage of commonly used
comparison operators.
Comparison Operators
Operator Usage Description Example
(In the following examples, the value of X
is assumed to be 20 and the value of Y is
assumed to be 25)
< expression1 <
expression2
Used to check whether
expression1 is less than
expression2
bool Result;
Result = X < Y;
Result will have the value true.
> expression1 >
expression2
Used to check whether
expression1 is greater than
expression2
bool Result;
Result = X > Y;
Result will have the value false.
<= expression1 <=
expression2
Used to check whether
expression1 is less than or equal
to expression2
bool Result;
Result = X <= Y;
Result will have the value true.
>= expression1 >=
expression2
Used to check whether
expression1 is greater than or
equal to expression2
bool Result;
Result = X >= Y;
Result will have the value false.
Slide 7 of 25Session 2Ver. 1.0
Object-Oriented Programming Using C#
Comparison Operators (Contd.)
Operator Usage Description Example
(In the following examples, the value of X is
assumed to be 20 and the value of Y is
assumed to be 25)
== expression1 ==
expression2
Used to check whether
expression1 is equal to
expression2
bool Result;
Result = X == Y;
Result will have the value false.
!= expression1 !=
expression2
Used to check whether
expression1 is not equal to
expression2
bool Result;
Result = X != Y;
Result will have the value true.
Slide 8 of 25Session 2Ver. 1.0
Object-Oriented Programming Using C#
Logical operators are used to evaluate expressions and
return a Boolean value.
The following table explains the usage of logical operators.
Logical Operators
Operator Usage Description Example
&& expression1 &&
expression2
Returns true if
both expression1
and expression2
are true.
bool Result;
string str1, str2;
str1 = “Korea”;
str2 = “France”;
Result= ((str1==“Korea”) &&
(str2==“France”))
Console.WriteLine (Result .ToString());
The message displays True because
str1 has the value “Korea” and str2 has
the value “France”.
! ! expression Returns true if
the expression is
false.
bool Result
int x;
x = 20;
Result=(!( x == 10))
Console.WriteLine(Result.ToString());
The message displays True because
the expression used returns true.
Slide 9 of 25Session 2Ver. 1.0
Object-Oriented Programming Using C#
Logical Operators (Contd.)
Operator Usage Description Example
|| expression1 ||
expression2
Returns true if either
expression1 or
expression2 or both of
them are true.
bool Result
string str1, str2;
str1 = “Korea”;
str2 = “England”;
Result= ((str1==“Korea”) || (str2== “France”))
Console.WriteLine (Result .ToString());
The message displays True if either str1 has
the value “Korea” or str2 has the value
“France”.
^ expression1 ^
expression2
Returns true if either
expression1 or
expression2 is true. It
returns false if both
expression1 and
expression2 are true
or if both expression1
and expression2 are
false.
bool Result;
string str1, str2;
str1 = “Korea”;
str2= “France”;
Result = (str1== “Korea”) ^ (str2== “France”);
Console.WriteLine (Result .ToString());
The message False is displayed because both
the expressions are true.
Slide 10 of 25Session 2Ver. 1.0
Object-Oriented Programming Using C#
Using Conditional Constructs
Conditional constructs allow the selective execution of
statements, depending on the value of expression
associated with them.
The comparison operators are required for evaluating the
conditions.
The various conditional constructs are:
The if…else construct
The switch…case construct
Slide 11 of 25Session 2Ver. 1.0
Object-Oriented Programming Using C#
The if…else conditional construct is followed by a logical
expression where data is compared and a decision is made
on the basis of the result of the comparison.
The following is the syntax of the if…else construct:
if (expression)
{
statements;
}
else
{
statements;
}
The if…else Construct
Slide 12 of 25Session 2Ver. 1.0
Object-Oriented Programming Using C#
The if…else constructs can be nested inside each other.
When if…else construct is nested together, the construct
is known as cascading if…else constructs.
The if…else Construct (Contd.)
Slide 13 of 25Session 2Ver. 1.0
Object-Oriented Programming Using C#
The switch…case construct is used when there are
multiple values for a variable.
The following is the syntax of the switch…case construct:
switch (VariableName)
{
case ConstantExpression_1:
statements;
break;
case ConstantExpression_2:
statements;
break;
The switch…case Construct
Slide 14 of 25Session 2Ver. 1.0
Object-Oriented Programming Using C#
…
case ConstantExpression_n:
statements;
break;
default:
statements;
break;
}
The switch…case Construct (Contd.)
Slide 15 of 25Session 2Ver. 1.0
Object-Oriented Programming Using C#
Problem Statement:
Write a program that emulates a calculator. The calculator
should be able to perform the following mathematical
operations:
Addition
Subtraction
Multiplication
Division
Demo: Calculator Using Conditional Constructs Conditional
Constructs
Slide 16 of 25Session 2Ver. 1.0
Object-Oriented Programming Using C#
Using Loop Constructs
Loop structures are used to execute one or more lines of
code repetitively.
The following loop constructs are supported by C#:
The while loop
The do…while loop
The for loop
Slide 17 of 25Session 2Ver. 1.0
Object-Oriented Programming Using C#
The while Loop
The while loop construct is used to execute a block of
statements for a definite number of times, depending on a
condition.
The following is the syntax of the while loop construct:
while (expression)
{
statements;
}
Slide 18 of 25Session 2Ver. 1.0
Object-Oriented Programming Using C#
The do…while Loop
The do…while loop construct is similar to the while loop
construct.
Both iterate until the specified loop condition becomes false.
The following is the syntax of the do…while loop construct:
do
{
statements;
}while(expression);
Slide 19 of 25Session 2Ver. 1.0
Object-Oriented Programming Using C#
The do…while Loop (Contd.)
The following figure shows the difference between the do…
while and while loop construct.
False
do while
False
True
Execute body of
Loop
Evaluate
Condition
True
Execute body of
Loop
Evaluate
Condition
while
Slide 20 of 25Session 2Ver. 1.0
Object-Oriented Programming Using C#
The for Loop
The for loop structure is used to execute a block of
statements for a specific number of times.
The following is the syntax of the for loop construct:
for (initialization; termination;
increment/decrement)
{
statements
}
Slide 21 of 25Session 2Ver. 1.0
Object-Oriented Programming Using C#
The for Loop (Contd.)
The following figure shows the sequence of execution of
a complete for loop construct.
True
False
Initialization
Evaluate
Condition
Body of the
for Loop
Exit the for
Loop
Increment/
Decrement
Slide 22 of 25Session 2Ver. 1.0
Object-Oriented Programming Using C#
Demo: Fibonacci Series Using Loop Constructs
Problem Statement:
Write a program that generates the Fibonacci series up to 200.
Slide 23 of 25Session 2Ver. 1.0
Object-Oriented Programming Using C#
The break and continue Statements
The break statement is used to exit from the loop and
prevents the execution of the remaining loop.
The continue statement is used to skip all the subsequent
instructions and take the control back to the loop.
Slide 24 of 25Session 2Ver. 1.0
Object-Oriented Programming Using C#
In this session, you learned that:
Operators are used to compute and compare values and test
multiple conditions.
You use arithmetic operators to perform arithmetic operations
on variables like addition, subtraction, multiplication, and
division.
You can use arithmetic assignment operators to perform
arithmetic operations and assign the result to a variable.
The unary operators, such as the increment and decrement
operators, operate on one operand.
Comparison operators are used to compare two values and
perform an action on the basis of the result of the comparison.
Logical operators are used to evaluate expressions and return
a Boolean value.
Summary
Slide 25 of 25Session 2Ver. 1.0
Object-Oriented Programming Using C#
Conditional constructs are used to allow the selective
execution of statements. The conditional constructs in C# are:
if…else
switch…case
Looping constructs are used when you want a section of a
program to be repeated a certain number of times. C# offers
the following looping constructs:
while
do…while
for
The break and continue statements are used to control the
program flow within a loop.
Summary (Contd.)

More Related Content

What's hot

Operators in c language
Operators in c languageOperators in c language
Operators in c language
Amit Singh
 
C language questions_answers_explanation
C language questions_answers_explanationC language questions_answers_explanation
C language questions_answers_explanation
srinath v
 
[ITP - Lecture 06] Operators, Arithmetic Expression and Order of Precedence
[ITP - Lecture 06] Operators, Arithmetic Expression and Order of Precedence[ITP - Lecture 06] Operators, Arithmetic Expression and Order of Precedence
[ITP - Lecture 06] Operators, Arithmetic Expression and Order of Precedence
Muhammad Hammad Waseem
 
C programming Lab 1
C programming Lab 1C programming Lab 1
C programming Lab 1
Zaibi Gondal
 
CP Handout#4
CP Handout#4CP Handout#4
CP Handout#4
trupti1976
 
Chapter 2 : Balagurusamy_ Programming ANsI in C
Chapter 2 :  Balagurusamy_ Programming ANsI in CChapter 2 :  Balagurusamy_ Programming ANsI in C
Chapter 2 : Balagurusamy_ Programming ANsI in C
BUBT
 
Expression and Operartor In C Programming
Expression and Operartor In C Programming Expression and Operartor In C Programming
Expression and Operartor In C Programming
Kamal Acharya
 
Operator & Expression in c++
Operator & Expression in c++Operator & Expression in c++
Operator & Expression in c++
bajiajugal
 
Types of operators in C
Types of operators in CTypes of operators in C
Types of operators in C
Prabhu Govind
 
[ITP - Lecture 09] Conditional Operator in C/C++
[ITP - Lecture 09] Conditional Operator in C/C++[ITP - Lecture 09] Conditional Operator in C/C++
[ITP - Lecture 09] Conditional Operator in C/C++
Muhammad Hammad Waseem
 
Chapter 3 : Balagurusamy Programming ANSI in C
Chapter 3 : Balagurusamy Programming ANSI in C Chapter 3 : Balagurusamy Programming ANSI in C
Chapter 3 : Balagurusamy Programming ANSI in C
BUBT
 
Chapter 5 exercises Balagurusamy Programming ANSI in c
Chapter 5 exercises Balagurusamy Programming ANSI  in cChapter 5 exercises Balagurusamy Programming ANSI  in c
Chapter 5 exercises Balagurusamy Programming ANSI in c
BUBT
 
C# operators
C# operatorsC# operators
Chapter 4 : Balagurusamy Programming ANSI in C
Chapter 4 : Balagurusamy Programming ANSI in CChapter 4 : Balagurusamy Programming ANSI in C
Chapter 4 : Balagurusamy Programming ANSI in C
BUBT
 
Chapter 6 Balagurusamy Programming ANSI in c
Chapter 6  Balagurusamy Programming ANSI  in cChapter 6  Balagurusamy Programming ANSI  in c
Chapter 6 Balagurusamy Programming ANSI in c
BUBT
 
Operators
OperatorsOperators
[ITP - Lecture 12] Functions in C/C++
[ITP - Lecture 12] Functions in C/C++[ITP - Lecture 12] Functions in C/C++
[ITP - Lecture 12] Functions in C/C++
Muhammad Hammad Waseem
 
Important C program of Balagurusamy Book
Important C program of Balagurusamy BookImportant C program of Balagurusamy Book
Important C program of Balagurusamy Book
Abir Hossain
 
CP Handout#5
CP Handout#5CP Handout#5
CP Handout#5
trupti1976
 

What's hot (19)

Operators in c language
Operators in c languageOperators in c language
Operators in c language
 
C language questions_answers_explanation
C language questions_answers_explanationC language questions_answers_explanation
C language questions_answers_explanation
 
[ITP - Lecture 06] Operators, Arithmetic Expression and Order of Precedence
[ITP - Lecture 06] Operators, Arithmetic Expression and Order of Precedence[ITP - Lecture 06] Operators, Arithmetic Expression and Order of Precedence
[ITP - Lecture 06] Operators, Arithmetic Expression and Order of Precedence
 
C programming Lab 1
C programming Lab 1C programming Lab 1
C programming Lab 1
 
CP Handout#4
CP Handout#4CP Handout#4
CP Handout#4
 
Chapter 2 : Balagurusamy_ Programming ANsI in C
Chapter 2 :  Balagurusamy_ Programming ANsI in CChapter 2 :  Balagurusamy_ Programming ANsI in C
Chapter 2 : Balagurusamy_ Programming ANsI in C
 
Expression and Operartor In C Programming
Expression and Operartor In C Programming Expression and Operartor In C Programming
Expression and Operartor In C Programming
 
Operator & Expression in c++
Operator & Expression in c++Operator & Expression in c++
Operator & Expression in c++
 
Types of operators in C
Types of operators in CTypes of operators in C
Types of operators in C
 
[ITP - Lecture 09] Conditional Operator in C/C++
[ITP - Lecture 09] Conditional Operator in C/C++[ITP - Lecture 09] Conditional Operator in C/C++
[ITP - Lecture 09] Conditional Operator in C/C++
 
Chapter 3 : Balagurusamy Programming ANSI in C
Chapter 3 : Balagurusamy Programming ANSI in C Chapter 3 : Balagurusamy Programming ANSI in C
Chapter 3 : Balagurusamy Programming ANSI in C
 
Chapter 5 exercises Balagurusamy Programming ANSI in c
Chapter 5 exercises Balagurusamy Programming ANSI  in cChapter 5 exercises Balagurusamy Programming ANSI  in c
Chapter 5 exercises Balagurusamy Programming ANSI in c
 
C# operators
C# operatorsC# operators
C# operators
 
Chapter 4 : Balagurusamy Programming ANSI in C
Chapter 4 : Balagurusamy Programming ANSI in CChapter 4 : Balagurusamy Programming ANSI in C
Chapter 4 : Balagurusamy Programming ANSI in C
 
Chapter 6 Balagurusamy Programming ANSI in c
Chapter 6  Balagurusamy Programming ANSI  in cChapter 6  Balagurusamy Programming ANSI  in c
Chapter 6 Balagurusamy Programming ANSI in c
 
Operators
OperatorsOperators
Operators
 
[ITP - Lecture 12] Functions in C/C++
[ITP - Lecture 12] Functions in C/C++[ITP - Lecture 12] Functions in C/C++
[ITP - Lecture 12] Functions in C/C++
 
Important C program of Balagurusamy Book
Important C program of Balagurusamy BookImportant C program of Balagurusamy Book
Important C program of Balagurusamy Book
 
CP Handout#5
CP Handout#5CP Handout#5
CP Handout#5
 

Similar to 02 iec t1_s1_oo_ps_session_02

C programming session 02
C programming session 02C programming session 02
C programming session 02
Vivek Singh
 
Fundamentals of Programming Lecture #1.pptx
Fundamentals of Programming Lecture #1.pptxFundamentals of Programming Lecture #1.pptx
Fundamentals of Programming Lecture #1.pptx
Eyasu46
 
2621008 - C++ 2
2621008 -  C++ 22621008 -  C++ 2
2621008 - C++ 2
S.Ali Sadegh Zadeh
 
Programming for Problem Solving
Programming for Problem SolvingProgramming for Problem Solving
Programming for Problem Solving
Kathirvel Ayyaswamy
 
C sharp chap3
C sharp chap3C sharp chap3
C sharp chap3
Mukesh Tekwani
 
additional.pptx
additional.pptxadditional.pptx
additional.pptx
Yuvraj994432
 
Programming Fundamentals lecture 7
Programming Fundamentals lecture 7Programming Fundamentals lecture 7
Programming Fundamentals lecture 7
REHAN IJAZ
 
FP 201 Unit 2 - Part 3
FP 201 Unit 2 - Part 3FP 201 Unit 2 - Part 3
FP 201 Unit 2 - Part 3
rohassanie
 
Pseudocode By ZAK
Pseudocode By ZAKPseudocode By ZAK
Pseudocode By ZAK
Tabsheer Hasan
 
Operators-computer programming and utilzation
Operators-computer programming and utilzationOperators-computer programming and utilzation
Operators-computer programming and utilzation
Kaushal Patel
 
Control statements in c
Control statements in cControl statements in c
Control statements in c
Sathish Narayanan
 
6 operators-in-c
6 operators-in-c6 operators-in-c
6 operators-in-c
Rohit Shrivastava
 
Dti2143 chapter 3 arithmatic relation-logicalexpression
Dti2143 chapter 3 arithmatic relation-logicalexpressionDti2143 chapter 3 arithmatic relation-logicalexpression
Dti2143 chapter 3 arithmatic relation-logicalexpression
alish sha
 
2.overview of c#
2.overview of c#2.overview of c#
2.overview of c#
Raghu nath
 
C programming session 02
C programming session 02C programming session 02
C programming session 02
Dushmanta Nath
 
Week 4
Week 4Week 4
Week 4
EasyStudy3
 
Python for Machine Learning
Python for Machine LearningPython for Machine Learning
Python for Machine Learning
Student
 
04a intro while
04a intro while04a intro while
04a intro while
hasfaa1017
 
3 operators-expressions-and-statements-120712073351-phpapp01
3 operators-expressions-and-statements-120712073351-phpapp013 operators-expressions-and-statements-120712073351-phpapp01
3 operators-expressions-and-statements-120712073351-phpapp01
Abdul Samee
 
3 operators-expressions-and-statements-120712073351-phpapp01
3 operators-expressions-and-statements-120712073351-phpapp013 operators-expressions-and-statements-120712073351-phpapp01
3 operators-expressions-and-statements-120712073351-phpapp01
Abdul Samee
 

Similar to 02 iec t1_s1_oo_ps_session_02 (20)

C programming session 02
C programming session 02C programming session 02
C programming session 02
 
Fundamentals of Programming Lecture #1.pptx
Fundamentals of Programming Lecture #1.pptxFundamentals of Programming Lecture #1.pptx
Fundamentals of Programming Lecture #1.pptx
 
2621008 - C++ 2
2621008 -  C++ 22621008 -  C++ 2
2621008 - C++ 2
 
Programming for Problem Solving
Programming for Problem SolvingProgramming for Problem Solving
Programming for Problem Solving
 
C sharp chap3
C sharp chap3C sharp chap3
C sharp chap3
 
additional.pptx
additional.pptxadditional.pptx
additional.pptx
 
Programming Fundamentals lecture 7
Programming Fundamentals lecture 7Programming Fundamentals lecture 7
Programming Fundamentals lecture 7
 
FP 201 Unit 2 - Part 3
FP 201 Unit 2 - Part 3FP 201 Unit 2 - Part 3
FP 201 Unit 2 - Part 3
 
Pseudocode By ZAK
Pseudocode By ZAKPseudocode By ZAK
Pseudocode By ZAK
 
Operators-computer programming and utilzation
Operators-computer programming and utilzationOperators-computer programming and utilzation
Operators-computer programming and utilzation
 
Control statements in c
Control statements in cControl statements in c
Control statements in c
 
6 operators-in-c
6 operators-in-c6 operators-in-c
6 operators-in-c
 
Dti2143 chapter 3 arithmatic relation-logicalexpression
Dti2143 chapter 3 arithmatic relation-logicalexpressionDti2143 chapter 3 arithmatic relation-logicalexpression
Dti2143 chapter 3 arithmatic relation-logicalexpression
 
2.overview of c#
2.overview of c#2.overview of c#
2.overview of c#
 
C programming session 02
C programming session 02C programming session 02
C programming session 02
 
Week 4
Week 4Week 4
Week 4
 
Python for Machine Learning
Python for Machine LearningPython for Machine Learning
Python for Machine Learning
 
04a intro while
04a intro while04a intro while
04a intro while
 
3 operators-expressions-and-statements-120712073351-phpapp01
3 operators-expressions-and-statements-120712073351-phpapp013 operators-expressions-and-statements-120712073351-phpapp01
3 operators-expressions-and-statements-120712073351-phpapp01
 
3 operators-expressions-and-statements-120712073351-phpapp01
3 operators-expressions-and-statements-120712073351-phpapp013 operators-expressions-and-statements-120712073351-phpapp01
3 operators-expressions-and-statements-120712073351-phpapp01
 

Recently uploaded

Christine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptxChristine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptx
christinelarrosa
 
Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
UiPathCommunity
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving
 
A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
ScyllaDB
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024
Vadym Kazulkin
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
christinelarrosa
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
DanBrown980551
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
Fwdays
 

Recently uploaded (20)

Christine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptxChristine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptx
 
Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
 
A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
 

02 iec t1_s1_oo_ps_session_02

  • 1. Slide 1 of 25Session 2Ver. 1.0 Object-Oriented Programming Using C# In this session, you will learn to: Use various operators: Arithmetic Arithmetic Assignment Unary Comparison Logical Use conditional constructs Use looping constructs Objectives
  • 2. Slide 2 of 25Session 2Ver. 1.0 Object-Oriented Programming Using C# Applications use operators to process the data entered by a user. Operators in C# can be classified as follows: Arithmetic operators Arithmetic Assignment operators Unary operators Comparison operators Logical operators Using Operators
  • 3. Slide 3 of 25Session 2Ver. 1.0 Object-Oriented Programming Using C# Arithmetic operators are the symbols that are used to perform arithmetic operations on variables. The following table describes the commonly used arithmetic operators. Arithmetic Operators Operator Description Example + Used to add two numbers X=Y+Z; If Y is equal to 20 and Z is equal to 2, X will have the value 22. - Used to subtract two numbers X=Y-Z; If Y is equal to 20 and Z is equal to 2, X will have the value 18. * Used to multiply two numbers X=Y*Z; If Y is equal to 20 and Z is equal to 2, X will have the value 40. / Used to divide one number by another X=Y/Z; If Y is equal to 21 and Z is equal to 2, X will have the value 10. But, if Y is equal to 21.0 and Z is equal to 2, X will have the value 10.5. % Used to divide two numbers and return the remainder X=Y%Z; If Y is equal to 21 and Z is equal to 2, X will contain the value 1.
  • 4. Slide 4 of 25Session 2Ver. 1.0 Object-Oriented Programming Using C# Arithmetic assignment operators are used to perform arithmetic operations to assign a value to an operand. The following table lists the usage and describes the commonly used assignment operators. Arithmetic Assignment Operators Operator Usage Description = X = 5; Stores the value 5 in the variable X. += X+=Y; Same as: X = X + Y; -= X-=Y; Same as: X = X - Y; *= X*=Y; Same as: X = X * Y; /= X/=Y; Same as: X = X / Y; %= X%=Y; Same as: X = X % Y;
  • 5. Slide 5 of 25Session 2Ver. 1.0 Object-Oriented Programming Using C# Unary operators are used to increment or decrement the value of an operand by 1. The following table explains the usage of the increment and decrement operators. Unary Operators Operator Usage Description Example ++ ++Operand; (Preincrement operator) Or, Operand++; (Postincrement operator) Used to increment the value of an operand by 1 Y = ++X; If the initial value of X is 5, after the execution of the preceding statement, values of both X and Y will be 6. Y = X++; If the initial value of X is 5, after the execution of the preceding statement, value of X will be 6 and the value of Y will be 5. -- --Operand; (Predecrement operator) Or, Operand--; (Postdecrement) Used to decrement the value of an operand by 1 Y = --X; If the initial value of X is 5, after the execution of the preceding statement, values of X and Y will be 4. Y = X--; If the initial value of X is 5, after the execution of the preceding statement, value of X will be 4 and the value of Y will be 5.
  • 6. Slide 6 of 25Session 2Ver. 1.0 Object-Oriented Programming Using C# Comparison operators are used to compare two values and perform an action on the basis of the result of that comparison. The following table explains the usage of commonly used comparison operators. Comparison Operators Operator Usage Description Example (In the following examples, the value of X is assumed to be 20 and the value of Y is assumed to be 25) < expression1 < expression2 Used to check whether expression1 is less than expression2 bool Result; Result = X < Y; Result will have the value true. > expression1 > expression2 Used to check whether expression1 is greater than expression2 bool Result; Result = X > Y; Result will have the value false. <= expression1 <= expression2 Used to check whether expression1 is less than or equal to expression2 bool Result; Result = X <= Y; Result will have the value true. >= expression1 >= expression2 Used to check whether expression1 is greater than or equal to expression2 bool Result; Result = X >= Y; Result will have the value false.
  • 7. Slide 7 of 25Session 2Ver. 1.0 Object-Oriented Programming Using C# Comparison Operators (Contd.) Operator Usage Description Example (In the following examples, the value of X is assumed to be 20 and the value of Y is assumed to be 25) == expression1 == expression2 Used to check whether expression1 is equal to expression2 bool Result; Result = X == Y; Result will have the value false. != expression1 != expression2 Used to check whether expression1 is not equal to expression2 bool Result; Result = X != Y; Result will have the value true.
  • 8. Slide 8 of 25Session 2Ver. 1.0 Object-Oriented Programming Using C# Logical operators are used to evaluate expressions and return a Boolean value. The following table explains the usage of logical operators. Logical Operators Operator Usage Description Example && expression1 && expression2 Returns true if both expression1 and expression2 are true. bool Result; string str1, str2; str1 = “Korea”; str2 = “France”; Result= ((str1==“Korea”) && (str2==“France”)) Console.WriteLine (Result .ToString()); The message displays True because str1 has the value “Korea” and str2 has the value “France”. ! ! expression Returns true if the expression is false. bool Result int x; x = 20; Result=(!( x == 10)) Console.WriteLine(Result.ToString()); The message displays True because the expression used returns true.
  • 9. Slide 9 of 25Session 2Ver. 1.0 Object-Oriented Programming Using C# Logical Operators (Contd.) Operator Usage Description Example || expression1 || expression2 Returns true if either expression1 or expression2 or both of them are true. bool Result string str1, str2; str1 = “Korea”; str2 = “England”; Result= ((str1==“Korea”) || (str2== “France”)) Console.WriteLine (Result .ToString()); The message displays True if either str1 has the value “Korea” or str2 has the value “France”. ^ expression1 ^ expression2 Returns true if either expression1 or expression2 is true. It returns false if both expression1 and expression2 are true or if both expression1 and expression2 are false. bool Result; string str1, str2; str1 = “Korea”; str2= “France”; Result = (str1== “Korea”) ^ (str2== “France”); Console.WriteLine (Result .ToString()); The message False is displayed because both the expressions are true.
  • 10. Slide 10 of 25Session 2Ver. 1.0 Object-Oriented Programming Using C# Using Conditional Constructs Conditional constructs allow the selective execution of statements, depending on the value of expression associated with them. The comparison operators are required for evaluating the conditions. The various conditional constructs are: The if…else construct The switch…case construct
  • 11. Slide 11 of 25Session 2Ver. 1.0 Object-Oriented Programming Using C# The if…else conditional construct is followed by a logical expression where data is compared and a decision is made on the basis of the result of the comparison. The following is the syntax of the if…else construct: if (expression) { statements; } else { statements; } The if…else Construct
  • 12. Slide 12 of 25Session 2Ver. 1.0 Object-Oriented Programming Using C# The if…else constructs can be nested inside each other. When if…else construct is nested together, the construct is known as cascading if…else constructs. The if…else Construct (Contd.)
  • 13. Slide 13 of 25Session 2Ver. 1.0 Object-Oriented Programming Using C# The switch…case construct is used when there are multiple values for a variable. The following is the syntax of the switch…case construct: switch (VariableName) { case ConstantExpression_1: statements; break; case ConstantExpression_2: statements; break; The switch…case Construct
  • 14. Slide 14 of 25Session 2Ver. 1.0 Object-Oriented Programming Using C# … case ConstantExpression_n: statements; break; default: statements; break; } The switch…case Construct (Contd.)
  • 15. Slide 15 of 25Session 2Ver. 1.0 Object-Oriented Programming Using C# Problem Statement: Write a program that emulates a calculator. The calculator should be able to perform the following mathematical operations: Addition Subtraction Multiplication Division Demo: Calculator Using Conditional Constructs Conditional Constructs
  • 16. Slide 16 of 25Session 2Ver. 1.0 Object-Oriented Programming Using C# Using Loop Constructs Loop structures are used to execute one or more lines of code repetitively. The following loop constructs are supported by C#: The while loop The do…while loop The for loop
  • 17. Slide 17 of 25Session 2Ver. 1.0 Object-Oriented Programming Using C# The while Loop The while loop construct is used to execute a block of statements for a definite number of times, depending on a condition. The following is the syntax of the while loop construct: while (expression) { statements; }
  • 18. Slide 18 of 25Session 2Ver. 1.0 Object-Oriented Programming Using C# The do…while Loop The do…while loop construct is similar to the while loop construct. Both iterate until the specified loop condition becomes false. The following is the syntax of the do…while loop construct: do { statements; }while(expression);
  • 19. Slide 19 of 25Session 2Ver. 1.0 Object-Oriented Programming Using C# The do…while Loop (Contd.) The following figure shows the difference between the do… while and while loop construct. False do while False True Execute body of Loop Evaluate Condition True Execute body of Loop Evaluate Condition while
  • 20. Slide 20 of 25Session 2Ver. 1.0 Object-Oriented Programming Using C# The for Loop The for loop structure is used to execute a block of statements for a specific number of times. The following is the syntax of the for loop construct: for (initialization; termination; increment/decrement) { statements }
  • 21. Slide 21 of 25Session 2Ver. 1.0 Object-Oriented Programming Using C# The for Loop (Contd.) The following figure shows the sequence of execution of a complete for loop construct. True False Initialization Evaluate Condition Body of the for Loop Exit the for Loop Increment/ Decrement
  • 22. Slide 22 of 25Session 2Ver. 1.0 Object-Oriented Programming Using C# Demo: Fibonacci Series Using Loop Constructs Problem Statement: Write a program that generates the Fibonacci series up to 200.
  • 23. Slide 23 of 25Session 2Ver. 1.0 Object-Oriented Programming Using C# The break and continue Statements The break statement is used to exit from the loop and prevents the execution of the remaining loop. The continue statement is used to skip all the subsequent instructions and take the control back to the loop.
  • 24. Slide 24 of 25Session 2Ver. 1.0 Object-Oriented Programming Using C# In this session, you learned that: Operators are used to compute and compare values and test multiple conditions. You use arithmetic operators to perform arithmetic operations on variables like addition, subtraction, multiplication, and division. You can use arithmetic assignment operators to perform arithmetic operations and assign the result to a variable. The unary operators, such as the increment and decrement operators, operate on one operand. Comparison operators are used to compare two values and perform an action on the basis of the result of the comparison. Logical operators are used to evaluate expressions and return a Boolean value. Summary
  • 25. Slide 25 of 25Session 2Ver. 1.0 Object-Oriented Programming Using C# Conditional constructs are used to allow the selective execution of statements. The conditional constructs in C# are: if…else switch…case Looping constructs are used when you want a section of a program to be repeated a certain number of times. C# offers the following looping constructs: while do…while for The break and continue statements are used to control the program flow within a loop. Summary (Contd.)

Editor's Notes

  1. Students have learnt the structure of different types of dimensions and the importance of surrogate keys in Module I. In this session, students will learn to load the data into the dimension tables after the data has been transformed in the transformation phase. In addition, students will also learn to update data into these dimension tables. Students already know about different types of dimension tables. Therefore, you can start the session by recapitulating the concepts. Initiate the class by asking the following questions: 1. What are the different types of dimensions? 2. Define flat dimension. 3. What are conformed dimension? 4. Define large dimension. 5. Define small dimension. 6. What is the importance of surrogate key in a dimension table? Students will learn the loading and update strategies theoretically in this session. The demonstration to load and update the data in the dimension table will be covered in next session.
  2. Students know the importance of surrogate keys. In this session students will learn the strategy to generate the surrogate key. Give an example to explain the strategy to generate the surrogate keys by concatenating the primary key of the source table with the date stamp. For example, data from a Product table has to be loaded into the Product_Dim dimension table on Feb 09, 2006. The product_code is the primary key column in the Product table. To insert the surrogate key values before loading the data into the dimension table, you can combine the primary key value with the date on which the data has to be loaded. In this case the surrogate key value can be product_code+09022006.
  3. Students know what is the structure of Flat dimension. You can initiate the session by asking the following questions: 1. What are flat dimension tables? 2. What is the structure of flat dimension? 3. Given examples of a flat dimension? Next, tell the strategy to load the data into the flat dimension table. You can explain the loading strategy with the help of the example given in SG. Continue this session by asking the following questions: 4. What are large flat dimension tables? 5. Give examples of large flat dimensions? Then, explain the strategy to load data into the large flat dimension table. Before explaining the strategy to load data into the small dimension table ask the following questions and the tell the strategy to load the data into the dimension table. 6. What are small flat dimension tables? 7. Give examples of small flat dimension tables. With the help of these questions, students will be able to recall about flat dimensions, they have learnt in Module I. Explain this topic with the help of an example given in SG.
  4. Students know what is the structure of Flat dimension. You can initiate the session by asking the following questions: 1. What are flat dimension tables? 2. What is the structure of flat dimension? 3. Given examples of a flat dimension? Next, tell the strategy to load the data into the flat dimension table. You can explain the loading strategy with the help of the example given in SG. Continue this session by asking the following questions: 4. What are large flat dimension tables? 5. Give examples of large flat dimensions? Then, explain the strategy to load data into the large flat dimension table. Before explaining the strategy to load data into the small dimension table ask the following questions and the tell the strategy to load the data into the dimension table. 6. What are small flat dimension tables? 7. Give examples of small flat dimension tables. With the help of these questions, students will be able to recall about flat dimensions, they have learnt in Module I. Explain this topic with the help of an example given in SG.
  5. Students know what is the structure of Flat dimension. You can initiate the session by asking the following questions: 1. What are flat dimension tables? 2. What is the structure of flat dimension? 3. Given examples of a flat dimension? Next, tell the strategy to load the data into the flat dimension table. You can explain the loading strategy with the help of the example given in SG. Continue this session by asking the following questions: 4. What are large flat dimension tables? 5. Give examples of large flat dimensions? Then, explain the strategy to load data into the large flat dimension table. Before explaining the strategy to load data into the small dimension table ask the following questions and the tell the strategy to load the data into the dimension table. 6. What are small flat dimension tables? 7. Give examples of small flat dimension tables. With the help of these questions, students will be able to recall about flat dimensions, they have learnt in Module I. Explain this topic with the help of an example given in SG.
  6. Students know what is the structure of Flat dimension. You can initiate the session by asking the following questions: 1. What are flat dimension tables? 2. What is the structure of flat dimension? 3. Given examples of a flat dimension? Next, tell the strategy to load the data into the flat dimension table. You can explain the loading strategy with the help of the example given in SG. Continue this session by asking the following questions: 4. What are large flat dimension tables? 5. Give examples of large flat dimensions? Then, explain the strategy to load data into the large flat dimension table. Before explaining the strategy to load data into the small dimension table ask the following questions and the tell the strategy to load the data into the dimension table. 6. What are small flat dimension tables? 7. Give examples of small flat dimension tables. With the help of these questions, students will be able to recall about flat dimensions, they have learnt in Module I. Explain this topic with the help of an example given in SG.
  7. Students know what is the structure of Flat dimension. You can initiate the session by asking the following questions: 1. What are flat dimension tables? 2. What is the structure of flat dimension? 3. Given examples of a flat dimension? Next, tell the strategy to load the data into the flat dimension table. You can explain the loading strategy with the help of the example given in SG. Continue this session by asking the following questions: 4. What are large flat dimension tables? 5. Give examples of large flat dimensions? Then, explain the strategy to load data into the large flat dimension table. Before explaining the strategy to load data into the small dimension table ask the following questions and the tell the strategy to load the data into the dimension table. 6. What are small flat dimension tables? 7. Give examples of small flat dimension tables. With the help of these questions, students will be able to recall about flat dimensions, they have learnt in Module I. Explain this topic with the help of an example given in SG.
  8. Students know what is the structure of Flat dimension. You can initiate the session by asking the following questions: 1. What are flat dimension tables? 2. What is the structure of flat dimension? 3. Given examples of a flat dimension? Next, tell the strategy to load the data into the flat dimension table. You can explain the loading strategy with the help of the example given in SG. Continue this session by asking the following questions: 4. What are large flat dimension tables? 5. Give examples of large flat dimensions? Then, explain the strategy to load data into the large flat dimension table. Before explaining the strategy to load data into the small dimension table ask the following questions and the tell the strategy to load the data into the dimension table. 6. What are small flat dimension tables? 7. Give examples of small flat dimension tables. With the help of these questions, students will be able to recall about flat dimensions, they have learnt in Module I. Explain this topic with the help of an example given in SG.
  9. Students know what is the structure of Flat dimension. You can initiate the session by asking the following questions: 1. What are flat dimension tables? 2. What is the structure of flat dimension? 3. Given examples of a flat dimension? Next, tell the strategy to load the data into the flat dimension table. You can explain the loading strategy with the help of the example given in SG. Continue this session by asking the following questions: 4. What are large flat dimension tables? 5. Give examples of large flat dimensions? Then, explain the strategy to load data into the large flat dimension table. Before explaining the strategy to load data into the small dimension table ask the following questions and the tell the strategy to load the data into the dimension table. 6. What are small flat dimension tables? 7. Give examples of small flat dimension tables. With the help of these questions, students will be able to recall about flat dimensions, they have learnt in Module I. Explain this topic with the help of an example given in SG.
  10. Student already have learnt about SCDs in Module I. Therefore, you can start this topic by asking the following questions to students: What are type 1 SCDs? Given an example to explain type 1 SCDs. This will recapitulate what they have learnt about type 1 SCD in Module 1. Now explain the strategy to load the data into these dimension tables with help of the given diagram. Relate this diagram to the example given in SG.
  11. Student already have learnt about type 2 SCDs in Module I. Therefore, you can start this topic by asking the following questions to students: What are type 2 SCDs? Given an example to explain type 2 SCDs. This will recapitulate what they have learnt about type 2 SCD in Module 1. Now explain the strategy to update the data into these dimension tables with help the example given in SG. After explaining the examples, you can ask students to think of an example of a type 2 SCD and then tell the strategy to update the data into this dimension table.
  12. Student already have learnt about type 2 SCDs in Module I. Therefore, you can start this topic by asking the following questions to students: What are type 2 SCDs? Given an example to explain type 2 SCDs. This will recapitulate what they have learnt about type 2 SCD in Module 1. Now explain the strategy to update the data into these dimension tables with help the example given in SG. After explaining the examples, you can ask students to think of an example of a type 2 SCD and then tell the strategy to update the data into this dimension table.
  13. Student already have learnt about type 2 SCDs in Module I. Therefore, you can start this topic by asking the following questions to students: What are type 2 SCDs? Given an example to explain type 2 SCDs. This will recapitulate what they have learnt about type 2 SCD in Module 1. Now explain the strategy to update the data into these dimension tables with help the example given in SG. After explaining the examples, you can ask students to think of an example of a type 2 SCD and then tell the strategy to update the data into this dimension table.
  14. Student already have learnt about type 2 SCDs in Module I. Therefore, you can start this topic by asking the following questions to students: What are type 2 SCDs? Given an example to explain type 2 SCDs. This will recapitulate what they have learnt about type 2 SCD in Module 1. Now explain the strategy to update the data into these dimension tables with help the example given in SG. After explaining the examples, you can ask students to think of an example of a type 2 SCD and then tell the strategy to update the data into this dimension table.
  15. Student already have learnt about type 2 SCDs in Module I. Therefore, you can start this topic by asking the following questions to students: What are type 2 SCDs? Given an example to explain type 2 SCDs. This will recapitulate what they have learnt about type 2 SCD in Module 1. Now explain the strategy to update the data into these dimension tables with help the example given in SG. After explaining the examples, you can ask students to think of an example of a type 2 SCD and then tell the strategy to update the data into this dimension table.
  16. Student already have learnt about SCDs in Module I. Therefore, you can start this topic by asking the following questions to students: What are type 1 SCDs? Given an example to explain type 1 SCDs. This will recapitulate what they have learnt about type 1 SCD in Module 1. Now explain the strategy to load the data into these dimension tables with help of the given diagram. Relate this diagram to the example given in SG.
  17. Student already have learnt about SCDs in Module I. Therefore, you can start this topic by asking the following questions to students: What are type 1 SCDs? Given an example to explain type 1 SCDs. This will recapitulate what they have learnt about type 1 SCD in Module 1. Now explain the strategy to load the data into these dimension tables with help of the given diagram. Relate this diagram to the example given in SG.
  18. Student already have learnt about SCDs in Module I. Therefore, you can start this topic by asking the following questions to students: What are type 1 SCDs? Given an example to explain type 1 SCDs. This will recapitulate what they have learnt about type 1 SCD in Module 1. Now explain the strategy to load the data into these dimension tables with help of the given diagram. Relate this diagram to the example given in SG.
  19. Student already have learnt about SCDs in Module I. Therefore, you can start this topic by asking the following questions to students: What are type 1 SCDs? Given an example to explain type 1 SCDs. This will recapitulate what they have learnt about type 1 SCD in Module 1. Now explain the strategy to load the data into these dimension tables with help of the given diagram. Relate this diagram to the example given in SG.
  20. Student already have learnt about SCDs in Module I. Therefore, you can start this topic by asking the following questions to students: What are type 1 SCDs? Given an example to explain type 1 SCDs. This will recapitulate what they have learnt about type 1 SCD in Module 1. Now explain the strategy to load the data into these dimension tables with help of the given diagram. Relate this diagram to the example given in SG.
  21. Student already have learnt about SCDs in Module I. Therefore, you can start this topic by asking the following questions to students: What are type 1 SCDs? Given an example to explain type 1 SCDs. This will recapitulate what they have learnt about type 1 SCD in Module 1. Now explain the strategy to load the data into these dimension tables with help of the given diagram. Relate this diagram to the example given in SG.
  22. Student already have learnt about SCDs in Module I. Therefore, you can start this topic by asking the following questions to students: What are type 1 SCDs? Given an example to explain type 1 SCDs. This will recapitulate what they have learnt about type 1 SCD in Module 1. Now explain the strategy to load the data into these dimension tables with help of the given diagram. Relate this diagram to the example given in SG.
  23. Student already have learnt about SCDs in Module I. Therefore, you can start this topic by asking the following questions to students: What are type 1 SCDs? Given an example to explain type 1 SCDs. This will recapitulate what they have learnt about type 1 SCD in Module 1. Now explain the strategy to load the data into these dimension tables with help of the given diagram. Relate this diagram to the example given in SG.
  24. You can summarize the session by running through the summary given in SG. In addition, you can also ask students summarize what they have learnt in this session.
  25. You can summarize the session by running through the summary given in SG. In addition, you can also ask students summarize what they have learnt in this session.