Womens College Java 2018 (1) - 1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Unit – 1

Q) Explain about Introduction to OOP


A)
 One Characteristic that is constant in the Software Industry is the “Change”.
 Change is one the most critical aspects of Software development and Management.
 New Tools and new approaches are announced almost every day. The impact of these developments is often
very expensive and raise number of problems to the Software Engineer.
 Every Software Engineer wants the concept of reusability, maintainability, security, portability, integrity. Finally
end user wants user friendly Software Product.
 To Built Complex Software is not enough to put number of programs. It also needs easy to implement and
modify wide variety of situations.
 Many Programming approaches have been tried. They are
 Modular Programming
 Top down Programming
 Bottom – Up Programming
 Structured Programming
 These approaches used almost 2 decades
 “C” Language is one of the “Structured Programming” Language. That means it follow the “Structured
Programming Approach”
 But it does not show desired results and bug free when the Programs are grew large for a Software
 To Reduce this problem the Concept of “OOP” is Introduced
 “OOP” means “Object Oriented Programming”
 “Object Oriented Programming” is an approach to program organization and development, which eliminates
the drawbacks of “Structured Oriented Programming”
 It is new way to develop Programs in easy way.
 Languages that follows OOP features include “C++,Java, .Net, Small Talk, C#(C Sharp)”

2. Explain about Object – Oriented Paradigm

A. The major Objective of Object – Oriented approach is to eliminate some of the drawbacks in the
Procedural approach. OOP treats data as critical element in the program development, does not
allow to it flow freely around the system. OOPs allows us to decompose a problem into a number of
entities called Objects and then build data and functions. The combination of data and methods
make up an object.
The data of an object can be accessed only by the methods associated with that object. Some of
the features associated with that object. Some of the features of the Object Oriented Paradigm are:
 Emphasis is on data rather than procedure
 Programs are divided into what are known as objects
 Data Structures are designed such that they characterized the objects
 Methods that operate on the data of an object are tied together in the data structure
 Data is hidden and cannot be accessed by external functions
 Objects may communicate with each other through methods
 New data and methods can be easily added whenever necessary
 Follows bottom-up approach in program design.
3) Explain about Object – Oriented Programming (or) Explain about Features of OOPs (or) Explain
about basic Concepts of OOPs.
A) Object – Oriented Programming is a programming method that combines data and instructions into a self-sufficient
“object”. In Object Oriented Program, the design represented by Objects.

Basic Concepts of OOPS (OR) BUZZ Words


 Object
 Class
 Inheritance
 Polymorphism
 Abstraction
 Encapsulation
 Message Passing

Object:
 Objects are Basic entities in an Object Oriented System
 Each Object is denoted by a name. Every Object has 2 Characteristics
1) State 2) Behaviour
 For example “Foodball ” is an object which has “State such as Color and Size” and it has
“Behaviour Such as Bounce “
 In Programming approach this State is represented by using “Variables or Fields”
Where as Behaviour is represented by using “Methods”
 The Variables within the object represents everything about the Object(State)
 Methods represents “How an Object is used”(Behavior)

Class:
 Class is blueprint that defines the variables and methods common to all objects of certain kind
 Class is a collection of objects of a Similar type
 Once a Class is defined any number of objects can be created to that class
Message Passing
 A single object by itself may not be very useful.
 An application contains many objects.
 One object interacts with another object by invoking methods on that object. It is also referred to as Method
Invocation. See the diagram below.

Data Abstraction:

 Data Abstraction refers to, shows only essential information to the Outside world and Hiding their Background
Details
 That means to represent the needed information in program without presenting the details
 For Example real life example TV, which we can turn on and off, change the channel..etc. But we don’t know the
internal details but we operate it without knowing the internal details
 That means the manufacturer of TV, hides the Internal Details for the sake of Security
 In Java, it is done by the Concept of Interfaces and Abstract Classes
Encapsulation:
 Encapsulation is the process of Binding or Wrapping Data and Methods together into a Single Unit
 Encapsulation enables Data hiding, hiding the irrelevant information from the users of a Class by using Accessing
Specifiers called public, protected, private
 For Example: Capsule is wrapped with different medicines
Inheritance:
 Inheritance is a property by which the new classes are created using the old Classes
 In Other Words the new Classes can be developed using some of the properties of old Classes
 It is the Concept of Reusability
 Here “Old Classes” referred as “Super Class or Parent Class or Base Class”
 “New Classes” referred as “Sub Class or Child Class or Derived Class”

 For Example: Here in the above example “Mobile” is the “Super Class” where as “Samsung,Nokia,Iphone” are
“Sub Class”. “Sub-Class” uses the common Properties from “Super-Class”

Polymorphism:
 Polymorphism means “One Interface, multiple methods”
 That means “It is possible to design a Generic Interface to a group of related Activities”
 The behavior type of data used in the Operation
 It reduces the Complexity by allowing the same interface to used to General Class of action
 For Example: the method Clean is used to Clean a Dish object, One that Cleans a “Car Object” and One that
cleans the “Vegetable Object”

4) Explain about Advantages or Benefits of Object Oriented Programming Language


A) Object – Oriented Programming is a programming method that combines data and instructions into a self-sufficient
“object”. In Object Oriented Program, the design represented by Objects.

The following are the advantages of software developed using OOP


 Software reuse is enhanced
 Software maintenance cost can reduced
 Data access is restricted providing better data Security
 Software is easily developed for Complex Problems
 Software may be developed meeting the requirements on time, on the estimated budget
 Software has improved performance
 Software Quality is improved
 Class hierarchies are helpful in the design process allowing increased extensibility
 Modularity is achieved
 Data abstraction is possible
 It is easy to partition the work in a project based on objects
 It can be easily upgraded from Small to Large System
5) Explain the Applications of Object-Oriented Programming
A) Object – Oriented Programming is a programming method that combines data and instructions into a self-sufficient
“object”. In Object Oriented Program, the design represented by Objects.
 If there is complexity in software development, OOP is the best Paradigm to Solve the Problem
The Following areas make uses of OOP
 Real time System Design
 Object – Oriented database
 Client – Server System
 Decision Support and Office Automation Systems
 CAD(Computer Aided Design)
 CAM(Computer Aided Manufacturing)
 AI(Artificial Intelligence)
 Mobile Computing
 Database Management Systems
 Data Security and Management
 Webbased Applications(Hypertext, Hypermedia)
 Pattern Recognition
 Image processing

You might also like