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

Flashcards

Object Orientated Programming - Java

b3014292 English 5 cards

Cards in this deck (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"

Information

Description
Flashcards on Object Orientated Programming - Java, created by b3014292 on 04/07/2016.
Created by
b3014292
Views
2
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?