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

Karteikarten

Object Orientated Programming - Java

b3014292 Englisch 5 Karten

Karten in diesem Stapel (5)

  1. 1What does the following refer to? "Cohesion is the OO principle most closely associated with allowing a single object to be seen as having many types"Polymorthism
  2. 2What does the following refer to? "Cohesion is the OO principle most closely associated with hiding implementation details"Encapsulation
  3. 3What will the output be... class Car { String noise = "vroom"; String horn() { return "beep" } } class Ferrari extends car { String noise = "VROOM!"; String horm() { return "beeeeep!" }} public static void main { Car c = new Ferrari(); println(c.noise; c.horn());"vroom beeeeep!"
    Polymorphism is only for instance methods.
  4. 4Given... "public abstract interface X { public void y(String s); }" ...can it be overloaded?Yes, but you must keep the additional 'y' method, e.g...
    "public abstract interface X {
    public void y(String s);
    public void y(Integer i) }"
  5. 5What is the result from... class Cheese { public final void smell() { .println "cheesy" }} class Stilton extends Cheese{ public final void smell() { .println "stiltony" } /*main code*/ { new Stilton.smell() }"cheesy"
    because the class is public, however if its private it would have been "stiltony"

Informationen

Beschreibung
Karteikarten am Object Orientated Programming - Java, erstellt von b3014292 am 04/07/2016.
Erstellt von
b3014292
Aufrufe
2
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck