GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
General oop concept
1.
2. INTRODUCTIONWITH THE RAPIDLY CHANGING THE WORLD AN
THE 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
CONTINOUSLY LOOK FOR THE NEW APPROACHES TO
SOFTWARE DESIGN AND DEVELOPMENT. THE INCREASESD
COMPLEXIITY HAD BECOMETHE CHIEF PROBLEM WITH
COMPUTER PROGRAMS IN TRADITIONAL LANGUAGES.
3. EVOLUTION OF SOFTWAREA PROGRAM SERVES THE PURPOSE OF COMMANDING THE COMPUTER. THE EFFICIENCY AND USEFULNESS
OF A PROGRAM DEPENDS NOT ONLY ON PROPER ISE COMMAND BUT PROGRAMMING LANGUAGES ALSO.
LOW LEVEL LANGUAGES
These are machine oriented and require
extensive knowledge of computer circuitry.
Machine language, in which instructions are
written in binary code, is the only language
the computer can execute directly. Assembly
language, in which instructions are written
using symbolic names for machine
operations and operands, makes
programming less tedious than machine
language using assembler software (e.g
READ, ADD, STORE, etc)
HIGH LEVEL LANGUAGE
The programs written in HLLS are
converted into machine language using
compiler or interpreter as a computer can
work with machine language only.
A PROGRAM LANGUAGE SHOULD:
(I) It should provide a vehicle for the
programmer to specify actions to be
executed and
(II) It should provide a set of concepts for
the programmer to use when thinking
about what can be done.
5. Programming Languages
•Programming languages allow programmers to develop
software.
•The three major families of languages are:
•Machine languages
•Assembly languages
•High-Level languages
6. 6
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
7. 7
Assembly Languages
• 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
8. 8
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
9. 9
PROGRAMMING PARADIGMS
PARADIGMS
Paradigms means organizing
principle of a program.
It is an approach to programming.
MODULE
A module is an identifiable piece of
code within a program, with a sets of
inputs an outputs.
It has a sole purpose, and processes
its inputs in a way dictated by its goal
and provide some output.
10. 10
Object-Oriented 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.
11. 11
Early programming languages
Classic C
Simula
Pascal
Algol68
BCPL
Fortran
Lisp
COBOL
Algol60
PL1
1950s 1960s 1970s
Red==major commercial use
Blue==will produce important “offspring”
12. 12
Modern programming languages
Object Pascal
C++
Java95
C#Ada98
C++98
Java04
C++0x
PythonLisp
Smalltalk
Fortran77
Ada
Eiffel
Simula67
COBOL89
PHP
C89
Pascal
PERL
Visual Basic
COBOL04 Javascript
13. 13
OOP• OOP is mainly a program design philosophy.
• OOP uses a different set of programming languages than old procedural programming languages (C,
Pascal, etc.).
• Everything in OOP is grouped as self sustainable "objects". Hence, you gain re-usability by means of
four main object-oriented programming concepts. In OOP programmers define not only the data type of
a data structure, but also the types of operations/methods (functions) that can be applied to the data
structure.
• In this way, the data structure becomes an object that includes both data and functions (methods) in
one unit. In addition, programmers can create relationships between one object and another.
• For example, objects can inherit characteristics from other objects.
14. 14
Object
- usually a person, place or thing (a noun)
Method
- an action performed by an object (a verb)
Property or attribute
- Characteristics of certain object.
Class
- a category of similar objects (such as automobiles), does not hold any
values of the object’s attributes/properties
OOP Basic Terminology
15. 15
Classes and Objects
• A class is a prototype, idea, and blueprint for
creating objects.
• An object is an instance of a class.
• For example, in Java we define classes,
which in turn are used to create objects
• A class has a constructor for creating objects
• Class is composed of three things: its
name, attributes/properties, and methods.
16. 16
Classes and Objects
“X” CAR
PROPERTY
Plate no: AD47483
Color: Blue
Manufacturer: Mercedes
Model: CLK
Gear type: Automatic
METHOD
Moves forward
Moves backward
Moves right
Moves left
Stops
17. 17
CLASS OBJECT
Class is a data type Object is an instance of Class.
It generates OBJECTS It gives life to CLASS
Does not occupy memory location It occupies memory location.
It cannot be manipulated because it is not
available in memory (except static class)
It can be manipulated.
Technical contrast between Objects & Classes
Object is a class in “runtime”
18. 18
BASIC CONCEPTS OF OOP
The object oriented programming has been developed with a view to
overcome the drawbacks of conventional programming approach. The oop
approach is based on certain concepts that help it attain its goal of
overcoming the drawbacks of shortcomings of conventional programming
approaches.
The different types of oops concepts are :-
1) Data Abstraction
2) Encapsulation
3) Inheritance
4) polymorphism
19. 19
DATA ABSTRACTION
• Abstraction is a design principle.
• Is the process of removing characteristics from something in order to reduce it to a set of essential characteristics.
• Through the process of abstraction, a programmer hides all but the relevant data about a class in order to reduce
complexity and increase reusability.
• Abstraction is a basic representation of a concept. Abstraction allows programmers to represent complex real world
in the simplest manner.
• It is a process of identifying the relevant qualities and behaviors an object should possess, in other word represent
the necessary features without representing the back ground details
• You should always use abstraction to ease reusability, and understanding for the design and enable extension.
• When we design the abstract classes, we define the framework for later extensions.
• An abstract class, which declared with the “abstract” keyword, cannot be instantiated.
• It can only be used as a super-class for other classes that extend the abstract class. Abstract class is a design
concept and implementation gets completed when it is being realized by a subclass.
20. 20
Encapsulation
• Is the inclusion of property & method within a class/object in which
it needs to function properly.
• Also, enables reusability of an instant of an already implemented
class within a new class while hiding & protecting the method
and properties from the client classes.
• The class is kind of a container or capsule or a cell, which encapsulate
the set of methods, attributes and properties to provide its indented
functionalities to other classes.
• In that sense, encapsulation also allows a class to change its internal implementation without hurting the overall
functioning of the system.
• That idea of encapsulation is to hide how a class does its operations while allowing requesting its operations.
21. 21
Inheritance
• Inheritance—a way of organizing classes
• Term comes from inheritance of traits like eye color, hair color, and so on.
• Classes with properties in common can be grouped so that their common
properties are only defined once in parent class.
• Superclass – inherit its attributes & methods to the subclass(es).
• Subclass – can inherit all its superclass attributes & methods besides having
• its own unique attributes & methods.
•Inheritance allows child classes to inherit the characteristics of existing parent class
•Attributes (fields and properties)
•Operations (methods)
•Child class can extend the parent class
•Add new fields and methods
•Redefine methods (modify existing behavior)
•A class can implement an interface by providing implementation for all its methods
Expresses commonality among classes/objects
Allows code reusability
Highlights relationships
Helps in code organization
22. 22
TYPES OF INHERITANCE
• Single Inheritance
One class inherits from
another.
• Multiple Inheritance
One class inherits from two or more other classes.
Account
- balance
- name
- number
+ withdraw()
+ createStatement()
Savings
FlyingThing Animal
HorseWolfBirdHelicopterAirplane
23. 23
• Encapsulation, Inheritance, and Abstraction concepts are very related to Polymorphism.
• Polymorphisms is a generic term that means 'many shapes'. More precisely Polymorphisms means the ability to
request that the same methods be performed by a wide range of different types of things.
• In OOP, polymorphisms is a technical issue and principle.
• It is achieved by using many different techniques named method overloading, operator overloading, and method
overriding.
• An object has “multiple identities”, based on its class inheritance tree
• It can be used in different ways
• It is the ability to look at a class in its parent image.
• Lets see the robot example throughout the following few slides
Polymorphism
24. 24
ADVANTAGES AND DISADVANTAGES OF OOP
ADVANTAGES
• Code reuse & recycling.
• Improved software-development
productivity.
• Improved software maintainability.
• Faster development.
• Lower cost of development.
• Higher-quality software.
• Encapsulation.
DISADVANTAGES
• Steep learning curve.
• Could lead to larger program sizes.
• Could produce slower programs.
• The oop programs, design is stricky.
• Also one needs to do proper planning and
proper design for OOP programming.
• The relations among classes become
artificial at times.
25. 25
OOP Suitability
Object oriented programming is good in
complex projects or modular type of systems. It
allows simultaneous system development teams and
also could aid in agile system development
environments like extreme Programming.
Together with Ole-Johan Dahl he developed SIMULA I (1961–1965) and SIMULA-67 - the first object-oriented programming languages, introducing the concepts upon which all later object-oriented programming languages are built: objects, classes, inheritance, virtual quantities and multi-threaded (quasi-parallel) program execution.
Together with Ole-Johan Dahl he developed SIMULA I (1961–1965) and SIMULA-67 - the first object-oriented programming languages, introducing the concepts upon which all later object-oriented programming languages are built: objects, classes, inheritance, virtual quantities and multi-threaded (quasi-parallel) program execution.
Which we will later discuss
Object is a class in the runtime
In programming languages, an abstract type is a type in a nominative type system which cannot be instantiated directly. Abstract types are also known as existential types.[1] An abstract type may provide no implementation, or an incomplete implementation. Often, abstract types will have one or more implementations provided separately, for example, in the form of concrete subclasses which can be instantiated. It may include abstract methods or abstract properties that are shared by its subtypes.
Abstract types are useful in that they can be used to define and enforce a protocol; a set of operations which all objects that implement the protocol must support.
Useful in big software projects with several programmers, as the programming leader can set and define some set of protocols for others to start working with.