Docsity

Object Oriented Programming - E-Commerce - Lecture Slides, Slides of Fundamentals of E-Commerce

Toggle sidebar
bg1
Object Oriented Programming
(OOP)
• Object is a programming unit having
– data (attributes)
– methods (operations)
• Every object represents some physical object in the real
life situation (being programmed)
• Every object in a program is created from its Class.
• Programmers write Class code for every needed object
(class)
• Main program is just creating objects and make use of their
functionalities
Docsity.com
pf3
pf4
pf5
pf8

Partial preview of the text

Download Object Oriented Programming - E-Commerce - Lecture Slides and more Slides Fundamentals of E-Commerce in PDF only on Docsity!

Object Oriented Programming

(OOP)

•^

Object is a programming unit having^ –

data (attributes)– methods (operations)

-^

Every object represents some physical object in the reallife situation (being programmed)

-^

Every

object

in a program is created from its

Class

•^

Programmers write

Class code

for every needed object

(class)

-^

Main program is just creating objects and make use of theirfunctionalities

Example:

Advantage Advertising

Client_Bill ClientNameRegularHoursOvertimeHoursRegularRateOvertimeRate computeClientBill(

TimeCardRecords

)

printBill( )

Client_Bill

object for

Client A

Main Program Client_Bill

object for

Client B

A class for client bill object

Attributes^ Methods

Benefits of OOP

•^

Maximize Code Reusability^ –

Pre-written class codes can be used in any program development– New classes can be derived from pre-written classes with someadded functionalities [Inheritance]– Example:

Car class can be used for deriving more specific car

classes Toyota, Lexus, Mercedes etc.

•^

Simplify Program Writing^ –

Users of an object do not need to know the exact mechanism ofany of the object functionalities [Encapsulation]– Easier for the programmers to change the functionality mechanismany time without asking users to change their programs

…Benefits of OOP

-^

Context driven method calls^ – Some methods look similar in interface and semantics

but implemented differently for different objects[Polymorphism

]

  • User doesn’t need to worry about the mechanism – Example
  • print method

in Client_Bill class

  • For two different types of client bills

(clilent_printed_bill & client_onscreen_bill), themethods print does the same (semantically),however using different mechanism

…Introducing

Visual Basic for Applications

  • VBA code

helps in integrating the use of

different objects

(tables, queries, forms etc.)

  • Produces the effect of a completely

customized application

An Example Microsoft Access

Database

Tables

-tblStudent-tblCourse-tblGrades

QueriesForms

-frmStudentManagement-frmCourseManagement-frmStudentGrades A Microsoft Access Database (college.mdb)

User needs to usedatabase objectsinteractively (

using the

command interfaceavailable in Access

) Docsity.com