CS 18000 Lecture 9: Interfaces

14 views5 pages

Document Summary

Typically asymmetric: one system defines the interface, the other system. Graphical user interface (gui): user -> computer. Application programming interface (api): application program -> library of related methods. Java class: a java class provides one form of interface, public members (methods, mainly) define the interface to clients (users) of that class, class interface consists of. Public method signatures (what the method expects) Method return types (what the method returns: the java language abstracts this idea one step further . A class that defines the interface, and. A class that implements (uses) the interface: any class that implements the interface must provide implementations for all the method bodies given in the interface definition (except default methods) No fields (other than constants: an interface is like a class in which you forgot to declare the fields and left out the method bodies.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents