Oops Cs

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

OBJECT ORIENTED

PROGRAMMING

CS3391

CASE STUDY : OVERVIEW OF OOP’S


OOP’S INTRODUCTION:

OOPs stands for Object-Oriented Programming, which is a programming paradigm that uses objects as
the main building blocks of a program. Objects are entities that have attributes (data) and behaviors
(methods) that define their state and functionality. OOPs allows programmers to create modular, reusable,
and maintainable code that can model real-world scenarios and problems.

Some of the features of OOPs are:

 A class is a blueprint or template that defines the common properties and methods of a group
of objects. An object is an instance of a class that has specific values for the properties and
methods defined by the class. For example, a class named Car can have properties like color,
model, speed, and methods like start, stop, accelerate, etc.

 Abstraction is the process of hiding the implementation details and showing only the essential
features of an object or a system. Abstraction helps to reduce complexity and increase
efficiency by focusing on what is important and relevant. For example, when you use a TV
remote, you only need to know which buttons to press to change the channel or volume, but
you do not need to know how the remote communicates with the TV internally.

 Encapsulation is the mechanism of wrapping the data and the methods that operate on the
data into a single unit, called an object. Encapsulation helps to protect the data from
unauthorized access and modification by restricting the visibility and accessibility of the data
and methods to other objects. For example, a bank account object can have data like balance,
account number, and methods like deposit, withdraw, etc.

 Inheritance is the concept of deriving or acquiring the properties and methods of an existing
class (called the parent or superclass) into a new class (called the child or subclass).
Inheritance helps to achieve code reusability and avoid duplication by allowing the child
class to use and extend the functionality of the parent class. For example, a class named
Animal can have properties like name, age, and methods like eat, sleep, etc. A class named
Dog can inherit from the class Animal and have additional properties like breed, color, and
methods like bark, fetch, etc.

 Polymorphism is the ability of an object to take different forms or behaviors depending on


the context or situation. Polymorphism helps to achieve flexibility and dynamic behavior by
allowing the same name or symbol to represent different types or actions. For example, the +
operator can be used to perform addition of numbers or concatenation of strings, depending
on the operands. Similarly, a method named sound can have different implementations for
different classes of objects, such as a dog, a cat, or a bird, depending on their respective
sounds.
 These are some of the basic concepts of OOPs that are widely used in many programming languages,
such as C++, Java, Python, etc.

 What are the main concepts and features of OOPs, and how are they supported by different
programming languages?
 How can OOPs be used to model the entities and behaviors of a bank system, such as customers,
accounts, transactions, etc.?
 How can OOPs be used to achieve modularity, reusability, maintainability, and security in the bank
system?
 What are the challenges and limitations of using OOPs for the bank system, and how can they be
overcome or mitigated?

 I will review the existing literature and theories related to OOPs and bank systems, and
identify the main concepts, frameworks, and gaps in the knowledge that inform my case
study.

 I will use secondary data sources, such as books, articles, websites, and online courses, to
collect information and examples about OOPs and bank systems. I will also use primary data
sources, such as interviews, surveys, and observations, to collect feedback and opinions from
experts, programmers, and users of OOPs and bank systems.

 I will use qualitative and quantitative methods to analyze the data that I have collected, and
answer my research questions. I will use evidence from the data to support my claims and
arguments, and use tables, charts, or graphs to illustrate my findings.

 I will present the results of my data analysis and answer my research questions in a clear and
logical manner. I will use headings, subheadings, bullet points, and paragraphs to organize
my report, and use citations and references to acknowledge the sources that I have used.

 OOPs is a programming paradigm that uses objects as the main building blocks of a program.
Objects are entities that have attributes (data) and behaviors (methods) that define their state and
functionality. OOPs is based on four major concepts: abstraction, encapsulation, inheritance, and
polymorphism.
 Abstraction is the process of hiding the implementation details and showing only the essential
features of an object or a system.
 Encapsulation is the mechanism of wrapping the data and the methods that operate on the data
into a single unit, called an object.
 Inheritance is the concept of deriving or acquiring the properties and methods of an existing class
(called the parent or superclass) into a new class (called the child or subclass).
 Polymorphism is the ability of an object to take different forms or behaviors depending on the
context or situation. OOPs is widely used in many programming languages, such as C++, Java,
Python, etc

 OOPs can be used to model the entities and behaviors of a bank system, such as customers,
accounts, transactions, etc. For example, a class named Customer can have properties like name,
address, phone number, and methods like openAccount, closeAccount, deposit, withdraw, etc. A
class named Account can have properties like account number, balance, interest rate, and methods
like getBalance, setBalance, addInterest, transfer, etc. A class named Transaction can have properties
like transaction id, date, amount, type, and methods like execute, cancel, printReceipt, etc. These
classes can be instantiated as objects, and interact with each other through messages and methods.
For example, a customer object can open an account object, and perform transactions on it. A
transaction object can execute itself by updating the balance of the account object, and print a receipt
for the customer object.
 The challenges and limitations of using OOPs for the bank system are:

I. Complexity: OOPs can increase the complexity of the bank system, as it involves creating
and managing many classes, objects, methods, and messages, and ensuring their consistency
and compatibility. OOPs can also introduce some overheads, such as memory allocation,
garbage collection, and inheritance hierarchy, that can affect the efficiency and performance
of the bank system.

II. Learning curve: OOPs can be difficult to learn and master, as it requires a different way
of thinking and designing than other paradigms, such as procedural or functional
programming. OOPs can also have some variations and differences among different
programming languages, such as syntax, semantics, and features, that can confuse or
challenge the programmers.

III. Testing and debugging: OOPs can make the testing and debugging of the bank system
more challenging, as it involves testing and debugging many classes, objects, methods, and
messages, and finding and fixing the errors or bugs that may occur in them. OOPs can also
make the tracing and tracking of the execution flow and data flow more difficult, as it
involves following the dynamic and polymorphic behavior of the objects and methods.

These are some of the expected findings of my case study.

OOPs is not the only programming paradigm available. There are other paradigms, such as procedural,
functional, logical, and declarative programming, that have different advantages and disadvantages.

For example, procedural programming is based on the concept of procedures or functions that perform a
specific task. Procedural programming is simple, efficient, and easy to debug, but it can also lead to code
duplication, low modularity, and high coupling.

Functional programming is based on the concept of pure functions that do not have any side effects or
modify any state. Functional programming is expressive, concise, and parallelizable, but it can also be
difficult to learn, understand, and debug.

Logical programming is based on the concept of logic and rules that describe the problem and the solution.
Logical programming is declarative, powerful, and flexible, but it can also be inefficient, unpredictable, and
hard to control.

Declarative programming is based on the concept of describing what the program should do, rather than
how it should do it. Declarative programming is abstract, high-level, and easy to read, but it can also be
ambiguous, verbose, and hard to optimize.
CHANDRU.M

210622205011

You might also like