Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Class: Interfaces - Events - Internal Types - Aliases

Former Member
0 Likes
762

Can someone tell me what one of the above, or all of the above tabs are used for in Classes?

Thank-You

Edited by: Tom M. on Apr 3, 2008 5:35 PM

Edited by: Tom M. on Apr 3, 2008 5:36 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
676

Hi Tom,

Interface

In its most common form, an interface is a group of related methods with empty bodies. A bicycle's behavior, if specified as an interface, might appear as follows:

interface Bicycle {

void changeCadence(int newValue);

void changeGear(int newValue);

void speedUp(int increment);

void applyBrakes(int decrement);

}

To implement this interface, the name of your class would change (to ACMEBicycle, for example), and you'd use the implements keyword in the class declaration:

class ACMEBicycle implements Bicycle {

// remainder of this class implemented as before

}

Implementing an interface allows a class to become more formal about the behavior it promises to provide. Interfaces form a contract between the class and the outside world, and this contract is enforced at build time by the compiler. If your class claims to implement an interface, all methods defined by that interface must appear in its source code before the class will successfully compile.

Event

Event is a platform-independent class that encapsulates events from the platform's Graphical User Interface in the Java 1.0 event model. In Java 1.1 and later versions, the Event class is maintained only for backwards compatibilty.

They are definetely declared in classes. These concepts are related to one other for declaring methods and handling events in our program.

I think this will be helpful for you.

Reward points if useful.

Cheers,

Swamy Kunche.

Can someone tell me what one of the above, or all of the above tabs are used for in Classes?

Thank-You

Edited by: Tom M. on Apr 3, 2008 5:35 PM

Edited by: Tom M. on Apr 3, 2008 5:36 PM

3 REPLIES 3
Read only

Former Member
0 Likes
676

hi tom,

please explain your question in detail.......

Read only

Former Member
0 Likes
677

Hi Tom,

Interface

In its most common form, an interface is a group of related methods with empty bodies. A bicycle's behavior, if specified as an interface, might appear as follows:

interface Bicycle {

void changeCadence(int newValue);

void changeGear(int newValue);

void speedUp(int increment);

void applyBrakes(int decrement);

}

To implement this interface, the name of your class would change (to ACMEBicycle, for example), and you'd use the implements keyword in the class declaration:

class ACMEBicycle implements Bicycle {

// remainder of this class implemented as before

}

Implementing an interface allows a class to become more formal about the behavior it promises to provide. Interfaces form a contract between the class and the outside world, and this contract is enforced at build time by the compiler. If your class claims to implement an interface, all methods defined by that interface must appear in its source code before the class will successfully compile.

Event

Event is a platform-independent class that encapsulates events from the platform's Graphical User Interface in the Java 1.0 event model. In Java 1.1 and later versions, the Event class is maintained only for backwards compatibilty.

They are definetely declared in classes. These concepts are related to one other for declaring methods and handling events in our program.

I think this will be helpful for you.

Reward points if useful.

Cheers,

Swamy Kunche.

Read only

marcelo_ramos1
SAP Mentor
SAP Mentor
0 Likes
676

Hi Tom,

Look at [ABAP Objects Examples|https://wiki.sdn.sap.com/wiki/x/Aq] in [ABAP Objects Wiki section|https://wiki.sdn.sap.com/wiki/x/o5k], there is a lot of useful stuff !

Also look at [ABAP Objects Library|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_library&query=abap+objects&adv=false&sortby=cm_rnd_rankvalue].

Don't forget to close this Thread when your question be answered !

Regards,

Marcelo Ramos