0% found this document useful (0 votes)
78 views3 pages

Object Oriented Programming: Task 1

Object Oriented Programming concepts include objects and classes, inheritance, and polymorphism. Objects have states and behaviors, while classes define objects. Inheritance allows code reuse and polymorphism allows different behaviors depending on data types. OOP makes software development easier through concepts like data hiding, code reuse, and simulating real-world events. However, OOP takes more time to learn and apply compared to structured programming.

Uploaded by

Trung Nguyễn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views3 pages

Object Oriented Programming: Task 1

Object Oriented Programming concepts include objects and classes, inheritance, and polymorphism. Objects have states and behaviors, while classes define objects. Inheritance allows code reuse and polymorphism allows different behaviors depending on data types. OOP makes software development easier through concepts like data hiding, code reuse, and simulating real-world events. However, OOP takes more time to learn and apply compared to structured programming.

Uploaded by

Trung Nguyễn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Object Oriented Programming

Task 1
Object Oriented Programing concepts:
The purpose of the OOP program is to direct you to object-oriented programming, object-
oriented planning1

1. Object and class:


Object: An entity has state and behavior.
Class: A set of objects. It is a logical entity. A class must be dened before you can
create an instance (object) of the class.2
2. Inheritance: When an object is inherited from an attribute, the characteristics of the
parent object are inherited. This increases the reusability of the code. It is used to achieve
polymorphism at runtime. Inheritance is very powerful, and if it is used properly, we can
develop complex programs very efciently and elegantly.3
3. Polymorphism means the ability to have more than one form. An activity can have
different behavior in different cases. This behavior depends on the type of data to be used
in the operation. Polymorphism is used extensively in the implementation of inheritance.
The biggest advantage of polymorphism is created reusing code is by the programming,
once the classes are written, tested and implemented can easily use without paying
attention to what is written in the case.

Advantages of Object-Oriented Programming:


OOP helps the design, development and maintenance easier. This increases the efficiency
of the software development process.
OOP provides Data Hiding, which cannot be accessed arbitrarily from the outside.
OOP gives you the ability to simulate real-world events in a more efficient way. We can
provide the solution to the problems in the real world if we use object-oriented
programming.

1
Page 16, An Introduction to Object-Oriented Programming with Java
2
Page 17, An Introduction to Object-Oriented Programming with Java
3
Page 24, An Introduction to Object-Oriented Programming with Java
Limitations of Object-Oriented Programming:
OOP is a high-level concept, so it takes time to get used to it and apply it to the fullest.
Increase the burden on the developer OOP may encounter.
Solve problems using OOP method to consume more time than the time taken by
structured programming approach.

Task 2
Use-case diagram:
Class diagram:

Explain project:
Object Class:
o Object: The object described here is geometry.
o Class: Classes were list to represent objects as shapes.
Inheritance: Perimeter / area calculations are inherited from layers (triangle, circle, square, ...)

Polymorphism: from an area / perimeter calculation method, can be used to perform perimeter
/ area calculations of different shapes.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy