GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Karteikarten

Quiz 3 1302

marc30599 . Englisch 8 Karten

Karten in diesem Stapel (8)

  1. 1What are Abstract Classes/Methods?A class or method that is declared with abstract keyword
  2. 2How to write abstract class?"public 'abstract' class className"
  3. 3What are characteristics of abstract class?Cannot be instantiated
    can have constructors
    can have non-abstract methods
    no restrictions on attributes
    &
    keywords: "abstract class extends"
  4. 4How to write abstract method?"public 'abstract' datatype methodName();"
  5. 5What is Polymorphism?The ability of an object to take on many forms, used in implementing inheritance.
  6. 6What are Interfaces?It is like a abstract class but only has abstract methods.
  7. 7What are characteristics of Interfaces?cannot be instantiated
    cannot have constructors
    can only have abstract methods
    &
    attributes MUST be "public static final" keyword interface
  8. 8How woud you write a interface named "pluggable" with a method "plugIn" that returns a boolean for whether a device is receiving power from the outlets and has a parameter for the voltage needed as an "int"public interface Pluggable {
    public abstract boolean plugIn(int voltage);
    }

Informationen

Beschreibung
we gotta pass!
Erstellt von
marc30599 .
Aufrufe
1
Bewertung

Mehr zu Abstract Classes and Interfaces

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck