Computer Science Archive: Questions from October 12, 2022
-
Taking into account the following classes: Do Class2 objects also have the attributes of Class 1?
Teniendo en cuenta las siguientes clases: class Class1\{ public: Class1(); int getX(); int getY(); int setX(int); int setY(int); void operator \( += \) (Class1 \&tmp); int operator *(int \( \mathrm{n}2 answers -
convert these sentences to a prenex normal form
P1: \( \mathrm{A} \rightarrow(\mathrm{OP} \vee \mathrm{Q}) \) P2: \( \mathrm{OP} \rightarrow \forall \mathrm{x} \forall \mathrm{y}[(\mathrm{S}(\mathrm{x}) \wedge \mathrm{M}(\mathrm{x}, \mathrm{y})) \r2 answers -
Taking into account the following classes: The following code for a Class2 user program is correct:
class Class1\{ public: Class1(); int \( \operatorname{get} X() \); int getY () ; int setX(int); int setY(int); void operator \( += \) (Class 1 \&tmp); int operator *(int n); void operator * \( =( \) C2 answers -
2 answers
-
If \( \mathrm{y}=3 \), which of the following sets \( y \) to 7 ? a. \( y+=4 \); b. \( y^{*}=4 \); c. \( y+4=x \); d. \( y=+4 \);2 answers