


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Students of Communication, study E-Commerce as an auxiliary subject. these are the key points discussed in these Lecture Slides of E-Commerce : Calling Methods, Enterprise Programming, Object Instantiation, Static Method, Attributes, Static Attributes, Static Methods, Public Attribute, Static Uses, Instance Uses
Typology: Slides
1 / 4
This page cannot be seen from the preview
Don't miss anything!



Spring 2011 Enterprise Programming
Working with static method and attributes
Object Instantiation
Working with classes in programs
Classes, when instantiated, become objects.
Not all classes need to be instantiated to be used within programs.
Static attributes (CLASS-DATA) Static methods (CLASS-METHODS)
To reference a static public attribute:
classname=>attributename myvar = classname=>attributename
To call a static method: CALL METHOD classname=>methodname. "traditional classname=>methodname( ). "as of Web AS 6.
Static vs. instance: Static uses => Instance uses -> Other syntax elements are the same.
Calling methods
Cannot be a space before opening parenthesis. Must be one after.
If only one importing parameter in method definition, list the actual parameter in the parenthesis by listing data object name only. class=>method( data1 ).
If several importing parameters, parameters must be listed in pairs: formal parameter = actual parameter. class=>method( par1 = data1 par2 = data2 ).
If there are parameters of types other than importing , the type of parameter passing must be listed. class=>method( EXPORTING p1 = d1 p2 = d IMPORTING par3 = data CHANGING par4 = data4 ).
Let's Practice
Static Rules
Static methods can only access static attributes.
Static method may define local data objects.
Instance methods can access static and instance attributes.