Advertisement

Thursday, July 29, 2021

What is object oriented programming

 Object Oriented Programming normally known as OOP is a programming technique used to solve real world problems using programming. Before the use of Object Oriented Programming in linear programming approaches it was very difficult to solve real world problems using computer programming because in real world the objects has different characteristics that cannot be assigned in computer programming. For example a human has characteristics like name, age, gender, height, weight and also performs some functions like walking, talking, listening, running, thinking, loving, caring and sleeping so these functions cannot be performed well by traditional programming approaches. Object Oriented Programming divided characteristics in two parts attributes and behaviors. Attributes contains specific characteristics that object possess those differentiate one object from other object. like car name, model etc and behavior consists the functions of that object like car runs, stops etc. After classifying object into attributes and behaviors it is very easy to make classes of that entity. Hence in this way code can be reduced a lot and also can be reused again and again. The power of Object Oriented Programming is not only code reusability it has much powerful features like abstraction, encapsulation, inheritance, polymorphism. With these powerful features complex programming problems are solved easily. OOP reduces the complexities of procedural programming function calls and unwanted data access.

Friday, December 14, 2018

Introduction to Programming basics


Program

A well defined set of instructions given to the computer that tell the computer what to do and how to do or a set of instruction given to the computer to solve a problem.Computer follows the instructions given to it.A program is also called software any person who develops the computer program is called a programmer.If you are a good problem solver then you have the potential to become a good programmer.

Programming languages

Programming language is set words symbols and rules that are used for writing computer programs.Programming language is means of interaction between user and computer.Programming languages are used to write source code.The programming languages are also used to avoid machine code because machine code is very difficult to write understand debug and maintain so programming languages are very useful in this situation because computer only understand binary language '0' or '1'.We have to follow programming language syntax because it’s like grammar rules, semicolon comma and other symbols have special meanings.Before actually running code source code is converted into machine code so that computer can understand it and perform required task.

Types of Programming languages

  • Low-level languages
  • High-level languages

Low-level languages

Low-level languages are near to computer hardware but far from human languages.Low-level languages are further divided into following:
  • Machine language
  • Assembly language

Machine language

Machine language is programming language in which instructions are written in binary ('0' or '1') only.Machine language is directly understandable by the computer.A program written in machine language executes very fast because computer does not need any language translator to understand it.
Machine language is very difficult to learn and understand.

Assembly language

Assembly language is one step higher than machine language.In this  language machine instructions are replaced with English like words known as mnemonics.Writing and modifying programs in assembly is easier than machine language.Assembly language is used for writing system software.A language translator known as assembler is used for translating programs written in assembly into machine language.

High-level languages

High-level languages are near to human languages.The instructions written in High-level languages are similar to English language.High-level languages are easy to learn and understand that's why there are many programmers of high-level languages.Some examples of high level languages are C,C++,Java,Pascal,BASIC,COBOL,FORTRAN etc.