Content deleted Content added
Undid revision 1165181828 by Nitish18977 (talk) |
mNo edit summary |
||
Line 1:
{{
{{Refimprove|date=May 2010}}
Line 11:
== Hardware interfaces ==
[[File:RJ-45 Ethernet socket on Lenovo T410 Laptop.jpg|thumb|upright=1.4|Hardware interfaces of a [[
{{Main article|Hardware interface}}
Hardware interfaces exist in many components, such as the various [[Bus (computing)|buses]], [[Computer data storage|storage devices]], other [[I/O]] devices, etc. A hardware interface is described by the mechanical, electrical, and logical signals at the interface and the protocol for sequencing them (sometimes called signaling).<ref name="87Blaauw">
Line 69:
=== In object-oriented languages ===
{{Main article|Interface (object-oriented programming)|Concept (generic programming)}}
In some [[object-oriented]] languages, especially those without full [[multiple inheritance]], the term ''interface'' is used to define an [[Abstract data type|abstract type]] that acts as an [[abstraction]] of a [[Class (computer science)|class]]. It contains no data but defines behaviours as [[Method (computer science)|method]] signatures. A [[
An interface is thus a [[data type|type]] definition; anywhere an object can be exchanged (for example, in a [[function (computer science)|function]] or [[method (computer science)|method]] call) the ''type'' of the object to be exchanged can be defined in terms of one of its implemented ''interface''s or base-classes rather than specifying the specific [[Class (computer science)|class]]. This approach means that any class that implements that interface can be used.{{citation needed|date=June 2018}} For example, a [[Skeleton (computer programming)|dummy implementation]] may be used to allow development to progress before the final implementation is available. In another case, a [[Test-driven development#Fakes, mocks and integration tests|fake or mock]] implementation may be substituted during testing. Such [[Method stub|stub]] implementations are replaced by real code later in the development process.
|