LOTUSSCRIPT LANGUAGE


User-defined classes
You can build object-oriented applications by creating classes. A class is a data type that restricts access to its data to a set of procedures. These procedures control the ways that an instance of a class (an object) is initialized, accessed, and finally deleted when it is no longer needed.

You can create two types of LotusScript classes:


A class lets your application model real objects, their attributes, and their behaviors. For example, an air traffic-control system creates a flight class, a car rental system creates a car class, and a bank's automated teller system creates an account class. For each class, you define its members: variables, properties, and subs and functions (also called methods). Typically, you can retrieve and assign values to an object's properties. Methods perform operations on the object.

ClassPropertiesMethods
FlightGateNumber

FlightNumber

InAir

OnGround

TakeOff

Land

DelayFlight

CancelFlight

CarLicensePlate

DriverLicense

RentalDate

ServiceCar

TransferLocation

AccountCustomerNumber

Balance

AccountNumber

WithdrawCash

DepositMoney

MoveMoney

In a script, you can declare a variable to refer to an instance of the object’s class. The variable is an object reference variable. Each class defines the data used by instances of the class and defines a set of properties and methods that apply to the class.

Benefits of classes

Classes offer several features that can simplify your application programming:


See Also