SlideShare une entreprise Scribd logo
1  sur  26
Object-Oriented Programming Using C#
Objectives


                In this session, you will learn to:
                   Define abstraction and encapsulation
                   Implement encapsulation by using access specifiers
                   Use methods




     Ver. 1.0                        Session 4                          Slide 1 of 26
Object-Oriented Programming Using C#
Introducing Abstraction and Encapsulation


                Abstraction and encapsulation are important features of any
                object-oriented programming language.
                Abstraction involves extracting only the relevant information.
                Encapsulation involves packaging one or more components
                together.




     Ver. 1.0                       Session 4                         Slide 2 of 26
Object-Oriented Programming Using C#
Defining Abstraction


                An automobile salesperson is aware that different people
                have different preferences.
                   Some people are interested in the speed of a car, some in its
                   price, some in the engine, and the some in its style.
                   Although all of them want to buy a car, each of them is
                   interested in a specific attribute or feature.
                   The salesman knows all the details of a car, but he presents
                   only the relevant information to a potential customer.
                   As a result, a the salesman practices abstraction and presents
                   only relevant details to customer.




     Ver. 1.0                       Session 4                            Slide 3 of 26
Object-Oriented Programming Using C#
Defining Encapsulation


                Encapsulation literally means ‘to enclose in or as if in a
                capsule’.
                Encapsulation is defined as the process of enclosing one or
                more items within a physical or logical package.
                It involves preventing access to nonessential details.




     Ver. 1.0                      Session 4                        Slide 4 of 26
Object-Oriented Programming Using C#
Implementing Encapsulation by Using Access Specifiers


                An access specifier defines the scope of a class member.
                A class member refers to the variables and functions in a
                class.
                A program can have one or more classes.
                You may want some members of a class to be accessible to
                other classes.
                But, you may not want some other members of the class to
                be accessible outside the class.




     Ver. 1.0                     Session 4                       Slide 5 of 26
Object-Oriented Programming Using C#
Types of Access Specifiers


                C# supports the following access specifiers:
                   public
                   private
                   protected
                   internal
                   protected internal




     Ver. 1.0                           Session 4              Slide 6 of 26
Object-Oriented Programming Using C#
Demo: Calculating Area and Volume by Using Access Specifiers


                Problem Statement:
                   Write a program to calculate the area of a rectangle and a
                   square.




     Ver. 1.0                        Session 4                            Slide 7 of 26
Object-Oriented Programming Using C#
Using Methods


               A method is a set of one or more program statements,
               which can be executed by referring to the method name.
               To use methods, you need to:
                  Define methods
                  Call methods




    Ver. 1.0                       Session 4                     Slide 8 of 26
Object-Oriented Programming Using C#
Defining Methods


                Defining a method means declaring the elements of its
                structure.
                Consider the syntax of defining a method:
                <Access specifier> <Return Type> <Method
                Name>(Parameter List)
                {
                   Method Body
                }




     Ver. 1.0                      Session 4                       Slide 9 of 26
Object-Oriented Programming Using C#
Defining Methods (Contd.)


                The elements of the method declaration include the method
                name, the parameters list, the return type, and the method
                body.
                The following are the elements of a method:
                   Access specifier
                   Return type
                   Method name
                   Parameter list
                   Method body
                Let us understand each of the element of the method
                declaration.




     Ver. 1.0                         Session 4                    Slide 10 of 26
Object-Oriented Programming Using C#
Defining Methods (Contd.)


                Defining a method means declaring the
                                                 This determines the
                elements of its structure.       extent to which a
                Consider the syntax of defining avariable or method
                method:                          can be accessed
                <Access specifier> <Return Type> from another class.
                   <Method Name>(Parameter List)
                   {
                     Method Body
                   }




     Ver. 1.0                     Session 4                 Slide 11 of 26
Object-Oriented Programming Using C#
Defining Methods (Contd.)


                                                 A method can return
                Defining a method means declaring the
                elements of its structure.       a value of any type.
                Consider the syntax of defining aIf the method is not
                method:                          returning any value,
                <Access specifier> <Return Type> use void as the
                  <Method Name>(Parameter List) return type.
                   {
                       Method Body
                   }




     Ver. 1.0                        Session 4               Slide 12 of 26
Object-Oriented Programming Using C#
Defining Methods (Contd.)


                Defining a method means declaring the     This is a unique
                elements of its structure.                identifier and is
                Consider the syntax of defining a method: case-sensitive.
                 <Access specifier> <Return Type>         The method name
                   <Method Name>(Parameter List)          cannot be the
                   {                                      same as the
                     Method Body
                                                          variable name or
                                                          any other
                   }
                                                          non-method item
                                                          declared in the
                                                          class.




     Ver. 1.0                     Session 4                       Slide 13 of 26
Object-Oriented Programming Using C#
Defining Methods (Contd.)


                Defining a method means declaring the     This is used to
                elements of its structure.                pass and receive
                Consider the syntax of defining a method: the data from a
                 <Access specifier> <Return Type> method. It is
                   <Method Name>(Parameter List)          enclosed between
                   {                                      parentheses. The
                     Method Body
                                                          parentheses are
                                                          included even if
                   }
                                                          there are no
                                                          parameters.




     Ver. 1.0                     Session 4                       Slide 14 of 26
Object-Oriented Programming Using C#
Defining Methods (Contd.)


                Defining a method means declaring the   This contains the
                elements of its structure.              set of instructions
                Consider the syntax of defining a       needed to complete
                method:                                 the required activity.
                <Access specifier> <Return Type>
                  <Method Name>(Parameter List)
                  {
                    Method Body
                  }




     Ver. 1.0                     Session 4                        Slide 15 of 26
Object-Oriented Programming Using C#
Calling Methods


                After defining the method, you can execute it by calling it.
                You can call a method by using the name of the method.
                The method name is followed by parentheses even if the
                method call has no parameters, as shown in the following
                example:
                 MethodName();




     Ver. 1.0                       Session 4                          Slide 16 of 26
Object-Oriented Programming Using C#
Calling Methods (Contd.)


                The following is an example of calling methods:
                 using System;
                 class Calculator
                 {
                   public int AddNumber(int num1, int num2)
                     {
                       int result;
                       result = num1 + num2;
                       return result;
                     }
                   static void Main(string[] args)




     Ver. 1.0                      Session 4                      Slide 17 of 26
Object-Oriented Programming Using C#
Calling Methods (Contd.)


                    {
                        Calculator cal = new Calculator();
                        // The following statement is calling the
                        // AddNumber method and passing 10 and
                        // 20 as the parameter list.
                        int value=cal.AddNumber(10, 20);
                        Console.WriteLine("The result is
                        {0}", value);
                        Console.ReadLine();
                    }
                }




     Ver. 1.0                       Session 4                  Slide 18 of 26
Object-Oriented Programming Using C#
Using Methods with Parameters


                Methods can also be declared with parameters. Consider
                the example of declared a method with parameters:
                void DisplayResult (int result)
                {
                   //…..
                }
                When the methods are declared with parameters, they
                should be called with parameters. The methods with
                parameters are called by passing the value using the
                following mechanism:
                   Value
                   Reference
                   Output



     Ver. 1.0                     Session 4                       Slide 19 of 26
Object-Oriented Programming Using C#
Using Methods with Parameters (Contd.)


                • Value: The parameters passed by value creates a separate
                  copy in the memory. The following example shows the
                  parameters passed by value:
                   void CalculateSum( int num1, int num2)
                   {
                      //…
                   }
                   void Accept()
                   {
                      int val1=10;
                      int val2=2;
                      CalculateSum(val1,val2);
                   }



     Ver. 1.0                        Session 4                     Slide 20 of 26
Object-Oriented Programming Using C#
Using Methods with Parameters (Contd.)


                • Reference: The parameters passed by reference does not
                  creates a separate copy of the variable in the memory. A
                  reference parameter stores the memory address of the data
                  member passed. The following example shows the
                  parameters passed by reference:
                   void CalculateSum( ref int num1,ref int num2)
                   {
                     //…
                   }
                   void Accept()
                   {
                     int val1=10;
                     int val2=2;
                     CalculateSum( ref val1,ref val2);
                   }
     Ver. 1.0                        Session 4                      Slide 21 of 26
Object-Oriented Programming Using C#
Using Methods with Parameters (Contd.)


                • Output: The output parameters are used to pass the value
                  out of the method. The following example shows the
                  parameters passed by reference:
                   void CalculateSum( ref int num1,ref int num2, out
                   int result)
                   {
                      result=num1+num2;
                   }
                   void Accept()
                   {
                      int val1=10;
                      int val2=2;
                      int recieveVal;
                      CalculateSum( ref val1,ref val2,out
                   recieveVal);
                   }
     Ver. 1.0                        Session 4                      Slide 22 of 26
Object-Oriented Programming Using C#
Demo: Swapping Two Numbers by Using Methods with Parameters


               Problem Statement:
                  Write a program to swap two numbers by using reference type
                  parameters in a method.




    Ver. 1.0                       Session 4                         Slide 23 of 26
Object-Oriented Programming Using C#
Summary


               In this session, you learned that:
                  Abstraction is the process of reducing information content in
                  order to retain only the relevant information for a particular
                  purpose.
                  Encapsulation is the process of hiding all the details of an
                  object that do not contribute to its essential characteristics.
                  An access specifier is used to determine whether any other
                  class or function can access the member variables and
                  functions of a particular class.
                  The public access specifier allows a class to expose its
                  member variables and member functions to other functions
                  and objects.
                  The private access specifier allows a class to hide its member
                  variables and member functions from other class functions and
                  objects.


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


               The protected access specifier allows a class to hide its
               member variables and member functions from other class
               objects and functions, just like the private access specifier
               while implementing inheritance.
               A method is a set of one or more program statements that can
               be executed by referring to the method name.
               Defining a method means declaring the elements of its
               structure.
               The access modifiers that can be used with methods are
               public, protected, internal, protected internal, and private.
               Parameters allow information to be passed into and out of a
               method. When you define a method, you can include a list of
               parameters in parentheses.




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


                 Parameters can be passed by using any one of the following
                 parameters types:
                   • Value
                   • Reference
                   • Output
               – Pass by value is the default mechanism for passing
                 parameters in C#.
               – A reference parameter is a reference to a memory location of a
                 data member.
               – Output parameters are like reference parameters, except that
                 they transfer data out of the method rather than into it.
               – The return statement is used to return the control to the caller.




    Ver. 1.0                        Session 4                            Slide 26 of 26

Contenu connexe

Tendances

13 iec t1_s1_oo_ps_session_19
13 iec t1_s1_oo_ps_session_1913 iec t1_s1_oo_ps_session_19
13 iec t1_s1_oo_ps_session_19Niit Care
 
Oop04 6
Oop04 6Oop04 6
Oop04 6schwaa
 
Aae oop xp_07
Aae oop xp_07Aae oop xp_07
Aae oop xp_07Niit Care
 
Oop02 6
Oop02 6Oop02 6
Oop02 6schwaa
 
Ekeko Technology Showdown at SoTeSoLa 2012
Ekeko Technology Showdown at SoTeSoLa 2012Ekeko Technology Showdown at SoTeSoLa 2012
Ekeko Technology Showdown at SoTeSoLa 2012Coen De Roover
 
A Recommender System for Refining Ekeko/X Transformation
A Recommender System for Refining Ekeko/X TransformationA Recommender System for Refining Ekeko/X Transformation
A Recommender System for Refining Ekeko/X TransformationCoen De Roover
 
The SOUL Tool Suite for Querying Programs in Symbiosis with Eclipse
The SOUL Tool Suite for Querying Programs in Symbiosis with EclipseThe SOUL Tool Suite for Querying Programs in Symbiosis with Eclipse
The SOUL Tool Suite for Querying Programs in Symbiosis with EclipseCoen De Roover
 
Detecting aspect-specific code smells using Ekeko for AspectJ
Detecting aspect-specific code smells using Ekeko for AspectJDetecting aspect-specific code smells using Ekeko for AspectJ
Detecting aspect-specific code smells using Ekeko for AspectJCoen De Roover
 
A Logic Meta-Programming Foundation for Example-Driven Pattern Detection in O...
A Logic Meta-Programming Foundation for Example-Driven Pattern Detection in O...A Logic Meta-Programming Foundation for Example-Driven Pattern Detection in O...
A Logic Meta-Programming Foundation for Example-Driven Pattern Detection in O...Coen De Roover
 
Chapter 2 basic element of programming
Chapter 2 basic element of programming Chapter 2 basic element of programming
Chapter 2 basic element of programming Zul Aiman
 
Java - Generic programming
Java - Generic programmingJava - Generic programming
Java - Generic programmingRiccardo Cardin
 
I assignmnt(oops)
I assignmnt(oops)I assignmnt(oops)
I assignmnt(oops)Jay Patel
 
A (too) Short Introduction to Scala
A (too) Short Introduction to ScalaA (too) Short Introduction to Scala
A (too) Short Introduction to ScalaRiccardo Cardin
 
C programming session 08
C programming session 08C programming session 08
C programming session 08AjayBahoriya
 
Evolution of Patterns
Evolution of PatternsEvolution of Patterns
Evolution of PatternsChris Eargle
 

Tendances (20)

13 iec t1_s1_oo_ps_session_19
13 iec t1_s1_oo_ps_session_1913 iec t1_s1_oo_ps_session_19
13 iec t1_s1_oo_ps_session_19
 
Oop04 6
Oop04 6Oop04 6
Oop04 6
 
How To Code in C#
How To Code in C#How To Code in C#
How To Code in C#
 
Aae oop xp_07
Aae oop xp_07Aae oop xp_07
Aae oop xp_07
 
Oop02 6
Oop02 6Oop02 6
Oop02 6
 
Qno 2 (a)
Qno 2 (a)Qno 2 (a)
Qno 2 (a)
 
Ekeko Technology Showdown at SoTeSoLa 2012
Ekeko Technology Showdown at SoTeSoLa 2012Ekeko Technology Showdown at SoTeSoLa 2012
Ekeko Technology Showdown at SoTeSoLa 2012
 
Chap 2 c++
Chap 2 c++Chap 2 c++
Chap 2 c++
 
A Recommender System for Refining Ekeko/X Transformation
A Recommender System for Refining Ekeko/X TransformationA Recommender System for Refining Ekeko/X Transformation
A Recommender System for Refining Ekeko/X Transformation
 
The SOUL Tool Suite for Querying Programs in Symbiosis with Eclipse
The SOUL Tool Suite for Querying Programs in Symbiosis with EclipseThe SOUL Tool Suite for Querying Programs in Symbiosis with Eclipse
The SOUL Tool Suite for Querying Programs in Symbiosis with Eclipse
 
Detecting aspect-specific code smells using Ekeko for AspectJ
Detecting aspect-specific code smells using Ekeko for AspectJDetecting aspect-specific code smells using Ekeko for AspectJ
Detecting aspect-specific code smells using Ekeko for AspectJ
 
A Logic Meta-Programming Foundation for Example-Driven Pattern Detection in O...
A Logic Meta-Programming Foundation for Example-Driven Pattern Detection in O...A Logic Meta-Programming Foundation for Example-Driven Pattern Detection in O...
A Logic Meta-Programming Foundation for Example-Driven Pattern Detection in O...
 
Chapter 2 basic element of programming
Chapter 2 basic element of programming Chapter 2 basic element of programming
Chapter 2 basic element of programming
 
Java - Generic programming
Java - Generic programmingJava - Generic programming
Java - Generic programming
 
Oops
OopsOops
Oops
 
I assignmnt(oops)
I assignmnt(oops)I assignmnt(oops)
I assignmnt(oops)
 
A (too) Short Introduction to Scala
A (too) Short Introduction to ScalaA (too) Short Introduction to Scala
A (too) Short Introduction to Scala
 
C programming session 08
C programming session 08C programming session 08
C programming session 08
 
Chapter 2 c#
Chapter 2 c#Chapter 2 c#
Chapter 2 c#
 
Evolution of Patterns
Evolution of PatternsEvolution of Patterns
Evolution of Patterns
 

En vedette

09 iec t1_s1_oo_ps_session_13
09 iec t1_s1_oo_ps_session_1309 iec t1_s1_oo_ps_session_13
09 iec t1_s1_oo_ps_session_13Niit Care
 
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_02Pooja Gupta
 
01 iec t1_s1_oo_ps_session_01
01 iec t1_s1_oo_ps_session_0101 iec t1_s1_oo_ps_session_01
01 iec t1_s1_oo_ps_session_01Niit Care
 
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_02Niit Care
 
C# Advanced L04-Threading
C# Advanced L04-ThreadingC# Advanced L04-Threading
C# Advanced L04-ThreadingMohammad Shaker
 
Intro To .Net Threads
Intro To .Net ThreadsIntro To .Net Threads
Intro To .Net Threadsrchakra
 
Threading in c#
Threading in c#Threading in c#
Threading in c#gohsiauken
 

En vedette (9)

09 iec t1_s1_oo_ps_session_13
09 iec t1_s1_oo_ps_session_1309 iec t1_s1_oo_ps_session_13
09 iec t1_s1_oo_ps_session_13
 
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
 
01 iec t1_s1_oo_ps_session_01
01 iec t1_s1_oo_ps_session_0101 iec t1_s1_oo_ps_session_01
01 iec t1_s1_oo_ps_session_01
 
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
 
C# Advanced L04-Threading
C# Advanced L04-ThreadingC# Advanced L04-Threading
C# Advanced L04-Threading
 
Threads c sharp
Threads c sharpThreads c sharp
Threads c sharp
 
Intro To .Net Threads
Intro To .Net ThreadsIntro To .Net Threads
Intro To .Net Threads
 
Threading in C#
Threading in C#Threading in C#
Threading in C#
 
Threading in c#
Threading in c#Threading in c#
Threading in c#
 

Similaire à 03 iec t1_s1_oo_ps_session_04

Learn C# Programming - Encapsulation & Methods
Learn C# Programming - Encapsulation & MethodsLearn C# Programming - Encapsulation & Methods
Learn C# Programming - Encapsulation & MethodsEng Teong Cheah
 
Ap Power Point Chpt4
Ap Power Point Chpt4Ap Power Point Chpt4
Ap Power Point Chpt4dplunkett
 
C++ classes tutorials
C++ classes tutorialsC++ classes tutorials
C++ classes tutorialsakreyi
 
Evolution of c# - by K.Jegan
Evolution of c# - by K.JeganEvolution of c# - by K.Jegan
Evolution of c# - by K.Jegantalenttransform
 
C Sharp: Basic to Intermediate Part 01
C Sharp: Basic to Intermediate Part 01C Sharp: Basic to Intermediate Part 01
C Sharp: Basic to Intermediate Part 01Zafor Iqbal
 
Application package
Application packageApplication package
Application packageJAYAARC
 
Vb net xp_04
Vb net xp_04Vb net xp_04
Vb net xp_04Niit Care
 
Object oriented basics
Object oriented basicsObject oriented basics
Object oriented basicsvamshimahi
 
OOP interview questions & answers.
OOP interview questions & answers.OOP interview questions & answers.
OOP interview questions & answers.Questpond
 
Introduction to objective c
Introduction to objective cIntroduction to objective c
Introduction to objective cSunny Shaikh
 
Microsoft Dynamics AX 2012 - Development Introduction Training - Part 3/3
Microsoft Dynamics AX 2012 - Development Introduction Training - Part 3/3Microsoft Dynamics AX 2012 - Development Introduction Training - Part 3/3
Microsoft Dynamics AX 2012 - Development Introduction Training - Part 3/3Fabio Filardi
 
CJP Unit-1 contd.pptx
CJP Unit-1 contd.pptxCJP Unit-1 contd.pptx
CJP Unit-1 contd.pptxRAJASEKHARV10
 
Oops abap fundamental
Oops abap fundamentalOops abap fundamental
Oops abap fundamentalbiswajit2015
 

Similaire à 03 iec t1_s1_oo_ps_session_04 (20)

Learn C# Programming - Encapsulation & Methods
Learn C# Programming - Encapsulation & MethodsLearn C# Programming - Encapsulation & Methods
Learn C# Programming - Encapsulation & Methods
 
7494605
74946057494605
7494605
 
201005 accelerometer and core Location
201005 accelerometer and core Location201005 accelerometer and core Location
201005 accelerometer and core Location
 
Ap Power Point Chpt4
Ap Power Point Chpt4Ap Power Point Chpt4
Ap Power Point Chpt4
 
C++ classes tutorials
C++ classes tutorialsC++ classes tutorials
C++ classes tutorials
 
Evolution of c# - by K.Jegan
Evolution of c# - by K.JeganEvolution of c# - by K.Jegan
Evolution of c# - by K.Jegan
 
C# classes objects
C#  classes objectsC#  classes objects
C# classes objects
 
C Sharp: Basic to Intermediate Part 01
C Sharp: Basic to Intermediate Part 01C Sharp: Basic to Intermediate Part 01
C Sharp: Basic to Intermediate Part 01
 
Application package
Application packageApplication package
Application package
 
Vb net xp_04
Vb net xp_04Vb net xp_04
Vb net xp_04
 
Objects and Types C#
Objects and Types C#Objects and Types C#
Objects and Types C#
 
Object oriented basics
Object oriented basicsObject oriented basics
Object oriented basics
 
OOP interview questions & answers.
OOP interview questions & answers.OOP interview questions & answers.
OOP interview questions & answers.
 
Methods in C#
Methods in C#Methods in C#
Methods in C#
 
Question bank unit i
Question bank unit iQuestion bank unit i
Question bank unit i
 
Introduction to objective c
Introduction to objective cIntroduction to objective c
Introduction to objective c
 
Microsoft Dynamics AX 2012 - Development Introduction Training - Part 3/3
Microsoft Dynamics AX 2012 - Development Introduction Training - Part 3/3Microsoft Dynamics AX 2012 - Development Introduction Training - Part 3/3
Microsoft Dynamics AX 2012 - Development Introduction Training - Part 3/3
 
CJP Unit-1 contd.pptx
CJP Unit-1 contd.pptxCJP Unit-1 contd.pptx
CJP Unit-1 contd.pptx
 
Oops abap fundamental
Oops abap fundamentalOops abap fundamental
Oops abap fundamental
 
Introduction to C++
Introduction to C++Introduction to C++
Introduction to C++
 

Plus de 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
 

Dernier

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 

Dernier (20)

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 

03 iec t1_s1_oo_ps_session_04

  • 1. Object-Oriented Programming Using C# Objectives In this session, you will learn to: Define abstraction and encapsulation Implement encapsulation by using access specifiers Use methods Ver. 1.0 Session 4 Slide 1 of 26
  • 2. Object-Oriented Programming Using C# Introducing Abstraction and Encapsulation Abstraction and encapsulation are important features of any object-oriented programming language. Abstraction involves extracting only the relevant information. Encapsulation involves packaging one or more components together. Ver. 1.0 Session 4 Slide 2 of 26
  • 3. Object-Oriented Programming Using C# Defining Abstraction An automobile salesperson is aware that different people have different preferences. Some people are interested in the speed of a car, some in its price, some in the engine, and the some in its style. Although all of them want to buy a car, each of them is interested in a specific attribute or feature. The salesman knows all the details of a car, but he presents only the relevant information to a potential customer. As a result, a the salesman practices abstraction and presents only relevant details to customer. Ver. 1.0 Session 4 Slide 3 of 26
  • 4. Object-Oriented Programming Using C# Defining Encapsulation Encapsulation literally means ‘to enclose in or as if in a capsule’. Encapsulation is defined as the process of enclosing one or more items within a physical or logical package. It involves preventing access to nonessential details. Ver. 1.0 Session 4 Slide 4 of 26
  • 5. Object-Oriented Programming Using C# Implementing Encapsulation by Using Access Specifiers An access specifier defines the scope of a class member. A class member refers to the variables and functions in a class. A program can have one or more classes. You may want some members of a class to be accessible to other classes. But, you may not want some other members of the class to be accessible outside the class. Ver. 1.0 Session 4 Slide 5 of 26
  • 6. Object-Oriented Programming Using C# Types of Access Specifiers C# supports the following access specifiers: public private protected internal protected internal Ver. 1.0 Session 4 Slide 6 of 26
  • 7. Object-Oriented Programming Using C# Demo: Calculating Area and Volume by Using Access Specifiers Problem Statement: Write a program to calculate the area of a rectangle and a square. Ver. 1.0 Session 4 Slide 7 of 26
  • 8. Object-Oriented Programming Using C# Using Methods A method is a set of one or more program statements, which can be executed by referring to the method name. To use methods, you need to: Define methods Call methods Ver. 1.0 Session 4 Slide 8 of 26
  • 9. Object-Oriented Programming Using C# Defining Methods Defining a method means declaring the elements of its structure. Consider the syntax of defining a method: <Access specifier> <Return Type> <Method Name>(Parameter List) { Method Body } Ver. 1.0 Session 4 Slide 9 of 26
  • 10. Object-Oriented Programming Using C# Defining Methods (Contd.) The elements of the method declaration include the method name, the parameters list, the return type, and the method body. The following are the elements of a method: Access specifier Return type Method name Parameter list Method body Let us understand each of the element of the method declaration. Ver. 1.0 Session 4 Slide 10 of 26
  • 11. Object-Oriented Programming Using C# Defining Methods (Contd.) Defining a method means declaring the This determines the elements of its structure. extent to which a Consider the syntax of defining avariable or method method: can be accessed <Access specifier> <Return Type> from another class. <Method Name>(Parameter List) { Method Body } Ver. 1.0 Session 4 Slide 11 of 26
  • 12. Object-Oriented Programming Using C# Defining Methods (Contd.) A method can return Defining a method means declaring the elements of its structure. a value of any type. Consider the syntax of defining aIf the method is not method: returning any value, <Access specifier> <Return Type> use void as the <Method Name>(Parameter List) return type. { Method Body } Ver. 1.0 Session 4 Slide 12 of 26
  • 13. Object-Oriented Programming Using C# Defining Methods (Contd.) Defining a method means declaring the This is a unique elements of its structure. identifier and is Consider the syntax of defining a method: case-sensitive. <Access specifier> <Return Type> The method name <Method Name>(Parameter List) cannot be the { same as the Method Body variable name or any other } non-method item declared in the class. Ver. 1.0 Session 4 Slide 13 of 26
  • 14. Object-Oriented Programming Using C# Defining Methods (Contd.) Defining a method means declaring the This is used to elements of its structure. pass and receive Consider the syntax of defining a method: the data from a <Access specifier> <Return Type> method. It is <Method Name>(Parameter List) enclosed between { parentheses. The Method Body parentheses are included even if } there are no parameters. Ver. 1.0 Session 4 Slide 14 of 26
  • 15. Object-Oriented Programming Using C# Defining Methods (Contd.) Defining a method means declaring the This contains the elements of its structure. set of instructions Consider the syntax of defining a needed to complete method: the required activity. <Access specifier> <Return Type> <Method Name>(Parameter List) { Method Body } Ver. 1.0 Session 4 Slide 15 of 26
  • 16. Object-Oriented Programming Using C# Calling Methods After defining the method, you can execute it by calling it. You can call a method by using the name of the method. The method name is followed by parentheses even if the method call has no parameters, as shown in the following example: MethodName(); Ver. 1.0 Session 4 Slide 16 of 26
  • 17. Object-Oriented Programming Using C# Calling Methods (Contd.) The following is an example of calling methods: using System; class Calculator { public int AddNumber(int num1, int num2) { int result; result = num1 + num2; return result; } static void Main(string[] args) Ver. 1.0 Session 4 Slide 17 of 26
  • 18. Object-Oriented Programming Using C# Calling Methods (Contd.) { Calculator cal = new Calculator(); // The following statement is calling the // AddNumber method and passing 10 and // 20 as the parameter list. int value=cal.AddNumber(10, 20); Console.WriteLine("The result is {0}", value); Console.ReadLine(); } } Ver. 1.0 Session 4 Slide 18 of 26
  • 19. Object-Oriented Programming Using C# Using Methods with Parameters Methods can also be declared with parameters. Consider the example of declared a method with parameters: void DisplayResult (int result) { //….. } When the methods are declared with parameters, they should be called with parameters. The methods with parameters are called by passing the value using the following mechanism: Value Reference Output Ver. 1.0 Session 4 Slide 19 of 26
  • 20. Object-Oriented Programming Using C# Using Methods with Parameters (Contd.) • Value: The parameters passed by value creates a separate copy in the memory. The following example shows the parameters passed by value: void CalculateSum( int num1, int num2) { //… } void Accept() { int val1=10; int val2=2; CalculateSum(val1,val2); } Ver. 1.0 Session 4 Slide 20 of 26
  • 21. Object-Oriented Programming Using C# Using Methods with Parameters (Contd.) • Reference: The parameters passed by reference does not creates a separate copy of the variable in the memory. A reference parameter stores the memory address of the data member passed. The following example shows the parameters passed by reference: void CalculateSum( ref int num1,ref int num2) { //… } void Accept() { int val1=10; int val2=2; CalculateSum( ref val1,ref val2); } Ver. 1.0 Session 4 Slide 21 of 26
  • 22. Object-Oriented Programming Using C# Using Methods with Parameters (Contd.) • Output: The output parameters are used to pass the value out of the method. The following example shows the parameters passed by reference: void CalculateSum( ref int num1,ref int num2, out int result) { result=num1+num2; } void Accept() { int val1=10; int val2=2; int recieveVal; CalculateSum( ref val1,ref val2,out recieveVal); } Ver. 1.0 Session 4 Slide 22 of 26
  • 23. Object-Oriented Programming Using C# Demo: Swapping Two Numbers by Using Methods with Parameters Problem Statement: Write a program to swap two numbers by using reference type parameters in a method. Ver. 1.0 Session 4 Slide 23 of 26
  • 24. Object-Oriented Programming Using C# Summary In this session, you learned that: Abstraction is the process of reducing information content in order to retain only the relevant information for a particular purpose. Encapsulation is the process of hiding all the details of an object that do not contribute to its essential characteristics. An access specifier is used to determine whether any other class or function can access the member variables and functions of a particular class. The public access specifier allows a class to expose its member variables and member functions to other functions and objects. The private access specifier allows a class to hide its member variables and member functions from other class functions and objects. Ver. 1.0 Session 4 Slide 24 of 26
  • 25. Object-Oriented Programming Using C# Summary (Contd.) The protected access specifier allows a class to hide its member variables and member functions from other class objects and functions, just like the private access specifier while implementing inheritance. A method is a set of one or more program statements that can be executed by referring to the method name. Defining a method means declaring the elements of its structure. The access modifiers that can be used with methods are public, protected, internal, protected internal, and private. Parameters allow information to be passed into and out of a method. When you define a method, you can include a list of parameters in parentheses. Ver. 1.0 Session 4 Slide 25 of 26
  • 26. Object-Oriented Programming Using C# Summary (Contd.) Parameters can be passed by using any one of the following parameters types: • Value • Reference • Output – Pass by value is the default mechanism for passing parameters in C#. – A reference parameter is a reference to a memory location of a data member. – Output parameters are like reference parameters, except that they transfer data out of the method rather than into it. – The return statement is used to return the control to the caller. Ver. 1.0 Session 4 Slide 26 of 26

Notes de l'éditeur

  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. 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.
  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 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.
  12. 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.
  13. 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.
  14. 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.
  15. 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.
  16. 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.
  17. 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.
  18. 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.
  19. 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.
  20. 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.
  21. 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.
  22. 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.
  23. 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.
  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.
  26. 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.