FUNDAMENTALS OF COMPUTER

COMPUTER PROGRAMMING FUNDAMENTALS

WHAT IS PROGRAMMING

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Sean does not understand the relationships between objects, values, properties and classes. His technology teacher explains:
A
objects created using the same class must contain the same properties and property values.
B
objects created using the same class must contain the same properties; however, the properties may contain different values.
C
objects created using the same class can contain different properties and property values.
D
objects created using the same class may contain different properties; however, the properties must contain the same values.
Explanation: 

Detailed explanation-1: -Class versus object A class is a template for objects. A class defines object properties including a valid range of values, and a default value. A class also describes object behavior. An object is a member or an “instance” of a class.

Detailed explanation-2: -Classes: A class is a generalized description of an object. An object is an instance of a class. A class defines all the attributes, which an object can have and methods, which represents the functionality of the object. Messages: Objects communicate by message passing.

Detailed explanation-3: -A class represents a collection of objects having same characteristic properties that exhibit common behavior. It gives the blueprint or description of the objects that can be created from it. Creation of an object as a member of a class is called instantiation. Thus, object is an instance of a class.

Detailed explanation-4: -Sequence is the default control structure; instructions are executed one after another.

There is 1 question to complete.