GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.

Slides:



Advertisements
Similar presentations
Object Oriented Programming
Advertisements

Understand and appreciate Object Oriented Programming (OOP) Objects are self-contained modules or subroutines that contain data as well as the functions.
Agenda Definitions Evolution of Programming Languages and Personal Computers The C Language.
1 OBJECT-ORIENTED CONCEPTS. 2 What is an object?  An object is a software entity that mirrors the real world in some way.  A software object in OOP.
Classes & Objects Computer Science I Last updated 9/30/10.
Software Engineering and Design Principles Chapter 1.
Computers: Tools for an Information Age
Chapter 1 Principles of Programming and Software Engineering.
Visual Basic Introduction IDS 306 from Shelly, Cashman & Repede Microsoft Visual Basic 5: Complete Concepts and Techniques.
1 Introduction to C++ Programming Concept Basic C++ C++ Extension from C.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
Chapter 1 Program Design
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
INTRODUCTION TO JAVA PROGRAMMING Chapter 1. What is Computer Programming?
C++ fundamentals.
OBJECT ORIENTED PROGRAMMING IN C++ LECTURE
Object Oriented Programming
COMPUTER PROGRAMMING. Introduction to C++ History Merges notions from Smalltalk and notions from C The class concept was borrowed from Simular67 Developed.
Programming Languages – Coding schemes used to write both systems and application software A programming language is an abstraction mechanism. It enables.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
OOP- OBJECT OBJECT PROGRAMMING By KRATI SHARMA 02 XI-B ✏✏✏✏ ☺☻☺☻☺☻☺ ✏✏✏✏
Object Oriented Programming Development
Microsoft Visual Basic 2005: Reloaded Second Edition
Introduction to Object-oriented programming and software development Lecture 1.
Welcome to OBJECT ORIENTED PROGRAMMIN Date: 10/09/2014 Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
O BJECT O RIENTATION F UNDAMENTALS Prepared by: Gunjan Chhabra.
UNIVERSITI TENAGA NASIONAL “Generates Professionals” CHAPTER 4 : Part 2 INTRODUCTION TO SOFTWARE DEVELOPMENT: PROGRAMMING & LANGUAGES.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Computer Concepts 2014 Chapter 12 Computer Programming.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
 Programming Language  Object Oriented Programming  JAVA – An Introduction  JAVA Milestones  JAVA Features.
Principles of Software Development 1 Principles Of Software Design and Development Types of language / Choosing a language.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
MADE BY :-- SHAHNAWAZ KHAN RAVINDER SINGH ABHIJEET AUGSTINE MADE BY :-- SHAHNAWAZ KHAN RAVINDER SINGH ABHIJEET AUGSTINE PRESENTATIONONC++PRESENTATIONONC++
Learners Support Publications Object Oriented Programming.
Programming Paradigms Lecturer Hamza Azeem. What is PP ? Revision of Programming concepts learned in CPLB Learning how to perform “Object-Oriented Programming”
1.
9-Dec Dec-15  INTRODUCTION.  FEATURES OF OOP.  ORGANIZATION OF DATA & FUNCTION IN OOP.  OOP’S DESIGN.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science)
Introduction to OOP CPS235: Introduction.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
Chapter 2 Principles of Programming and Software Engineering.
Skill Area 311 Part B. Lecture Overview Assembly Code Assembler Format of Assembly Code Advantages Assembly Code Disadvantages Assembly Code High-Level.
 Description of Inheritance  Base Class Object  Subclass, Subtype, and Substitutability  Forms of Inheritance  Modifiers and Inheritance  The Benefits.
Structure A Data structure is a collection of variable which can be same or different types. You can refer to a structure as a single variable, and to.
Software Design and Development Languages and Environments Computing Science.
Welcome to OBJECT ORIENTED PROGRAMMING Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
High-level language programming paradigms. Programming languages come in many forms or 'paradigms'. Each form of language offers advantages over other.
Introduction to computer software. Programming the computer Program, is a sequence of instructions, written to perform a specified task on a computer.
Principles of Programming & Software Engineering
Programming paradigms
Visit for more Learning Resources
Object Oriented Programming
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING
Concepts of Object Oriented Programming
CHAPTER 5 GENERAL OOP CONCEPTS.
GENERAL OOPs CONCEPTS.
Objectives State the reasons for the complexity involved in the development of software Define the following terms Objects Classes Messages Methods Explain.
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
Computer Programming.
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
PROGRAMMING PARADIGMS
Introduction to Object-Oriented Programming
Presentation transcript:

GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming more and more complex. In view of the increasing complexity of software system, the software industry and software engineer continuously look for new approaches to software design and development. The increased complexity had become the chief problem with computer programmers in traditional languages. Large programs, because of this complexity, are more prone to errors, and software error can be expensive and even life-threatening. The most adopted and popular programming approach, structured programming approach, failed to show the desired result in terms of bug free, easy to maintain and reusable programs. The latest programming approach, object-oriented programming (OOP), offers a new and powerful ways to cope with this complexity. Its goal is clearer, more reliable, more easily maintained programs. This introduces general OOP concepts that the traditional languages like C, Pascal, COBOL and BASIC lack in and the new generation languages.

EOVOLUTION OF SOFTWARE A program serves the purpose of commanding the computer. The efficiency and usefulness of a program depends not only on proper use of commands but also on the programming language it is written in. The two major types of programming languages: Low Level languages and High Level languages offer different features of programming. Low Level languages (i.e. machine language assembly language) are machine- oriented and require extensive knowledge of computer circuitry. Machine language, in which instructions are written in binary code (using 1and 0), is the only language the computer can execute directly. Assembly language, in which instructions are written using symbolic names for machine operations (e.g. read, add, store etc.)And operands, makes programming less tedious than machine language programming. However, assembly program is then converted into machine language using assembler software. High level languages, (hills) on the other hand, offer English like keywords, constructs for sequence, selections (decision) and iteration compared to low level languages. The programs written in hlls are converted into machine language using compiler or interpreter as a computer can work with machine language only.

(1) It should provide a vehicle for the programmer to specify Actions to be executed and (2) It should provide a set of concepts for the programmer to Use when thinking about what can be done. The first aspect ideally requires a language that is “close to the Machine”, so that all important aspects of a machine are handled simply and efficiently in a way that is reasonably obviously the programmer. The second aspect ideally requires language that is “close to the problem to be solved” so that the concepts of a solution can be expressed directly and concisely. The low level languages serve only the first aspect i.e., they are close to the machine and the high level languages serve only the second aspect i.e., they are close to the programmer. However, the languages ‘C’ and ‘C++’ serve both the aspects, hence can be called as ‘middle level languages’. A programming language should serve two related purposes:

Programming paradigms By paradigm one means a way of thinking or doing things Paradigms mean organizing principle of program. It is an approach to programming.

Procedural programming A program in a procedural language is a list of instruction where each statement tells the computer to do something. The focus is on the processing, the algorithm needed to perform the desired computation.

Modular programming With the increase in program size, a single list of instructions becomes unwieldy. Thus a large program is broken down into smaller units i.e., functions (sub programs). The idea of breaking a program into functions can further be extended by grouping a number of functions together into a larger entity called a module, but the principle is similar: grouping of components that carry out specific tasks.

Module A set of related procedure with the data they manipulate is called a module.

Object Object is an identifiable entity with some charities and behavior.

Basic concepts of oop 1.Data abstraction 2. Data encapsulation 3. Modularity 4. Inheritance 5. Polymorphism

Data abstraction Abstraction refers to the act of representing essential features without including the background details.

Encapsulation The wrapping up of data and operation/functions (that operate on the data) into a single unit (called class) is known as encapsulation.

Modularity Modularity is the property of a system that has been decomposed into a set of cohesive and loosely coupled modules.

Inheritance Inheritance is the capability of one class of things to inherit capabilities or properties from another class.

Polymorphism Polymorphism is the ability for a message or data to process in more than one form.

Advantages of OOP 1. It models the real world. 2. With OOP programs are easy to understand. 3. OOP facilities quick development as parallel development of classes is possible. 4. With OOP programs are easier to test manage and maintain.

Disadvantages of OOP 1. With OOP classes tend to overly generalized. 2. The relation among classes becomes artificial at times. 3. The OOP programs design is tricky. 4. Also one need to proper planning and proper design for OOP programming.

Unsolved question type: A Q1. What are the two major types of programming languages? Ans. The two major types of programming languages are: Low level language and High level language. Q2. How are programs written in 1? Machine language 2. Assembly language? Ans. Machine language in which instruction are written in binary code using 1and 0) is the only language the computer can execute directly. Assembly language in which instruction is written using symbolic names for machine language operations. Q3. Why are low level language considered close to the machine? Ans. The low level language serves only the first aspect i.e., they are close to the machine. Q4. Which two related purposes should be served by a programming language? Ans. A programming language should serve two related purposes: 1. It should provide a vehicle for the programmer to specify actions to be executed and 2. It should provide a set of concepts for the programmer to use when thinking about what can be done.

Q5. Why c++ called middle level language? Ans. C++ serves both the aspects, i.e. low level language serve the first aspect and high level language serve the second aspect. Q6. What do you understand by programming paradigm? Ans. Programming paradigm means organizing principle of a program. It is an approach to programming. Q7. What are the characteristics of procedural paradigm? Ans. In procedural paradigm the emphasis is on doing things. Data is after all the reason for a program existence. The important part of an inventory program is not a function that display or checks data; it is the inventory data itself. Yet data is given second class status while programming. Q8. What is a module? What is modular programming? What are its characteristics? Ans. A set of related procedure with the data they manipulate is called a module. Modular programming: A Modular programming is a programming in which a large program is broken down into smaller units i.e. functions (sub programs). Characteristics: In modular programming since many modules access the same data, the way the data is stored becomes artificial.

Q9. What is an object? What is a class? How is class different from object? Ans. Object is an identifiable entity with some characteristics and behavior. Class is a template/ blue print representing a group of objects that share some common properties and relationships. Object is an instance of class i.e. why class is different from object. Q10. What is meant by abstraction? Ans. Abstraction refers to the act of representing essential features without including the background details or explanations. Q11. What is modularity? Ans. Modularity is the property of a system that has been decomposed into a set of cohesive and loosely coupled modules. Q12. What is a base class? What is derived class? How are these two interrelated? Ans. A derived class is a class that inherits properties from some other class. A base class is a class whose properties are inherited by derived class. A derived class has nearly all the properties of base class but reverse of it is not true.

Unsolved question type: B Q1. What is polymorphism? Ans. Polymorphism is the ability for a message or data to be processed in more than one form. Q2. Write a short note on inheritance? Ans. Inheritance is the capability of a class to inherit properties from another class. Those classes that inherit from other class is subclass or derived class and the other class is a base class. Q3. Write a short note on modular programming? Ans. A modular programming is a programming in which a large program is broken down into smaller units i.e. functions (sub-programs). In modular programming since many modules or (functions) access the same data the way the data is stored becomes critical. The arrangement of the data cannot change without modifying all the functions that access it. Q4. What is the difference between class and an object? Ans. An object is an identifiable entity with some characteristics and behavior. It represents an entity that can store data and its associated functions. A class is a group of objects that share some common properties and relations. It represents a group of similar objects.

Q5. Write a short on procedural programming? Ans. A program in a procedural language is a list of instructions where each statement tells the computer to do something. The focus is on the processing the algorithm needed to perform the desired computation. In procedural programming the emphasis is on dong things. The important part of an inventory program isn’t a function that displays or checks data; it is the inventory data itself. Yet data is given second- class status while programming. Q6. Explain the transitive nature of inheritance? Anstey transitive nature of inheritance states that if a class A inherits properties from its base class B then all its subclasses will also be inheritating the properties of base class of an i.e. B. Q7. What is the benefit nature of inheritance? Ans. Suppose a class A inherits from class B. Classes C and D inherit from A. if there is a bug in B then correction is required only in B as it will be automatically reflected to all subclasses A,C and D if class B has been inherited without changes.