q4 - Programming Fundamentals for CIS Majors II Quiz 4...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Programming Fundamentals for CIS Majors II 11 th June 2010 1. Mention three main principles of Object-Oriented Programming (OOPS) that you have learnt in class till now: 2. Hiding internal data from the outside world, and accessing it only through publicly exposed methods is known as data __________________ . 3. Common behavior can be defined in a ___ and inherited into a ___ using the ___ keyword. (a) subclass, superclass, extends (b) superclass, subclass, inherits (c) superclass, subclass, extends (d) subclass, superclass, inherits (e) superclass, subclass, implements (f) subclass, superclass, implements 4. Consider the following two classes: public class ClassA { public void methodOne(int i) { } public void methodTwo(int i) { } public static void methodThree(int i) { } public static void methodFour(int i) { } } public class ClassB extends ClassA { public static void methodOne(int i) { } public void methodTwo(int i) { } public void methodThree(int i) { } public static void methodFour(int i) { } } (a) Which method overrides a method in the superclass? (b) Which method hides a method in the superclass?
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

q4 - Programming Fundamentals for CIS Majors II Quiz 4...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online