The correct answer is: A. Related
A class statement groups related items in one unit. These items can be variables, functions, and other classes. The class statement is used to define a new class. A class is a blueprint for creating objects. Objects are instances of classes.
Option B is incorrect because the class statement does not group different items. Option C is incorrect because the class statement does not group items with the same access specifier. Option D is incorrect because the class statement does not group items with different access specifiers.
Here is an example of a class statement:
class Person {
string name;
int age;
}
This class statement defines a new class called Person
. The class has two members: a name
variable and an age
variable.