Understanding Object-Oriented Programming Concepts in C++
Exploring C++ Object-Oriented Programming concepts with Dr. Bhargavi Goswami from CHRIST Bangalore. Dive into software crisis management, syllabus recommendations, topic lists, and issues to address in system design and software development. Uncover facts, reports, and a discussion on the delivery challenges faced by the software industry. Discover the current status of US Defense projects and the conclusion drawn from software industry challenges and reasons.
Download Presentation
Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
E N D
Presentation Transcript
C++ OOPS CONCEPTS Dr. Bhargavi Goswami CHRIST Bangalore bhargavigoswami@gmail.com +91 9426669020
BOOKS Schildt Herbert, The Complete Reference C++, Tata McGraw Hill, Reprint, 2012. Deitel&Deitel, C++ How to program, Pearson Education Asia, 6th Edition, 2008. Bjarne Stroustrup, The C++ Programming Language, Special Edition, Pearson Education, 2010. M. T. Somashekara, D. S. Guru, Object- Oriented Programming with C++, 2ndEdition, PHI, 2012.
BEST SUITABLE TO SYLLABUS E Balagurusami, Object Oriented Programming with C++, McGraw Hill Education, 6thEdition, 2013. Syllabus includes: Chapter 1 to 11.
TOPIC LIST Software Evolution Procedure Oriented Programming Object Oriented Programming Objects Classes Abstraction Encapsulation Inheritance Polymorphism Dynamic Binding
SOFTWARE CRISIS Manage Schedule Real life problems Decrease S/w Cost Open Interface Software Quality & Productivity Reusability Tolerant to Updates
NEED TO ADDRESS ISSUES: How to represent real life entities of problems in system design? How to design a system with open interfaces? How to ensure reusability and extensibility of modules? How to develop modules that are tolerant to any changes in future? How to improve software productivity and decrease software cost? How to improve the quality of software? How to manage time schedules? How to industrialize the software development process?
SOME FACTS AND REPORTS 50% of software products, never delivered. 33% of delivered software are never used. 2% used without changes once delivered.
CONCLUSION Bad record of s/w industry in delivering products. Reason? 1. Changes in user requirements 2. Changes in Data Formats
US DEFENSE PROJECT STATUS 6 5 4 3 2 1 0 Paid but not received Delivered but not used Ababdoned, Not reworked Used after Changes Used as Delivered
HOW TO EVALUATE A SYSTEM (DEVELOPED SOFTWARE)? Correctness Maintainability Reusability Openness and Interoperability Portability Security Integrity User Friendliness
MAINTENANCE: EXPECTED CHANGES Efficiency 4% Other 3% Documentati on 6% H/w Changes 6% User Requiremen t 42% Routine Debugging 9% Emergency 12% Data Formats 18%
QUALITY ISSUES HOW TO EVALUATE A SYSTEM (DEVELOPED SOFTWARE)? Maintainability Correctness Interoperability Portability Reusability Security Integrity User Friendly
SOFTWARE EVALUATION Object Oriented Lang Procedure Oriented Lang Assembly Lang Machine Lang 1.0
PROCEDURAL / STRUCTURAL PROGRAMMING LANGUAGE Eg. COBOL, FORTRAN, C, etc Imp. Focus: Problem Solution: Provided with Functions and Procedures How: Hierarchical Decomposition Writes list of instructions / action / flowcharts But, we least concerned about data and its flow. Risk for global multi-procedural data. Not Secure Vulnerable to accidental modifications of data. Bugs may creep in Do not model real life problems well
STRUCTURE OF PROCEDURAL LANGAUGE Main Program Function 1 Function 2 Function 3 Function 4 Function 5 Function 6
CHARACTERISTICS Emphasis on Algorithm Divide and Rule (small program as function) Share global data Data movement is open in function Function transform data Top Down Approach
RELATIONSHIP OF DATA AND FUNCTION IN PROCEDURAL LANG Global Data Global Data Function 1 Function 2 Function 3 Local Data Local Data Local Data
OBJECT ORIENTED PROGRAMMING LANGUAGE Here, data is critical element Data does not flow freely in program Function Data coupling is tight Protection from accidental modifications Decomposition of problem into #objects / entries. These objects are using function built data. Functions of objects can communicate.
ORGANIZATION OF DATA & FUNCTION IN OOP Object A Object B Data Data Function Function Object C Function of objects Communicate. Data Function
CHARACTERISTICS Emphasis on Data Programs are divided into objects Data characterized by objects tied with functions Data is hidden Way of communication is through functions New Data and Functions can be created easily. Follow bottom up approach.
Data BASICS OF OOP Abstraction & Encapsulation Classes Objects Inheritance Dynamic Binding Message Passing Polymorphism
OBJECTS Basic Runtime Entities Customer, Account, Objects Bank balance is data. Balance sheet is a function. Object has data and code (function). See next fig.
DESIGN OF OOP Data: Name Birthday Marks Course Object Student Functions: Total Average Display
CLASSES Entire set of object s data and code can be defined as user defined data-type called class . Objects are variables of type class. Class is a collection of objects. Eg. Mango, apple, orange are objects of class Fruits .
DATA ABSTRACTION & ENCAPSULATION Wrapping of data and function into single class is Encapsulation . Data is secure once encapsulated in class. Functions connect class and object. Avoiding data access other than class is facilitating data hiding . Abstraction is representing essential features without including background information / explanation. Abstract information / attributes eg. Size, cost, length, etc. Abstraction is done using data members as they hold information. Classes are also called ADT: Abstract Data Types
INHERITANCE Bird: Feather Eggs Reusability Class features can be inherited to other classes Tailoring of features is also possible Non Flying Birds: Weight Flying Bird: Size of Wings Robin Swallow Penguin Kiwi
POLYMORPHISM Operation exhibit different behavior based on provided type of data. Eg. Add(num1,num2) does addition Add(str1,str2) does concatenation Obtained by operator or function overloading. Allow different internal structures to use same external interface Also used in implementing inheritance Done preferably using Function Overloading.
POLYMORPHISM Shape Draw (Circle) Draw (Box) Draw (Triangle)
DYNAMIC BINDING Also called Late binding Dynamically, draw a procedure that will take actions based on type of object provided. Same as figure, if circle is provided, draws circle.
MESSAGE PASSING A message for an object is a request for execution of a procedure and therefore will invoke function that generates result. Steps: Create Class (create members, functions) Create Objects Communication happens using functions to obtain desired results. Employee.salary(name) Object Message Information
BENEFITS OF OOP Greater productivity, better quality of s/w, less maintenance. Inheritance: Code Reusability and reduced redundancy Reuse of standard working modules, save time. Data Hiding: Secure Multiple instance of an object can co-exist Map Objects in problem domain Problem partition in project based objects
BENEFITS OF OOP Data center design, modeling of problem, solution implementation easy. Bottom Up Approach Encapsulates details Message passing system is very simple. Easy to manage s/w complexity Compatible with C Language.
LIMITATIONS Limited GUI Support Limited standard library Difficult to implement web applications Thread not supported
APPLICATIONS: C++/C# IS USED IN Real-time systems Simulations and Modeling Object oriented Databases Hypertext, hypermedia and expertext Artificial Intelligence Developing Expert Systems Neural networks and parallel programming Decision Support and Office Automation System CAD Systems Internet of Things Embedded Programming Compiler and Operating System development Developing new programming language
QUESTION? What do you think are the major issues facing the software industry? Explain Software Evolution. How are the data and functions are organized in OOP? List down unique advantages of OOP. List 20 real world objects. List down the advantages of inheritance. List applications of C++
DIFFERENTIATE Procedure oriented v/s Object Oriented Object v/s Class Data Abstraction v/s Data Encapsulation Inheritance v/s Polymorphism Dynamic binding v/s Message Passing
Explore more about the topic. THANK YOU. SEE YOU SOON.