3 pytania - języki zorientowane obiektowo

0

Witam, uczę się na exam i mam problem z trzema pytaniami po angielsku. Pomógłby mi ktoś odpowiedzieć?
1.From the list, select true sentences:
a)Constructor functions cannot return values.
b)A function name is the only identifier that can be followed by parentheses.
c)Constructor functions can receive values.
d)We can call a constructor function for an object only once in a program.
e)We pass a value to a constructor in a declaration.
2.From the list, select true sentences:
a)The private data members of base classes remain private to that class.
b)Inheriting from two or more base classes is called multiple inheritance.
c)Creating levels of inheritance is also called multiple inheritance.
d)Even a pure virtual function needs a definition.
e)Virtual objects can be created from virtual classes.
3.From the list, select true sentences:
a)Defining a class reserves memory for the class's data members.
b)Declaring an object reserves memory for the data members of the object's class.
c)An object of a class (with the class defined at the beginning of a program outside the body of any function) can be declared only in member functions.
d)Only private member functions can access private member data.
e)Only public member functions can access public member data

0

No i jakie są twoje odp?

0

We can call a constructor function for an object only once in a program.

Short answer: yes.
Long answer: it depends what you mean.

Jestem bardzo ciekaw, jaka jest „prawidłowa” odpowiedź na tak nieprecyzyjnie zadane pytanie.

0

To są dobre odpowiedzi:

  1. a),c),e)
  2. a), b)
  3. b)
0

Według mnie

  1. e)We pass a value to a constructor in a declaration. nie pasuje mi to, że chodzi o deklarację, według mnie to zdanie jest fałszywe.
  2. d)We can call a constructor function for an object only once in a program. jest prawdziwe, chciałbym zobaczyć przykłady, które rzekomo pokazują, że to jest fałsz

1 użytkowników online, w tym zalogowanych: 0, gości: 1