View Count: 0
Duration: 46 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 25 mins
Accessed date:
Not Yet Viewed
Post your comment / feedback here
 
 

please help me to learn the concept

Posted By RAJNISH on 12-May-2017

i want to learn oops concept

Posted By siva linga on 24-Mar-2017
Sorry!For this module there is no Sample Code.
Sorry!For this module there is no Assignments.
Question No: 1 of 17
What will be the output of the following code:

class Program 
{
    static void Main(string[ ] args)
    {
        Tests t = new Tests(7.8);
    }
}	

class Tests
{
    double p = 3.14;
    public Tests(double p)
    {
      Console.WriteLine("Value received is: "+p.ToString());      
    }
} 
Options:
  1. Throws a compile error as the default constructor is not provided
  2. Prints: Value received is: 7.8
  3. Prints: Value received is: 3.14
  4. Throws an error stating the variable “p” already contains a definition of p.
  5. Throws an error stating an ambiguity of variable “p”.
View Answer/Explanation:
b
Explanation:
In order to initialize members of object we can pass parameters while creating an object, when object is created by passing parameters its concerned parameterized constructor is raised to initialize its members.

Question No: 2 of 17
An object has______ 
Options:
  1. properties for validations
  2. Methods for functionality
  3. Events for depicting the change of state
  4. All the above
View Answer/Explanation:
d
Explanation:
An object is self describing complete entity. At a glance, one should be able to describe the state of the object, object functionality.

Question No: 3 of 17
Every object has 
Options:
  1. State
  2. Behavior
  3. Dimension
  4. Weight
View Answer/Explanation:
a b
Explanation:

Question No: 4 of 17
Which of the following is not a feature of Object Oriented Programming Language 
Options:
  1. Encapsulation
  2. Global Variables
  3. Generalization
  4. Polymorphism
View Answer/Explanation:
b
Explanation:
As per object orientation, everything should be part of an object and nothing should be global.

Question No: 5 of 17
How do we identity the state of an object 
Options:
  1. Behavior of an object
  2. Data of an object
  3. Both Data and Behavior
  4. Scope of an object.
View Answer/Explanation:
b
Explanation:
Data associated with an object at any given instance of time is the state of an object.

Question No: 6 of 17
Every object has a lifetime - It is created, Used and __________ 
Options:
  1. Destroyed
  2. Recreated
  3. Ignored
View Answer/Explanation:
a
Explanation:

Question No: 7 of 17
An Object Oriented Application is a collection of ___________ objects 
Options:
  1. all
  2. Unrelated
  3. realtime
  4. Related
View Answer/Explanation:
d
Explanation:
In an application we have all objects which are related to each other.

Question No: 8 of 17
Object communicate with other by invoking methods of each other. True or False? 
Options:
  1. True
  2. False
View Answer/Explanation:
a
Explanation:

Question No: 9 of 17
Which of the following are benefits of encapsulation 
Options:
  1. Behavior Hiding
  2. Generalization
  3. Data Hiding
  4. Loose Coupling
View Answer/Explanation:
c d
Explanation:

Question No: 10 of 17
Inheritance between two types can be identified with which one of the following relationship 
Options:
  1. is a
  2. has a
  3. is type of
  4. is instance of
View Answer/Explanation:
a
Explanation:

  1