Programming

  Home  Computer Programming  Programming


“Learn basic programming concepts with hundreds of Interview Questions and Answers with examples.”



102 Programming Questions And Answers

61⟩ What do you meant by active and passive objects?

Active objects are one which instigate an interaction which owns a thread and they are responsible for handling control to other objects. In simple words it can be referred as client.

Passive objects are one, which passively waits for the message to be processed. It waits for another object that requires its services. In simple words it can be referred as server.

 250 views

62⟩ Differentiate persistent & non-persistent programming objects?

Persistent refers to an object’s ability to transcend time or space. A persistent object stores/saves its state in a permanent storage system with out losing the information represented by the object.

A non-persistent object is said to be transient or ephemeral. By default objects are considered as non-persistent.

 277 views

64⟩ Why generalization is very strong in programming?

Even though Generalization satisfies Structural, Interface, Behaviour properties. It is mathematically very strong, as it is Antisymmetric and Transitive. Antisymmetric: employee is a person, but not all persons are employees. Mathematically all As’ are B, but all Bs’ not A.

 241 views

65⟩ What is Python and what is scope of Python?

Python is an interpreted, interactive, object-oriented programming language. It is often compared to Tcl, P e r l, Scheme or Java.

Python combines remarkable power with very clear syntax. It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing. There are interfaces to many system calls and libraries, as well as to various windowing systems (X11, Motif, Tk, Mac, MFC, wxWidgets). New built-in modules are easily written in C or C++. Python is also usable as an extension language for applications that need a programmable interface.

The Python implementation is portable: it runs on many brands of UNIX, on Windows, OS/2, Mac, Amiga, and many other platforms.

The Python implementation is copyrighted but freely usable and distributable, even for commercial use.

 262 views

67⟩ What is meant by software development method?

Software development method describes how to model and build software systems in a reliable and reproducible way. To put it simple, methods that are used to represent ones’ thinking using graphical notations.

 239 views

68⟩ What are inner class and anonymous class concept in Programming?

Inner class in Programming:

classes defined in other classes, including those defined in methods are called inner classes. An inner class can have any accessibility including private.

Anonymous class in Programming:

Anonymous class is a class defined inside a method without a name and is instantiated and declared in the same place and cannot have explicit constructors.

 232 views

71⟩ What is meant by “method-wars” in Programming?

Before 1994 there were different methodologies like Rumbaugh, Booch, Jacobson, Meyer etc who followed their own notations to model the systems.

The developers were in a dilemma to choose the method which best accomplishes their needs. This particular span was called as “method-wars”

 230 views

72⟩ Who were the three famous amigos and what was their contribution to the object community?

The Three amigos namely,

James Rumbaugh (OMT): A veteran in analysis who came up with an idea about the objects and their Relationships (in particular Associations).

Grady Booch: A veteran in design who came up with an idea about partitioning of systems into subsystems.

Ivar Jacobson (Objectory): The father of USECASES, who described about the user and system interaction.

 243 views

73⟩ What do you meant by “SBI” of an object in programming?

SBI stands for State, Behavior and Identity. Since every object has the above three.

State:

It is just a value to the attribute of an object at a particular time.

Behaviour:

It describes the actions and their reactions of that object.

Identity:

An object has an identity that characterizes its own existence. The identity makes it possible to distinguish any object in an unambiguous way, and independently from its state.

 242 views

75⟩ What do you meant by static and dynamic modeling in programming?

Static modeling is used to specify structure of the objects that exist in the problem domain. These are expressed using class, object and USECASE diagrams. But Dynamic modeling refers representing the object interactions during runtime. It is represented by sequence, activity, collaboration and statechart diagrams

 260 views

79⟩ What is the difference between procedural and object-oriented programs?

1. In procedural program, programming logic follows certain procedures and the instructions are executed one after another. In OOP program, unit of program is object, which is nothing but combination of data and code.

2. In procedural program, data is exposed to the whole program whereas in OOPs program, it is accessible with in the object and which in turn assures the security of the code.

 238 views

80⟩ How many ways can an argument be passed to a subroutine in programming?

An argument can be passed in two ways in a programming language. They are Pass by Value and Passing by Reference.

Passing by value: This method copies the value of an argument into the formal parameter of the subroutine.

Passing by reference: In this method, a reference to an argument (not the value of the argument) is passed to the parameter.

 239 views