The following table shows some similarities and differences in features and the use of terms and concepts in Smalltalk, C++, and Java. OO Concept/syntax Smalltalk C++ Java Abstract class Concept exists, no mechanism for enforcement A class with a pure virtual function can’t be instantiated Classes may be declared abstract Assignment operator := = = [...]
Archive for the ‘OOP’ Category
OOPL Comparison Leave a comment
OOPS – INTRODUCTION Leave a comment
1. List out the characteristics of FOP. 1. Large programs are divided into smaller programs known as functions. 2. Most of the functions share global data 3. Functions transform data from one form to another. 4. It employs top-down approach. 2. List out the characteristics of OOP. 1. Programs are divided into objects. 2. Data [...]
OOPS – Set 5 Leave a comment
1. What is an interface? · An interface is a kind of class. · An interfaces contain methods and variables. But the interfaces define only abstract methods and final fields. · That is the interface do not specify any code to implement these methods and data fields contain only constants. SYNTAX: interface InterfaceName { variables [...]
OOPS – Set 4 Leave a comment
Why java is known as platform neutral language ? It is the one that not tied to any particular hardware or operating system. Programs developed in java can be executed anywhere on any system. List some features of java. Platform independent and portable Object oriented Robust and secure Distributed Familiar, simple and small Multithreaded and [...]
OOPS – Set 3 Leave a comment
1.What is meant by reusability Reusability is a feature which is supported in object-oriented programming. This allows the reuse of existing classes without redefinition. 2.Define Inheritance In object-oriented programming, inheritance is a way to form new classes (instances of which are called objects) using classes that have already been defined. The former, known as derived [...]
OOPS – Set 2 Leave a comment
What is a class ? It is an extension to the structure data type. A class can have both variables and functions as members What is the difference between structure and a class ? The only difference between a structure and a class in C++ is that , by default , the members of a [...]
OOPS – Set 1 Leave a comment
1.What are the characteristics of procedure oriented programming language? Large programs are divided into smaller programs known as functions Most of the functions share global data Data move openly around the system from function to function Functions transform data from one form to another Uses top-down approach in program design. Concentration is on doing things( [...]
JAVA PROGRAMMING Leave a comment
1. Write a note on Package. The package statement defines a name space in which classes are stored. The general form of the package statement is package pkg; (eg.) package MyPackage; 2. What are the different categories of visibility provided by JAVA for classmembers? 1) Subclasses in the same package 2) Non-subclasses in the same [...]
JAVA INTRODUCTION Leave a comment
1. What is bytecode in java? Programming code once compiled, is run through a virtual machine instead of the computer’s processor. By using this approach, source code can be run on any platform once it has been compiled and run through the virtual machine. Bytecode is the compiled format for Java Programs. Bytecode is a [...]
FILE HANDLING Leave a comment
1. What are C++ Streams? The C++ language offers a mechanism, which permits the creation of an extensible and consistent input-output system in the form of streams library. It is a collection of classes and objects which can be used to build a powerful system or it can be modified and extended to handle user [...]