Uploaded by Humza Arshad

OOP ASSIGNMENT 1

advertisement
Name: M Humza Arshad
Registration # Adpit 023R22-3
Session : Main Fall Regular 2022
Section : A
Program : Adpit
Subject : OOP
Assignment : 1
Total Marks : 10
Obtained Marks : 7
CLO : 1
Questions:
Q no: 1
What is the difference between provision techniques and OOP based
approach?
Q no: 2
Why procedural programming fails to provide security facilities?
Q no: 3
What are the pros and cons of OOP?
Q no: 4
How OOP has been evolved?
Q no:5
Why we need OOP?
Q no:6
What were the reasons or causes due to which we make changes from
basic programming to OOP?
Q no:7
How to solve any problem with OOP?
Q no:8
How many steps have been involved in solving any problem?
Q no:9
What are the steps involving in OOP designing?
Q no:10
What are the limitations of the OOP designing?
Ans: 1
Procedural programming divides the program into small programs and
refers to them as functions . Object oriented programming divides the program
into small programs and refers to them as object . Available data is capable of
moving freely within the system from one function to another.
Ans: 2
Security:
Object oriented programming is more secure than procedural
programming, because of the level of abstraction or we can say data hiding
property. It limits the access of data to the member functions of the same
class. While there is no such data hiding in the procedural programming
paradigm.
Ans :3
Advantages:
We can reuse the code multiple times using classes.
Inherit the class to subclass for data redundancy.
It is easy to maintain and modify.
Disadvatages:
Size is longer than other programs.
It required a lot of effort to create.
It is slower than other programs.
Ans:4
The OOP approach came into existence to remove the drawback of
conventional approaches. The basic principal of the OOP approach is to
combine both data and functions so that both can operate into a single unit.
This approach secures data also.
Ans:5
Make it easier to understand , how a program works by bringing together
data and its behavior in a single bundle called an object. In contrast, functional
programming is a model based on performing operations, or functions, on
static data.
Ans:6
Object oriented programming is a programming paradigm in computer
science that relies on the concept of classes and objects. It is used to structure
a software program into simple, reusable pieces of code blueprints, which are
used to create instances of objects.
Ans:7
The object oriented problem solving approach, in general, Can be divided
into four steps.
They are:
Identify the problem.
Identify the objects needed for the solution.
Identify messages to be sent to the objects.
Create a sequence of message to the objects that solve the
problem.
Ans:8
The object oriented problem solving can be divided in four steps.
1)
2)
3)
4)
Identify the problem.
Identify the objects needed for the solution.
Identify messages to be sent to the objects.
Create a sequence of messages to the objects that solve the problem.
Ans:9
OOP design is fundamentally a three-step process:
1) identify the classes.
2) characterizing them.
3) defining the associated actions.
Ans:10
Steep learning curve:
The thought process involved in object oriented
programming may not be natural for some people, and it can take time to get
used to it. It is complex to create programs based on interaction of objects.
END
Download