+ 7
Fill in the blanks to declare a class Student which inherits from the Human class.
class
Human {
constructor(name) {
this.name = name;
}
}
class Student
extends
Human {
constructor(name, age) {
super
(name);
this.age = age;
}
}
+ 4
class Base {
protected :
int baseVar;
};
class Derived : public Base {
public:
void foo() {
baseVar = 12;
}
};
+ 3
class B {
public:
B () {
cout << "B's constructor"; }
};
class D : public B {
D () {
cout << "D's constructor"; }
};
+ 2
#include <string>
#include "Birthday.h"
class People {
public:
People(string n, Birthday bo);
private:
string name;
Birthday dateOfBirth;
};
+ 1
please helping me the sentense
+ 1
class
Human {
constructor(name) {
this.name = name;
}
}
class Student
extends
Human {
constructor(name, age) {
super
(name);
this.age = age;
}
}
+ 1
class
extends
super
+ 1
drag and drop from the options below to delow to declare a protected member in the base class and to access it from the derived class'"foo" function.
ANSWER:-
mother
~mother
+ 1
drag and drop from the options below to delow to declare a "B" class with it's own constructor and a "D" class with its own constructor, where "D" inherits " B".
ANSWER:-
CLASS
B
PUBLIC
D
0
do you know how you declare a class, declare a constructor, derive a class? which of those are your actual problem?
0
what is the answer in the inheritance?
Fill in the blanks to declare a ''B'' class with its own constructor and a ''D'' class with its own constructor, where ''D'' inherits ''B''.
B {
public:
() {
cout << "B's constructor"; }
};
class D : B {
() {
cout << "D's constructor"; }
};
B this D class public protected
please tell me answer now
0
tell me the answer
0
Drag and drop from the options below to declare a protected member in the Base class and to access it from the Derived class' ''foo'' function.
Base {
:
int baseVar;
};
class Derived : Base {
public:
void foo() {
baseVar = 12;
}
};
0
Drag and drop from the options below to declare a protected member in the Base class and to access it from the Derived class' ''foo'' function.
Base {
:
int baseVar;
};
class Derived : Base {
public:
void foo() {
baseVar = 12;
}
};
0
Drag and drop from the options below to declare a protected member in the Base class and to access it from the Derived class' ''foo'' function.
Base {
:
int baseVar;
};
class Derived : Base {
public:
void foo() {
baseVar = 12;
}
};
public protected foo class Base Derived
0
the answer will be like this
class Base {
protected:
int baseVar;
};
class Derived : public Base {
public:
void foo() {
baseVar = 12;
}
0
Drag and drop from the options below to define a constructor and a destructor for the ''Mother'' class.
Mother ::Mother() {
cout << "constructor" << endl;
}
Mother::~Mother () {
cout << "destructor" << endl;
}
0
''Mother'' class.
Mother ::Mother() {
cout << "constructor" << endl;
}
Mother::~Mother () {
cout << "destructor" << endl;
}
0
drag and drop from the options below to delow to declare a protected member in the base class and to access it from the derived class'"foo" function.
Class base{
Protected:
Int basevar;
};
Class derived: public base{
Public:
Void foo(){
basevar=12;
}
};
0
Fill in the blanks to declare a class Student which inherits from the Human class.
Human {
constructor(name) {
this.name = name;
}
}
class Student
Human {
constructor(name, age) {
(name);
this.age = age;
}
}