Explain data abstraction and data encapsulation and state the difference between them.
Introduction to Object-Oriented Programming
Original Khojo Papers practice question — not from a past board paper.
Procedural programming is organised round functions while object-oriented programming is organised round objects. In procedural programming data moves freely between functions, whereas in object-oriented programming data is encapsulated within objects and protected from outside access. Procedural programs follow a top-down design; object-oriented programs follow a bottom-up design and are easier to extend and reuse.
No citable source has been recorded for this record. Treat it as practice material, not as fact.
C is a procedural language and Java an object-oriented one.
From the same topic and chapter, at a similar level.
Explain data abstraction and data encapsulation and state the difference between them.
Introduction to Object-Oriented Programming
Distinguish between a class and an object.
Introduction to Object-Oriented Programming
State the four principles of object-oriented programming and explain each in one sentence.
Introduction to Object-Oriented Programming
What is the output of: String s = "Examination"; System.out.println(s.length() + " " + s.substring(0, 4) + " " + s.toUpperCase().charAt(2));
String Handling
Explain the ternary operator in Java and rewrite "if (a > b) max = a; else max = b;" using it.
Operators and Expressions in Java
Reduce the Boolean expression X·Y + X·Y′ using the laws of Boolean algebra.
Boolean Algebra