java- lecture-1:introduction



Introduction to Object-Oriented Programming (OOP)

 ·         Machine language   

 ·         Assembly language

·       Sub-routines and loop (Fortran)

·         Procedures and recursion (Algol, Pascal, C)

·         Modules (Modula-2, Ada)

·         Objects (Simula, Smalltalk, C++,Java)

Machine Languages

   ·         Comprised of 1s and 0s

    ·         The “native” language of a computer

    ·         Difficult to program – one misplaced 1 or 0 will cause the program to fail.

    ·         Example of code:

                     1110100010101     111010101110        

            10111010110100    10100011110111

Assembly Languages

    ·         Assembly languages are a step towards easier programming. 

    ·         Assembly languages are comprised of a set of elemental commands which are tied to a specific processor.

    ·         Assembly language code needs to be translated to machine language before the computer processes it.

    ·         Example: ADD  1001010, 1011010

High-Level Languages

   ·         High-level languages represent a giant leap towards easier programming. 

    ·         The syntax of HL languages is similar to English.  

    ·         Historically, we divide HL languages into two groups: 

        o    Procedural languages     

        o    Object-Oriented languages (OOP)

Procedural Languages

   ·         Early high-level languages are typically called procedural languages. 

    ·         Procedural languages are characterized by sequential sets of linear commands. The focus of such languages is on structure. 

    ·         Examples include C, COBOL, Fortran, LISP, Perl, HTML, VBScript

Object-Oriented Languages 

    ·         Most object-oriented languages are high-level languages. 

    ·         The focus of OOP languages is not on structure, but on modeling data. 

    ·         Programmers code using “blueprints” of data models called classes. 

    ·         Examples of OOP languages include C++, Visual Basic.NET and Java.

 

Difference between Procedural & Object Oriented Programming

     In procedural programming,  

  • program is divided into small parts called functions.
  • It  follows top down approach.
  • There is no access specifier here
  • Adding new data and function is not easy.
  • It  does not have any proper way for hiding data so it is less secure
  • Here function is more important than data.
  • Is based on unreal world.
  • Examples:  C, FORTRAN, Pascal,

    In object oriented programming

  • program is divided into small parts called objects.
  • It  follows bottom up approach.
  • It have access specifiers like private, public, protected etc.
  • Adding new data and function is easy.
  • It provides data hiding so it is more secure.
  • Here  data is more important than function.
  • Is based on real world.
  • Examples: C++, Java, Python, C# etc.

 

 

 Follow the following link: 

          https://youtu.be/02q38Wq3wUk

No comments:

Post a Comment