• Klik tertinggi

    • None
  • Recent Comments

OOP Part 1 - Object Oriented Concept

Before we learn about OOP, we have to understand some of terms which are the basic concept in Object Oriented. There are: Objects, Scenarious, Classes, Inheritance, Interface, Namespace.

What are Objects?

Objects are things. People, companies, employees, time sheets, and ledger entries are all types of objects. In object- oriented terms, the word objectis used to describe one specific thing, such as Sam Smith the carpenter at 3322 Main Street and the May 15th time sheet for Jessica Jones.

Objects have data associated with them called properties. Sam Smith has a name, occupation, and address. The time sheet has an employee name, time period, and hours worked

NOTE: In object-oriented literature, properties are sometimes called attributes, resources, or even just data.

Objects also do things. The time sheet is filled out, validated, and submitted for payment. In real life, we fill out time sheets, validate them, and submit them for payment. In a computer system, the time sheet can perform these operations for itself. The things an object can do are defined with methods.

What are Scenarious ?

To understand an object within a particular context, and to define the appropriate set of properties and methods, it is important to look at how the object will be used. That is the purpose of scenarios.

Scenarios describe the processes that use the objects. For example, a payroll scenario has a set of steps for defining the payroll period, validating the time sheets, summing the hours from each time sheet, determining the correct pay using calculations that depend on the type of employee, and so on.
NOTE: You may see scenarios called use cases or user stories.

Leave a Reply