logo

Crowdly

Browser

Add to Chrome

21714017_25_26_01 - PROGRAMACIÓN ORIENTADA A OBJETOS

Looking for 21714017_25_26_01 - PROGRAMACIÓN ORIENTADA A OBJETOS test answers and solutions? Browse our comprehensive collection of verified answers for 21714017_25_26_01 - PROGRAMACIÓN ORIENTADA A OBJETOS at av03-25-26.uca.es.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

1class cronometro {

2public:

3 cronometro(int t): t(t) {}

4 void reiniciar();

5 void parar();

6 void seguir();

7 int tiempo() const;

8private:

9 int t;

10};

0%
0%
0%
100%
View this question

Las siguientes declaraciones en la parte pública de la clase matriz:

6  matriz(const matriz&) = default;

7 matriz(matriz&&) = default;

cuya parte privada consiste en:

25  size_t m, n;

26 valarray<double> x;

100%
0%
0%
0%
View this question

Un atributo de una clase que esté marcado como constante...

100%
0%
0%
0%
View this question

¿Qué se puede afirmar con certeza sobre el siguiente fragmento de código?

1class C {

2public:

3 C(int x) { /* ... */ }

4 // ...

5};

 

6C operator +(const C& x, const C& y) { /* ... */ }

 

7int x;

 

8// ...

 

9C c(x);

10C d(x + c);

0%
0%
100%
0%
View this question

La siguiente declaración en la parte pública de la clase matriz...

3  explicit matriz(size_t m = 1, size_t n = 1, double y = 0.0);

100%
0%
0%
0%
View this question

Dado el siguiente código, señala la respuesta correcta:

1#include <iostream>

2class C {

3public:

4 C(int i = 0, bool al = false): n{i}, hayAlerta{al} {}

5 void mostrar() const {

6 if (hayAlerta) alerta();

7 std::cout << "i = " << n << std::endl;

8 }

9private:

10 int n;

11 bool hayAlerta;

12 void alerta() { std::cout << "Alerta " << std::endl; }

13};

 

14int main() { const C c; c.mostrar(); }

0%
0%
0%
100%
View this question

Dada la siguiente declaración en la parte pública de la clase matriz:

23  friend matriz operator -(const matriz& a);

indique cuál de las siguientes afirmaciones es cierta:

100%
0%
0%
0%
View this question

Los constructores...

100%
0%
0%
0%
View this question

¿Qué se puede afirmar con certeza sobre el siguiente fragmento de código?

1class C {

2public:

3 // ...

4 static void f() { s = c; }

5 static void g() { s = m; }

6private:

7 const int c = 0;

8 mutable int m;

9 static int s;

10};

100%
0%
0%
0%
View this question

Si en una clase A tenemos un método A(const B& b), siendo B otra clase, invocar a esa operación permitiría:

0%
0%
0%
100%
View this question

Want instant access to all verified answers on av03-25-26.uca.es?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome