GoConqr has a new look! Let us know what you think.

Flashcards

Quiz 3 1302

marc30599 . English 8 cards

Cards in this deck (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);
    }

Information

Description
we gotta pass!
Created by
marc30599 .
Views
1
Rating

More on Abstract Classes and Interfaces

Feedback

What is it about?

What do you think of the new look?

How do you like it?