O GoConqr está de visual novo! Conte para nós o que você achou.

Flashcards

Object Orientated Programming - Java

b3014292 Inglês 5 flashcards

Flashcards do conjunto (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"

Informações

Descrição
FlashCards sobre Object Orientated Programming - Java, criado por b3014292 em 04-07-2016.
Criado por
b3014292
Visualizações
2
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?