Thursday, January 15, 2015

OOP notes

Unit-1
1. Introduction to Object Oriented Paradigm (8 hrs)
  Object-oriented Programming as  a New Paradigm, A Way of Viewing the World-Agent, Computation as Simulation, Coping with Complexity: The Nonlinear Behavior of complexity: Abstraction Mechanism, reusable software, Object-Oriented Design: Responsibility Implies Noninterference, Programming in the small and programming in the large, Role of Behavior in OOP, Case study: Responsibility-Driven Design, CRC Cards, Components and Behavior, Software Components, Formalize the Interface, Design the Representation for Components, Implementing Components, Integration of Components, Maintenance and Evolution

Introduction to Object-Oriented Paradigm:
            Development process in software technology has been dynamic since its beginning as new tools and techniques are announced in quick succession. If we see the software evolution of computer, then we find that programming techniques began from machine language at first, then assembly language, then Procedure-oriented and finally object-oriented programming.
            So, object-oriented programming is the most recent concept in computer programming paradigms and it has been defined as “an approach that provides a way of modularizing programs by creating partitioned memory area for both data and functions that can be used as templates for creating copies of such modules on demand”.
OOP approach was invented to overcome the drawbacks of structural programming approach/ procedural oriented programming(POP). Unlike structural programming approach, it uses the bottom up programming approach. OOP treats data as  critical (very important) element in the program development and does not allow data to move freely around the program. OOP ties the data more closely to the function that operates on it and protects data from accidental modification from outside function. OOP allows decomposition of a program into a number of entities called objects and then builds data and functions around these objects. The data of an object can be accessed only by the function associated with that function. You can’t access the data directly. The data is hidden, so it is safe from accidental modification. Data and its functions are said to be encapsulated into a single entity. Data encapsulation, data hiding, inheritance and polymorphism  are key terms in the description of object-oriented languages.
Some main features of OOP are as follows:
i)             Emphasis is on data rather than procedures.
ii)           Programs are divided into objects.
iii)         Functions that operate on the data of an object are tied together in the data structure.
iv)         Data is hidden inside the object and cannot be accessed by external functions.
v)           Objects may communicate with each other through functions.
vi)         Supports inheritance, polymorphism and operator overloading.
vii)       New data and functions can be easily added whenever necessary.
viii)     Follows bottom-up approach in program design.
Languages that supports OOP paradigm are Simula, C++, Smalltalk, Ada, Java, C# etc.

Differences between OOP and Structured Programming
OOP is the most recent programming technique whereas Structured Programming is the earlier form of programming and it is also known as Procedural Oriented Programming (POP). The major differences between OOP and Structured Programming Languages are as follows:

OOP
POP
i) It is the most recent programming concept which uses the bottom-up approach.
i) It is the old programming concept that uses the top-down approach.

ii) Programs are divided into a number of entities called objects.
ii) Programs are divided into a number of functions.

iii) Emphasis is on data rather than on procedures.
iii) Emphasis is on procedures rather than on data.
iv) It does not allow data to move freely around the program from one object to another object.
iv) It allows data to move freely around the program from one function to another function.
v) Data is hidden inside the object and cannot be accessed by external functions due to encapsulation.
v) Data is open and can be freely accessed by all the programs as encapsulation is not possible.
vi) Problem is viewed as a real world entity.
vi) Problem is not viewed as a real world entity.
vii) It supports inheritance and polymorphism in programming.
vii) It does not support inheritance and polymorphism.
viii) OOP is written by using HLL such as C++, Java, SIMULA, Smalltalk et.
viii) POP is written by using HLL such as C, Pascal, FORTRAN et.






















Object-oriented programming as a new paradigm:
            The English word ‘paradigm’ is derived from the Latin word ‘paradigma’ which means ‘model’. So, in English too, paradigm means ‘any example or model’.          Due to its popularity, completeness and robustness, OOP is frequently referred to as a new programming paradigm in the world of comp uter programming.
Actually the word ‘paradigm’ was used for the first time in computer programming by Robert Floyd in his speech in 1979 ACM Turing Award lecture. A programming paradigm is a way of conceptualizing what it means to perform computation and how tasks to be carried out on a computer should be structured and organized.
The style of problem solving used in the object-oriented technique is quite similar to the method used to address problems in everyday life. Hence, OOP has been most popular and almost all the standard programs developed today are based on OOP.
OOP has been the new paradigm in computer programming field due to the following concepts/characteristics:
1.      Object:- Objects are the basic run time entities in an object-oriented system. They may represent a person, a place, a bank account, a table of data or any item that the program has to handle. In oop, programming problem is analyzed in terms of objects and the nature of communication between them.
2.      Classes:- An abstract description of the data and behavior of a collection of similar objects. Classes are user-defined data types and behave like the built-in data types of a programming language.
3.       Data abstraction and encapsulation:- The Data is encapsulated by the method, this mean that no one can deal with the data directly and the only thing that can work with the data is the method of the same class. So we deal with the data through the method. This is good because :
a.        no one can change the data value directly, this provides a significant level of protection against accidental modification or incorrect use.
b.      All the Member Data being local variable, this is easy to be maintained.
4.      Inheritance:- Inheritance is the process by which one object can acquire the properties of another object. This is important because it supports the concept of classification.
5.      Polymorphism:- Polymorphism allows one name to be used for several related but slightly different purposes. The purpose of polymorphism is to let one name be used to specify a general class of action. Depending upon what type of data it is dealing with, a specific instance of the general case is executed.
6.       Dynamic binding:- Binding refers to the linking of a procedure call to the code to be executed in response to the call and dynamic binding or late binding means that the code associated with a given procedure call is not known until the time of the call at run-time.
1.      Message passing:- A message for an object is a request for execution of a procedure. Message passing involves specifying the name of the object, the name of the function (message) and the information to be sent.


A Way of Viewing the World-Agent
Let us illustrate a real world situation which involve several agents of the community to accomplish a small task in our daily life. For example, an individual named Chris wishes to send flowers to his friend named Robin, who lives in another city. Due to far distance, Christ cannot pick the flower himself and take them to Robin. But it is a task that is easily solved with the following process:
1.      Chris simply walks to a nearby flower shop, run by a florist named Fred.
2.      Chris will tell Fred the kinds of flowers to send to Robin and the address to which they should be delivered and then, Chris can be assured that the flowers will be delivered.
3.      Fred contacts and requests the different agents of the society and ultimately handed over the flower as specified by Chris to Robin.
figure1.png
The community of agents in the flower delivery process
Agents and community
In the above figure, we can see that to fulfill the requirements of ‘Chris’, many agents such as ‘Fred’, ‘Wholesaler’, ‘ Grower’, ‘Gardener’, ‘Flower Arranger’ and ‘ Delivery Person’ of the community with their distinct roles and responsibility have been involved.
            So, in object-oriented programming too, a program is structured as a community of interacting agents called objects. Each object has a role to play. Each object provides a service or performs an action that is used by other members of the community.
Message and methods
            In the above example, we see that the different agents of the society, communicate with each other by passing some message. The chain reaction that ultimately resulted in the solution to Chris’s problem began with a request to the florist Fred. The request lead to other requests which lead to still more requests, until the required flower reached Chris’s friend Robin.
            So, in object-oriented programming too, any action is initiated by transmission of a message to an agent(an object) responsible for the action. The message encodes the request for an action and is accompanied by any additional information (argument) needed to carry out request. The receiver is the object to whom the message is sent. If the receiver accepts the message, it accepts the responsibility to carry out the indicated action. In response to a message, the receiver will perform some method to satisfy the request.
Message versus Procedure calls
There are 2 important distinctions between message vs. procedure calls in programming.
·         In message passing, there is a designated receiver for the message and the receiver is some object to which the message is sent whereas in procedure calls, there is no designated receiver.
·         The interpretation i.e. the selection of a method to execute in response to the message, of the message is determined by the receiver and can vary with different receivers whereas in procedure calls all of them are interpreted in the same method.
Responsibility
Responsibility means behavior (method) to response the message and it is one of the fundamental concept in object-oriented programming. In the above example, we see that Chris’s request indicates only the desired outcome i.e. to send flower to Robin and florist Fred is free to use any technique to achieve that desire of Chris. So, there is greater independence between objects in solving the complex problem.
Classes and instances
            In the above example, the different names such as Chris, Fred, Robin etc. all of them are the instances and all of them fall under some other category or class. Such as Fred falls under the category of ‘Florist’.
            In object-oriented programming too, all objects are the instances of a class. The behavior (method) invoked by an object in response to a message is determined by the class of the receiver. All objects of a given class use the same method in response to similar message.
Class hierarchies- inheritance
            figure2.png
Classes can be organized into a hierarchical inheritance structure. A child class (or subclass) will inherit attributes from a parent class higher in the hierarchical three. An abstract parent class is a class (such as Mammal) for which there are no direct instances, it is used to create subclass.
In the above example, Tony, Fred, Elizabeth, Harry, PawanKali, Robin’s flower all of them are the instances of the class Dog, Florist, Farmer, Dentist, Elephant and Rose respectively.
Computation as Simulation

           
In structural model of programming, the behavior of a computer executing a program is a process-state or pigeon-hole model. So, according to this view, the computer is a data manager. It follows some algorithms and it wanders through the memory, pulling values out of various slots (memory locations), process them according to the instructions mentioned in the algorithm, and pushing the results into other slots of the memory.
#include<stdio.h>
#include<conio.h>
main()
{
            int l,b,a;
            printf("Enter the length & breadth ");
            scanf("%d%d",&a,&a);
            a=l*b;
            printf("\nthe area=%d",a);
}
            But in object-oriented programming model, we never mention the memory address of the variable. Instead we deal with the different agents and all these related agents reside in a certain community i.e. memory area. These agents of the community themselves pass message to each other for their respective responsibility in the program.
            Thus, designing an object-oriented program is like a organizing a community of individuals. Each member of the community is given certain responsibilities. The achievement of the goals for the community as a whole come about through the work of each member, and the interactions of members with each other.
Abstraction Mechanism
            If you see the map of the world in the atlas, obviously the map will show you the some significant feature of the earth such as oceans, continents and other extremely large structures. But small features such as the major cities, rivers, states of a country etc. are omitted in the map of the world. These things are mentioned in the map of the subsequent countries and again, the smaller things such roads, buildings etc. have been omitted even in them. So, in each level of maps in the atlas, some information are purposely omitted and some information are included.        
Thus, abstraction is the purposeful suppression, or hiding, of some details of a process or artifact, in order to bring out more clearly other aspects, details, or structures.
            Information hiding is the purposeful omission of details in the development of an abstract representation. So, it describes the part of abstraction in which we intentionally choose to ignore some features so that we can concentrate on other.
Layers of abstraction:
            In an object-oriented program, we find the various levels of abstraction. At the highest level of abstraction, a program is viewed as a ‘community’ of objects where these objects interact with each other in order to achieve their common goal. In object-oriented development, there are two different form of community:
            a)community of programmer:- In the community of programmer, the members interact with each other in the real world in order to produce their application.
            b) community of objects:- In the community of objects that programmers create, they interact with each other in a virtual universe in order to further their common goals.
Client and server are the two levels of abstraction which deal with the interaction between the two individual objects in the program. Server is the object which provides services to the other objects in the program whereas the client is the object which requests for the service to the server and gets them from server.
Forms of abstraction
            Is-a and Has-a Abstraction
Generally, abstraction is divided into two forms: abstraction division into parts and abstraction division into specialization.
            The form of abstraction which is based on division into specialization is also known as ‘Is-a Abstraction’. For example, a car ‘is-a’ wheeled vehicle, which is turn ‘is-a’ means of transportation, dog ‘is-a’ type of animal etc.
            The form of abstraction which is based on division into parts is also known as ‘Has-a Abstraction’. For example, a car ‘has-a’ engine, a bicycle ‘has-a’ wheels., a dog ‘has-a’ tail etc.
Object oriented Design
            Object-Oriented Design (OOD) is concerned with developing an object oriented model of a software system to implement the identified requirements. It provides for less analysis effort and less complexity which saves time and costs. It is taken as the next great advance in software engineering. So, it promises to reduce development time, reduce the time and resources required to maintain existing applications, increase code reuse, and provide a competitive advantage to organization that use it.
Responsibility implies Noninterference
            In object-oriented programming, it is the fundamental concept to describe behavior in terms of responsibilities. Every agent involved in the programming community has some responsibility. So, discussing a problem in terms of responsibility increases the level of abstraction. When we make an object responsible for specific action, then we don’t need to keep on constantly watching the object how it is doing. For example, in the above situation of flower delivery, when Chris requests Fred to send flower to his friend Robin, then Chris does not need to keep on watching the whole process of sending flower. Chris, having taken the responsibility, is free to operate without interference on the part of customer, Chris. So, responsibility implies degree of independence or noninterference.
Programming in the Small and Programming in the Large
            Computer programming involves the task from small to large scale. For example, a program to handle the library system of a school and a program to deal with the control of spacecraft. So, the difference between the development of a small individual project and the development of more sizable software system is often described as ‘programming in the Small and programming in large’. Some computer programs can be developed by a single person within few hours or days whereas some programs can be developed by a team of large numbers where many persons who are expert in different areas get involved and the project can be completed many years.
            Programming in the small characterizes the project with the following features.
·         Complete code of the program is developed by a single programmer or by a small team of programmer. So, a single individual or all members of the team can understand all aspects of a project from top to bottom and beginning to end.
·         The major problem in ‘Programming in the small’ is the design and development of algorithm for dealing with the problem at hand.
Programming in the large characterizes software projects with the following features.
·         The complete software is developed by a large team, often consisting of people who are expert in different area having different skills. So, no single individual or only few members of the team can understand all aspects of the project.
·         Besides the design and development of algorithm for dealing with the problem, the major problem in ‘Programming in the large’ is the management of details and the communication of information between the various team who are involved for the development of different parts of the project.
Role of Behavior in OOP
            In the community of OOP based program, there are  many objects or components  with some specific state and behavior. Behavior of a component in OOP is the set of actions it can perform in the program after it gets request. The complete description of all the behavior for a component is called the protocol.
class simpleinterest
{
                private:
                                float p;
                                float t;
                                float r;
                                float si;
                public:
                                void getdata();
                                float calculateSI();
};
Any instance of the above class, will have two behaviors such as getdata() and calculateSI().
            In OOP, every problem is viewed in terms of related agents/objects which can interact with each other through message passing and responsible for some actions to perform. So, the emphasis on behavior is a hallmark of object-oriented programming. Behavior can be identified in even the most rudimentary descriptions of a system, long before any other aspect can be clearly understood.





           
Responsibility-Driven Design
Responsibility-driven design is a design technique in Object-oriented programming. It was proposed by Rebecca Wirfs-Brock. It is a way to design software that emphasizes modeling of objects’ roles, responsibilities, and collaborations. It uses informal tools and techniques and adds responsibility concepts. So, it is mainly driven by an emphasis on behavior at all levels of development.
Basic Principles of Responsibility-Driven Design
·         Maximize Abstraction
o   Initially hide the distinction between data and behavior.
o   Think of objects responsibilities for “knowing”, “doing”, and “deciding”
·         Distribute Behavior
o   Promote a delegated control architecture.
o   Make objects smart i.e. have them behave intelligently, not just hold bundles of data
·         Preserve Flexibility
o   Design objects so interior details can be readily changed
Some basic terms of used in RDD
an application        = a set of interacting objects
an object    = an implementation of one or more roles
a role                     = a set of related responsibilities
a responsibility = an obligation to perform a task or know information
a collaboration = an interaction of objects or roles (or both)


CRC Cards
CRC stands for ‘Component, Responsibility, Collaborator’ and CRC cards are tools used in the design of object-oriented software. Program design team identify the components that will be performing certain task in the program. Every activity that must take place is identified and assigned to some components as a responsibility. CRC cards are typically used when first determining which components are needed and how they will interact with each other.
CRC cards are usually created from index cards on which are written:
1.     The component  name
2.     Its Super and Sub classes (if applicable)
3.     The responsibilities of the class.
4.     The names of other classes with which the class will collaborate to fulfill its responsibilities.
General structure of CRC card is as follows:



Advantages of CRC cards are as follows:
·         CRC cards are widely available, inexpensive and erasable.
·         This encourages experimentation, since alternative designs can be tried, explored or abandoned with little investment.
·         The physical separation of cards encourages a sound understanding of the importance of the logical separation of the various components, helping to emphasize the cohesion and coupling.
·         The constraints of an index card are also a good measure of approximate complexity.

Software Components
            Software components are similar to the agents in our community who are responsible to do some specific tasks. Every software component is characterized by its behavior i.e. by what it can do. Besides its behavior, a software component can also hold some information.
So, software components can be characterized with the following factors:
a) Behavior and state
            Every software component consists of behavior and state.
·         Behavior:- Every software component has some specific tasks to be done. So, the behavior of a software component is the set of actions it can perform in the program after it gets request. The complete description of all the behavior for a component is also called prototype. For example, in the Interactive Intelligent Kitchen Helper, the ‘Greeter’ component is responsible to display informative initial message, offer user choice of options, pass control to other related components etc.
·         State:- The state of a component represents all the information held within it at a given point of time. So, state is a property of an instance. For example, in the Interactive Intelligent Kitchen Helper, the ‘Recipe’ component’s state includes the ingredients and preparation instructions.
b) Instances and classes
            Instances and classes are the basic block of Object Oriented Programming paradigm. Every program consists of class and its instances.
·         Class:- It is an abstract description of the data(state) and behavior of a collection of similar objects. So, the term class is used to describe a set of objects with similar behavior. For example, in the situation of flower delivery, like ‘Fred’ there are many other instances of the class ‘Florist’. But the behavior of all the florist is same. All the behaviors of the component are related to class, not with its instance.
·         Instance:- A representative of the collection is called an instance of the class. So, an instance is an individual representative of a class. All the instances can perform the same actions but use different values. For example, all florist can perform the same actions such as take order, sells flower, dispatch flower etc. but they can use different flowers in each order.
c) Coupling and cohesion
Coupling and cohesion are the two important concepts in the design of software components.
As we know that there will be different software components after the software is designed and coupling and cohesion describe the relationship between the different software components.
·         Coupling:- Coupling implies that the dependency level between software components should be minimum. It automatically leads to the design of components that don’t communicate frequently with each other. Boolean variables or flags should be used for the purpose of communication. The reasons for focusing the need for minimum dependence between components is that if component-1 is largely dependent on another component-2, then any error in component-2 will affect the functionality of component-1. If the programmer has to change the functionality of a component, then s/he should also make necessary changes to the internals of the component on which the component is largely dependent.
·         Cohesion:- Cohesion reflects the degree to which a component confirms itself to the performance of a single task. A simple way to check if a component is cohesive or not, is to examine each instruction in it. If every instruction is related to the performance of a single task, then the component is said to be cohesive. Component should be highly cohesive. The advantage of cohesion is that it leads to a larger degree of portability and we can directly plug in the component in an application which requires the performance of this task and components will be loosely coupled. Since the component is performing the single task, it will accept the data from other components, does the required function and returns the result. So, there is no need to know the internal function of any other components.
d)Interface and Implementation
            The two terms interface and implementation in software describe the distinctions between the what aspects of a task and the how features between the outside view and the inside view. An interface provides a link to the users and the software system. So, it describes what a system is designed to do or the outside view of software. It says nothing about how the assigned task is being performed inside the software.
            On the other hand, the implementation focuses on the internal view of the software. So, it describes how the tasks mentioned in the interface have been done inside the software. When the interface is matched with the implementation, then that completes the abstraction.
            The division between interface and implementation not only makes it easier to understand a design at a high level but also makes it possible to interchange the software components.
Formalize the Interface
As we know that ‘interface’ refers to the ‘what’ aspects of the software. It is the outside view of the software components. So, after all the components necessary for the program have been finalized, then another process is to formalize the interface i.e. patterns and channels of communications between the components.
 The general structure of each component should be made. The states and behaviors of all the components should be designed. If a component has only one behavior and no internal state, then it is better to make them in function and if a components has many tasks to be done, then it is better to make them using class. There should be a proper name for the responsibility of the components identified in CRC card. The types of arguments that are to be passed to the functions should be identified. The source of the data necessary for a component should be identified i.e. the data comes through argument or global variable or maintained internally by the component.
One should consider the following conventions for naming the component:
·         Use pronounceable name.
·         Use capitalization(or underscore) to mark the beginning of a new word within a name. for example, CardReader, card_reader etc.
·         Examine abbreviate carefully. Look for possible misunderstanding.
·         Avoid name with several interpretation
·         Avoid digits within names
·         Booleans variables and functions should have names that clearly indicate the interpretation of true. E.g. printerIsReady versus printerStatus

Design the Representation for Components
After the interface of the software has been formalized, then ‘Designing the representation for components’ process begins. So, in this process, the development team transforms the description of a component into a software system implementation. The main task during this process is designing the proper data structure necessary for each component as the wrong choice in the data structure may result in complex and inefficient programs.
      After the data structure of all components is designed, then the development team develops the algorithms for the behaviors of the components.
Implementing Components
As we know that ‘implementation’ refers to the ‘how’ factors of the software. It describes how the behaviors of the components perform the task inside the software.
So, it begins after the design of each component of software is complete. During this process, the behaviors of the components will be coded in computer using the High Level Language. The programmer also verifies that the software component will perform correctly when they are given the correct input values.
Integration of Components
After all the software components have been designed and tested well, then all these components are integrated into a single system. Then the final product is ready to deliver to the client. Actually ‘integration of components’ is not a task of single step but part of a large process.
            Testing of an individual component is often referred to as unit testing and the ‘integration of components’ process begins after it. Unit testing ensures that every individual component of the software system is bug free and performs the task as per the requirement of the user. Then they are ready to be integrated to the system.
            After the integration of all components, further testing is done to check whether the entire system is working as desired or not. If some of the components which are in collaboration with each other are not functioning well, then they are replaced. This process is also known as ‘integration testing’. If the entire system works as desired by the user, then it becomes ready to be delivered to the client.
            During integration testing, if the bugs or error are detected, then
            It begins from the unit tes       It begins from the integration of a simple base element.
Maintenance and Evolution
            If you think that after the software is delivered to the client, the responsibility of the software developer is over, then you are not right. Actually, the activities of ‘Maintenance and Evolution’ stage begins after the software is delivered to the client or installed in the clients’ machine. So, the term ‘maintenance’ describes the activities that follow after the delivery of the initial working version of a software system.
The activities fall under this stage are as follows:
·         Errors or bugs can be discovered by the user while working in the software and these must be corrected either in the existing release or in the subsequent release of the software.
·         Requirements of the organizations may change due to government regulations or other factors.
·         Hardware technology especially for input and output system, may change on which the software is based.
·         Expectations of the users may change. For example, user may expect greater functionality, lower cost, easier use etc.
·         Better documentation may be requested by users.

Past Questions of this unit asked in the Final Exam of Pokhara University:
1.      What is object oriented programming? How is it different from procedure-oriented programming? [8 marks-2011, Fall]
Answer:-                                             A Sample Answer
Object-oriented programming can be defined as “an approach that provides a way of modularizing programs by creating partitioned memory area for both data and functions that can be used as templates for creating copies of such modules on demand”.
OOP is the recent programming approach invented to overcome the drawbacks of structural programming approach/ procedural oriented programming(POP). Unlike structural programming, it uses the bottom up programming approach. OOP treats data as  critical (very important) element in the program and does not allow data to move freely around the program. OOP ties the data more closely to the function that operates on it and protects data from accidental modification from outside function. OOP allows decomposition of a program into a number of entities called objects and then builds data and functions around these objects. The data of an object can be accessed only by the function associated with that function. You can’t access the data directly. The data is hidden, so it is safe from accidental modification. Data and its functions are said to be encapsulated into a single entity. Data encapsulation, data hiding, inheritance and polymorphism  are key terms in the description of object-oriented languages.
The major differences between procedure-oriented programming and OOP are as follows:
OOP
Structured Programming
1.
1.





2.      What do you mean by software maintenance? Describe the activities falls under it. [7 marks-2011, Fall]
3.      Define software component. Discuss about the integration of components with real world example. [8 marks-2011, Fall]
4.      What makes OOP a new paradigm? Explain your with suitable points. [7 marks-2010, Fall]
5.      Differentiate between: [8 marks-2010, Fall]
a.       Programming in small and programming in large
b.      Interface and implementation
6.      What influence is an object-oriented approach said to have on the software system design? What is your own opinion? Justify through an example. [7 marks-2009, Fall]
7.      Explain the following with suitable example: Agents, Responsibility, Messages, and Methods. [8 marks-2009, Fall]
8.      How does OOP provide reusable software component? Explain. [7 marks, 2007, Fall]
9.      What are the basic steps involved in Responsibility Driven Design. How does it help in object oriented design? Support your answer with an example. [8 marks, 2007, Fall]
10.  What is object orientation? Explain the difference between structured and object oriented programming approach. [7 marks, 2006, Spring]
11.  What is the role of behavior in OOP? Along with a figure and an example of a CRC card, explain its significance in object oriented design. [8 marks, 2006, Spring]
12.  What is the difference between message passing and function call? Explain the basic message formalism. [8 marks, 2006, Spring]
13.  Why OOP is known as a new paradigm? Illustrate with certain examples. [8 marks, 2005, Fall]
14.  Justify how object oriented programming is a better programming tool. Compare C++ programming with the C programming environment. [4+4 marks, 2003, Fall]


No comments:

Post a Comment