What is difference between functional and imperative programming languages?

Definition: An imperative language uses a sequence of statements to determine how to reach a certain goal. These statements are said to change the state of the program as each one is executed in turn. Examples: Java is an imperative language. For example, a program can be created to add a series of numbers: Each statement changes … Read more

What is a “driver class”?

A “Driver class” is often just the class that contains a main. In a real project, you may often have numerous “Driver classes” for testing and whatnot, or you can build a main into any of your objects and select the runnable class through your IDE, or by simply specifying “java classname.”

Difference between virtual and abstract methods

Virtual methods have an implementation and provide the derived classes with the option of overriding it. Abstract methods do not provide an implementation and force the derived classes to override the method. So, abstract methods have no actual code in them, and subclasses HAVE TO override the method. Virtual methods can have code, which is … Read more

Is C++ an Object Oriented language?

C++ is usually considered a “multi-paradigm” language. That is, you can use it for object-oriented, procedural, and even functional programming. Those who would deny that C++ is OO generally have beef with the fact that the primitive types are not objects themselves. By this standard, Java would also not be considered OO. It is certainly … Read more