SlideShare a Scribd company logo
1 of 25
Download to read offline
Object-Oriented Programming Using C#
Objectives


               In this session, you will learn to:
                  Use various operators:
                    •   Arithmetic
                    •   Arithmetic Assignment
                    •   Unary
                    •   Comparison
                    •   Logical
                – Use conditional constructs
                – Use looping constructs




    Ver. 1.0                          Session 2      Slide 1 of 25
Object-Oriented Programming Using C#
Using Operators


               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




    Ver. 1.0                       Session 2                       Slide 2 of 25
Object-Oriented Programming Using C#
Arithmetic Operators


               Arithmetic operators are the symbols that are used to
               perform arithmetic operations on variables.
               The following table describes the commonly used arithmetic
               operators.
                     Operator        Description                                 Example
                 +              Used to add two           X=Y+Z;
                                numbers                   If Y is equal to 20 and Z is equal to 2, X will have the
                                                          value 22.
                 -              Used to subtract two      X=Y-Z;
                                numbers                   If Y is equal to 20 and Z is equal to 2, X will have the
                                                          value 18.
                 *              Used to multiply two      X=Y*Z;
                                numbers                   If Y is equal to 20 and Z is equal to 2, X will have the
                                                          value 40.
                 /              Used to divide one        X=Y/Z;
                                number by another         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        X=Y%Z;
                                numbers and return the    If Y is equal to 21 and Z is equal to 2, X will contain
                                remainder                 the value 1.



    Ver. 1.0                                         Session 2                                                       Slide 3 of 25
Object-Oriented Programming Using C#
Arithmetic Assignment Operators


               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.
                   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;




    Ver. 1.0                               Session 2                                           Slide 4 of 25
Object-Oriented Programming Using C#
Unary Operators


               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.
                Operator             Usage              Description                    Example
               ++          ++Operand;                 Used to         Y = ++X;
                           (Preincrement operator)    increment the   If the initial value of X is 5, after the
                           Or,                        value of an     execution of the preceding statement, values
                           Operand++;                 operand by 1    of both X and Y will be 6.
                           (Postincrement operator)                   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;                 Used to         Y = --X;
                           (Predecrement operator)    decrement the   If the initial value of X is 5, after the
                           Or,                        value of an     execution of the preceding statement, values
                           Operand--;                 operand by 1    of X and Y will be 4.
                           (Postdecrement)                            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.



    Ver. 1.0                                   Session 2                                             Slide 5 of 25
Object-Oriented Programming Using C#
Comparison Operators


                   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.
               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 <    Used to check whether               bool Result;
                          expression2      expression1 is less than            Result = X < Y;
                                           expression2                         Result will have the value true.
               >          expression1 >    Used to check whether               bool Result;
                          expression2      expression1 is greater than         Result = X > Y;
                                           expression2                         Result will have the value false.
               <=         expression1 <=   Used to check whether               bool Result;
                          expression2      expression1 is less than or equal   Result = X <= Y;
                                           to expression2                      Result will have the value true.
               >=         expression1 >=   Used to check whether               bool Result;
                          expression2      expression1 is greater than or      Result = X >= Y;
                                           equal to expression2                Result will have the value false.

    Ver. 1.0                                    Session 2                                                    Slide 6 of 25
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 ==   Used to check whether         bool Result;
                           expression2      expression1 is equal to       Result = X == Y;
                                            expression2                   Result will have the value false.

               !=          expression1 !=   Used to check whether         bool Result;
                           expression2      expression1 is not equal to   Result = X != Y;
                                            expression2                   Result will have the value true.




    Ver. 1.0                                     Session 2                                                    Slide 7 of 25
Object-Oriented Programming Using C#
Logical Operators

               Logical operators are used to evaluate expressions and
               return a Boolean value.
               The following table explains the usage of logical operators.
                      Operator       Usage           Description                      Example
                  &&             expression1 &&    Returns true if     bool Result;
                                 expression2       both expression1    string str1, str2;
                                                   and expression2     str1 = “Korea”;
                                                   are true.           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     bool Result
                                                   the expression is   int x;
                                                   false.              x = 20;
                                                                        Result=(!( x == 10))
                                                                       Console.WriteLine(Result.ToString());
                                                                       The message displays True because
                                                                       the expression used returns true.




    Ver. 1.0                                      Session 2                                                    Slide 8 of 25
Object-Oriented Programming Using C#
Logical Operators (Contd.)



                Operator        Usage            Description                             Example

               ||          expression1 ||   Returns true if either    bool Result
                           expression2      expression1 or            string str1, str2;
                                            expression2 or both of    str1 = “Korea”;
                                            them are true.            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 ^    Returns true if either    bool Result;
                           expression2      expression1 or            string str1, str2;
                                            expression2 is true. It   str1 = “Korea”;
                                            returns false if both     str2= “France”;
                                            expression1 and           Result = (str1== “Korea”) ^ (str2== “France”);
                                            expression2 are true      Console.WriteLine (Result .ToString());
                                            or if both expression1    The message False is displayed because both
                                            and expression2 are       the expressions are true.
                                            false.




    Ver. 1.0                                    Session 2                                                    Slide 9 of 25
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




    Ver. 1.0                      Session 2                       Slide 10 of 25
Object-Oriented Programming Using C#
The if…else Construct


               • 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;
                  }




    Ver. 1.0                        Session 2                       Slide 11 of 25
Object-Oriented Programming Using C#
The if…else Construct (Contd.)


               • 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.




    Ver. 1.0                        Session 2                      Slide 12 of 25
Object-Oriented Programming Using C#
The switch…case Construct


               • 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;




    Ver. 1.0                        Session 2                       Slide 13 of 25
Object-Oriented Programming Using C#
The switch…case Construct (Contd.)


               …
                   case ConstantExpression_n:
                     statements;
                     break;
                   default:
                     statements;
                     break;
               }




    Ver. 1.0                    Session 2       Slide 14 of 25
Object-Oriented Programming Using C#
Demo: Calculator Using Conditional Constructs Conditional Constructs


                Problem Statement:
                   Write a program that emulates a calculator. The calculator
                   should be able to perform the following mathematical
                   operations:
                      Addition
                      Subtraction
                      Multiplication
                      Division




     Ver. 1.0                          Session 2                         Slide 15 of 25
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




    Ver. 1.0                      Session 2                        Slide 16 of 25
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;
                  }




    Ver. 1.0                         Session 2                       Slide 17 of 25
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);




    Ver. 1.0                          Session 2                        Slide 18 of 25
Object-Oriented Programming Using C#
The do…while Loop (Contd.)


               • The following figure shows the difference between the do…
                 while and while loop construct.
                                                                  while
                         do while



                                    Execute body of
                                    Loop

                                                                              Evaluate
                                                                              Condition

                                                                                              False




                                                                     True


                                      Evaluate           False
                                      Condition                             Execute body of
                                                                                Loop



                           True




    Ver. 1.0                                          Session 2                                       Slide 19 of 25
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
                     }




    Ver. 1.0                         Session 2                        Slide 20 of 25
Object-Oriented Programming Using C#
The for Loop (Contd.)


               The following figure shows the sequence of execution of
               a complete for loop construct.

                                 Initialization




                                                   False
                                  Evaluate                 Exit the for
                                  Condition                   Loop

                                                  True




                                  Body of the
                                   for Loop




                                  Increment/
                                  Decrement




    Ver. 1.0                      Session 2                               Slide 21 of 25
Object-Oriented Programming Using C#
Demo: Fibonacci Series Using Loop Constructs


               Problem Statement:
                  Write a program that generates the Fibonacci series up to 200.




    Ver. 1.0                       Session 2                            Slide 22 of 25
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.




    Ver. 1.0                        Session 2                      Slide 23 of 25
Object-Oriented Programming Using C#
Summary


              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.



   Ver. 1.0                        Session 2                            Slide 24 of 25
Object-Oriented Programming Using C#
Summary (Contd.)


                 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.




    Ver. 1.0                       Session 2                           Slide 25 of 25

More Related Content

What's hot

Chapter 1 (functions).
Chapter 1 (functions).Chapter 1 (functions).
Chapter 1 (functions).Eko Wijayanto
 
237654933 mathematics-t-form-6
237654933 mathematics-t-form-6237654933 mathematics-t-form-6
237654933 mathematics-t-form-6homeworkping3
 
Lesson 15: Inverse Functions and Logarithms
Lesson 15: Inverse Functions and LogarithmsLesson 15: Inverse Functions and Logarithms
Lesson 15: Inverse Functions and LogarithmsMatthew Leingang
 
Scatter diagrams and correlation and simple linear regresssion
Scatter diagrams and correlation and simple linear regresssionScatter diagrams and correlation and simple linear regresssion
Scatter diagrams and correlation and simple linear regresssionAnkit Katiyar
 
Lesson 15: Inverse Functions and Logarithms
Lesson 15: Inverse Functions and LogarithmsLesson 15: Inverse Functions and Logarithms
Lesson 15: Inverse Functions and LogarithmsMatthew Leingang
 
Math Homework 9
Math Homework 9Math Homework 9
Math Homework 9jjlendaya
 
Submodularity slides
Submodularity slidesSubmodularity slides
Submodularity slidesdragonthu
 
X2 T01 09 geometrical representation (2010)
X2 T01 09 geometrical representation (2010)X2 T01 09 geometrical representation (2010)
X2 T01 09 geometrical representation (2010)Nigel Simmons
 
Lesson 14: Exponential Functions
Lesson 14: Exponential FunctionsLesson 14: Exponential Functions
Lesson 14: Exponential FunctionsMatthew Leingang
 
Multiple integrals
Multiple integralsMultiple integrals
Multiple integralsTarun Gehlot
 
Exponentials integrals
Exponentials integralsExponentials integrals
Exponentials integralsTarun Gehlot
 
Engr 371 final exam april 1996
Engr 371 final exam april 1996Engr 371 final exam april 1996
Engr 371 final exam april 1996amnesiann
 
Lesson 1: Functions and their representations (slides)
Lesson 1: Functions and their representations (slides)Lesson 1: Functions and their representations (slides)
Lesson 1: Functions and their representations (slides)Matthew Leingang
 

What's hot (17)

Chapter 1 (functions).
Chapter 1 (functions).Chapter 1 (functions).
Chapter 1 (functions).
 
237654933 mathematics-t-form-6
237654933 mathematics-t-form-6237654933 mathematics-t-form-6
237654933 mathematics-t-form-6
 
Lesson 15: Inverse Functions and Logarithms
Lesson 15: Inverse Functions and LogarithmsLesson 15: Inverse Functions and Logarithms
Lesson 15: Inverse Functions and Logarithms
 
Scatter diagrams and correlation and simple linear regresssion
Scatter diagrams and correlation and simple linear regresssionScatter diagrams and correlation and simple linear regresssion
Scatter diagrams and correlation and simple linear regresssion
 
Lesson 15: Inverse Functions and Logarithms
Lesson 15: Inverse Functions and LogarithmsLesson 15: Inverse Functions and Logarithms
Lesson 15: Inverse Functions and Logarithms
 
Day 01
Day 01Day 01
Day 01
 
Math Homework 9
Math Homework 9Math Homework 9
Math Homework 9
 
Submodularity slides
Submodularity slidesSubmodularity slides
Submodularity slides
 
X2 T01 09 geometrical representation (2010)
X2 T01 09 geometrical representation (2010)X2 T01 09 geometrical representation (2010)
X2 T01 09 geometrical representation (2010)
 
Exponents)
Exponents)Exponents)
Exponents)
 
Lesson 14: Exponential Functions
Lesson 14: Exponential FunctionsLesson 14: Exponential Functions
Lesson 14: Exponential Functions
 
Topic1
Topic1Topic1
Topic1
 
Multiple integrals
Multiple integralsMultiple integrals
Multiple integrals
 
Exponentials integrals
Exponentials integralsExponentials integrals
Exponentials integrals
 
Engr 371 final exam april 1996
Engr 371 final exam april 1996Engr 371 final exam april 1996
Engr 371 final exam april 1996
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Lesson 1: Functions and their representations (slides)
Lesson 1: Functions and their representations (slides)Lesson 1: Functions and their representations (slides)
Lesson 1: Functions and their representations (slides)
 

Similar to 02 iec t1_s1_oo_ps_session_02

Similar to 02 iec t1_s1_oo_ps_session_02 (20)

02 iec t1_s1_oo_ps_session_02
02 iec t1_s1_oo_ps_session_0202 iec t1_s1_oo_ps_session_02
02 iec t1_s1_oo_ps_session_02
 
Operators
OperatorsOperators
Operators
 
6 logistic regression classification algo
6 logistic regression   classification algo6 logistic regression   classification algo
6 logistic regression classification algo
 
Radical functions
Radical functionsRadical functions
Radical functions
 
Basics of Optimization Theory
Basics of Optimization Theory Basics of Optimization Theory
Basics of Optimization Theory
 
Functions
FunctionsFunctions
Functions
 
Functions
FunctionsFunctions
Functions
 
Unit ii chapter 1 operator and expressions in c
Unit ii chapter 1 operator and expressions in cUnit ii chapter 1 operator and expressions in c
Unit ii chapter 1 operator and expressions in c
 
C sharp chap3
C sharp chap3C sharp chap3
C sharp chap3
 
FP 201 Unit 2 - Part 3
FP 201 Unit 2 - Part 3FP 201 Unit 2 - Part 3
FP 201 Unit 2 - Part 3
 
Compiler: Programming Language= Assignments and statements
Compiler: Programming Language= Assignments and statementsCompiler: Programming Language= Assignments and statements
Compiler: Programming Language= Assignments and statements
 
Limits And Derivative slayerix
Limits And Derivative slayerixLimits And Derivative slayerix
Limits And Derivative slayerix
 
Limits And Derivative
Limits And DerivativeLimits And Derivative
Limits And Derivative
 
R lecture co4_math 21-1
R lecture co4_math 21-1R lecture co4_math 21-1
R lecture co4_math 21-1
 
Types of Operators in C
Types of Operators in CTypes of Operators in C
Types of Operators in C
 
Limits and derivatives
Limits and derivativesLimits and derivatives
Limits and derivatives
 
Machine learning
Machine learningMachine learning
Machine learning
 
Domain and range (linear, quadratic, rational functions)
Domain and range (linear, quadratic, rational functions)Domain and range (linear, quadratic, rational functions)
Domain and range (linear, quadratic, rational functions)
 
Operators in C Programming
Operators in C ProgrammingOperators in C Programming
Operators in C Programming
 
Inverse circular function
Inverse circular functionInverse circular function
Inverse circular function
 

More from Niit Care (20)

Ajs 1 b
Ajs 1 bAjs 1 b
Ajs 1 b
 
Ajs 4 b
Ajs 4 bAjs 4 b
Ajs 4 b
 
Ajs 4 a
Ajs 4 aAjs 4 a
Ajs 4 a
 
Ajs 4 c
Ajs 4 cAjs 4 c
Ajs 4 c
 
Ajs 3 b
Ajs 3 bAjs 3 b
Ajs 3 b
 
Ajs 3 a
Ajs 3 aAjs 3 a
Ajs 3 a
 
Ajs 3 c
Ajs 3 cAjs 3 c
Ajs 3 c
 
Ajs 2 b
Ajs 2 bAjs 2 b
Ajs 2 b
 
Ajs 2 a
Ajs 2 aAjs 2 a
Ajs 2 a
 
Ajs 2 c
Ajs 2 cAjs 2 c
Ajs 2 c
 
Ajs 1 a
Ajs 1 aAjs 1 a
Ajs 1 a
 
Ajs 1 c
Ajs 1 cAjs 1 c
Ajs 1 c
 
Dacj 4 2-c
Dacj 4 2-cDacj 4 2-c
Dacj 4 2-c
 
Dacj 4 2-b
Dacj 4 2-bDacj 4 2-b
Dacj 4 2-b
 
Dacj 4 2-a
Dacj 4 2-aDacj 4 2-a
Dacj 4 2-a
 
Dacj 4 1-c
Dacj 4 1-cDacj 4 1-c
Dacj 4 1-c
 
Dacj 4 1-b
Dacj 4 1-bDacj 4 1-b
Dacj 4 1-b
 
Dacj 4 1-a
Dacj 4 1-aDacj 4 1-a
Dacj 4 1-a
 
Dacj 1-2 b
Dacj 1-2 bDacj 1-2 b
Dacj 1-2 b
 
Dacj 1-3 c
Dacj 1-3 cDacj 1-3 c
Dacj 1-3 c
 

Recently uploaded

JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...amber724300
 
WomenInAutomation2024: AI and Automation for eveyone
WomenInAutomation2024: AI and Automation for eveyoneWomenInAutomation2024: AI and Automation for eveyone
WomenInAutomation2024: AI and Automation for eveyoneUiPathCommunity
 
QMMS Lesson 2 - Using MS Excel Formula.pdf
QMMS Lesson 2 - Using MS Excel Formula.pdfQMMS Lesson 2 - Using MS Excel Formula.pdf
QMMS Lesson 2 - Using MS Excel Formula.pdfROWELL MARQUINA
 
Laying the Data Foundations for Artificial Intelligence!
Laying the Data Foundations for Artificial Intelligence!Laying the Data Foundations for Artificial Intelligence!
Laying the Data Foundations for Artificial Intelligence!Memoori
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Green paths: Learning from publishers’ sustainability journeys - Tech Forum 2024
Green paths: Learning from publishers’ sustainability journeys - Tech Forum 2024Green paths: Learning from publishers’ sustainability journeys - Tech Forum 2024
Green paths: Learning from publishers’ sustainability journeys - Tech Forum 2024BookNet Canada
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessWSO2
 
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdf
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdfHCI Lesson 1 - Introduction to Human-Computer Interaction.pdf
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdfROWELL MARQUINA
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Dublin_mulesoft_meetup_API_specifications.pptx
Dublin_mulesoft_meetup_API_specifications.pptxDublin_mulesoft_meetup_API_specifications.pptx
Dublin_mulesoft_meetup_API_specifications.pptxKunal Gupta
 
Bitdefender-CSG-Report-creat7534-interactive
Bitdefender-CSG-Report-creat7534-interactiveBitdefender-CSG-Report-creat7534-interactive
Bitdefender-CSG-Report-creat7534-interactivestartupro
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
A PowerPoint Presentation on Vikram Lander pptx
A PowerPoint Presentation on Vikram Lander pptxA PowerPoint Presentation on Vikram Lander pptx
A PowerPoint Presentation on Vikram Lander pptxatharvdev2010
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfAarwolf Industries LLC
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 

Recently uploaded (20)

JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
 
WomenInAutomation2024: AI and Automation for eveyone
WomenInAutomation2024: AI and Automation for eveyoneWomenInAutomation2024: AI and Automation for eveyone
WomenInAutomation2024: AI and Automation for eveyone
 
QMMS Lesson 2 - Using MS Excel Formula.pdf
QMMS Lesson 2 - Using MS Excel Formula.pdfQMMS Lesson 2 - Using MS Excel Formula.pdf
QMMS Lesson 2 - Using MS Excel Formula.pdf
 
Laying the Data Foundations for Artificial Intelligence!
Laying the Data Foundations for Artificial Intelligence!Laying the Data Foundations for Artificial Intelligence!
Laying the Data Foundations for Artificial Intelligence!
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Green paths: Learning from publishers’ sustainability journeys - Tech Forum 2024
Green paths: Learning from publishers’ sustainability journeys - Tech Forum 2024Green paths: Learning from publishers’ sustainability journeys - Tech Forum 2024
Green paths: Learning from publishers’ sustainability journeys - Tech Forum 2024
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with Platformless
 
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdf
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdfHCI Lesson 1 - Introduction to Human-Computer Interaction.pdf
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdf
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Dublin_mulesoft_meetup_API_specifications.pptx
Dublin_mulesoft_meetup_API_specifications.pptxDublin_mulesoft_meetup_API_specifications.pptx
Dublin_mulesoft_meetup_API_specifications.pptx
 
Bitdefender-CSG-Report-creat7534-interactive
Bitdefender-CSG-Report-creat7534-interactiveBitdefender-CSG-Report-creat7534-interactive
Bitdefender-CSG-Report-creat7534-interactive
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
A PowerPoint Presentation on Vikram Lander pptx
A PowerPoint Presentation on Vikram Lander pptxA PowerPoint Presentation on Vikram Lander pptx
A PowerPoint Presentation on Vikram Lander pptx
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdf
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 

02 iec t1_s1_oo_ps_session_02

  • 1. Object-Oriented Programming Using C# Objectives In this session, you will learn to: Use various operators: • Arithmetic • Arithmetic Assignment • Unary • Comparison • Logical – Use conditional constructs – Use looping constructs Ver. 1.0 Session 2 Slide 1 of 25
  • 2. Object-Oriented Programming Using C# Using Operators 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 Ver. 1.0 Session 2 Slide 2 of 25
  • 3. Object-Oriented Programming Using C# Arithmetic Operators Arithmetic operators are the symbols that are used to perform arithmetic operations on variables. The following table describes the commonly used arithmetic operators. Operator Description Example + Used to add two X=Y+Z; numbers If Y is equal to 20 and Z is equal to 2, X will have the value 22. - Used to subtract two X=Y-Z; numbers If Y is equal to 20 and Z is equal to 2, X will have the value 18. * Used to multiply two X=Y*Z; numbers If Y is equal to 20 and Z is equal to 2, X will have the value 40. / Used to divide one X=Y/Z; number by another 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 X=Y%Z; numbers and return the If Y is equal to 21 and Z is equal to 2, X will contain remainder the value 1. Ver. 1.0 Session 2 Slide 3 of 25
  • 4. Object-Oriented Programming Using C# Arithmetic Assignment Operators 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. 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; Ver. 1.0 Session 2 Slide 4 of 25
  • 5. Object-Oriented Programming Using C# Unary Operators 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. Operator Usage Description Example ++ ++Operand; Used to Y = ++X; (Preincrement operator) increment the If the initial value of X is 5, after the Or, value of an execution of the preceding statement, values Operand++; operand by 1 of both X and Y will be 6. (Postincrement operator) 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; Used to Y = --X; (Predecrement operator) decrement the If the initial value of X is 5, after the Or, value of an execution of the preceding statement, values Operand--; operand by 1 of X and Y will be 4. (Postdecrement) 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. Ver. 1.0 Session 2 Slide 5 of 25
  • 6. Object-Oriented Programming Using C# Comparison Operators 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. 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 < Used to check whether bool Result; expression2 expression1 is less than Result = X < Y; expression2 Result will have the value true. > expression1 > Used to check whether bool Result; expression2 expression1 is greater than Result = X > Y; expression2 Result will have the value false. <= expression1 <= Used to check whether bool Result; expression2 expression1 is less than or equal Result = X <= Y; to expression2 Result will have the value true. >= expression1 >= Used to check whether bool Result; expression2 expression1 is greater than or Result = X >= Y; equal to expression2 Result will have the value false. Ver. 1.0 Session 2 Slide 6 of 25
  • 7. 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 == Used to check whether bool Result; expression2 expression1 is equal to Result = X == Y; expression2 Result will have the value false. != expression1 != Used to check whether bool Result; expression2 expression1 is not equal to Result = X != Y; expression2 Result will have the value true. Ver. 1.0 Session 2 Slide 7 of 25
  • 8. Object-Oriented Programming Using C# Logical Operators Logical operators are used to evaluate expressions and return a Boolean value. The following table explains the usage of logical operators. Operator Usage Description Example && expression1 && Returns true if bool Result; expression2 both expression1 string str1, str2; and expression2 str1 = “Korea”; are true. 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 bool Result the expression is int x; false. x = 20; Result=(!( x == 10)) Console.WriteLine(Result.ToString()); The message displays True because the expression used returns true. Ver. 1.0 Session 2 Slide 8 of 25
  • 9. Object-Oriented Programming Using C# Logical Operators (Contd.) Operator Usage Description Example || expression1 || Returns true if either bool Result expression2 expression1 or string str1, str2; expression2 or both of str1 = “Korea”; them are true. 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 ^ Returns true if either bool Result; expression2 expression1 or string str1, str2; expression2 is true. It str1 = “Korea”; returns false if both str2= “France”; expression1 and Result = (str1== “Korea”) ^ (str2== “France”); expression2 are true Console.WriteLine (Result .ToString()); or if both expression1 The message False is displayed because both and expression2 are the expressions are true. false. Ver. 1.0 Session 2 Slide 9 of 25
  • 10. 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 Ver. 1.0 Session 2 Slide 10 of 25
  • 11. Object-Oriented Programming Using C# The if…else Construct • 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; } Ver. 1.0 Session 2 Slide 11 of 25
  • 12. Object-Oriented Programming Using C# The if…else Construct (Contd.) • 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. Ver. 1.0 Session 2 Slide 12 of 25
  • 13. Object-Oriented Programming Using C# The switch…case Construct • 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; Ver. 1.0 Session 2 Slide 13 of 25
  • 14. Object-Oriented Programming Using C# The switch…case Construct (Contd.) … case ConstantExpression_n: statements; break; default: statements; break; } Ver. 1.0 Session 2 Slide 14 of 25
  • 15. Object-Oriented Programming Using C# Demo: Calculator Using Conditional Constructs Conditional Constructs Problem Statement: Write a program that emulates a calculator. The calculator should be able to perform the following mathematical operations: Addition Subtraction Multiplication Division Ver. 1.0 Session 2 Slide 15 of 25
  • 16. 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 Ver. 1.0 Session 2 Slide 16 of 25
  • 17. 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; } Ver. 1.0 Session 2 Slide 17 of 25
  • 18. 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); Ver. 1.0 Session 2 Slide 18 of 25
  • 19. Object-Oriented Programming Using C# The do…while Loop (Contd.) • The following figure shows the difference between the do… while and while loop construct. while do while Execute body of Loop Evaluate Condition False True Evaluate False Condition Execute body of Loop True Ver. 1.0 Session 2 Slide 19 of 25
  • 20. 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 } Ver. 1.0 Session 2 Slide 20 of 25
  • 21. Object-Oriented Programming Using C# The for Loop (Contd.) The following figure shows the sequence of execution of a complete for loop construct. Initialization False Evaluate Exit the for Condition Loop True Body of the for Loop Increment/ Decrement Ver. 1.0 Session 2 Slide 21 of 25
  • 22. Object-Oriented Programming Using C# Demo: Fibonacci Series Using Loop Constructs Problem Statement: Write a program that generates the Fibonacci series up to 200. Ver. 1.0 Session 2 Slide 22 of 25
  • 23. 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. Ver. 1.0 Session 2 Slide 23 of 25
  • 24. Object-Oriented Programming Using C# Summary 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. Ver. 1.0 Session 2 Slide 24 of 25
  • 25. Object-Oriented Programming Using C# Summary (Contd.) 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. Ver. 1.0 Session 2 Slide 25 of 25

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.