Sololearn: Learn to Code
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 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; } }
24th Dec 2019, 9:29 AM
Rana Abid
Rana Abid - avatar
+ 4
class Base { protected : int baseVar; }; class Derived : public Base { public: void foo() { baseVar = 12; } };
29th Dec 2018, 12:44 PM
Shubham Nama
Shubham Nama - avatar
+ 3
class B { public: B () { cout << "B's constructor"; } }; class D : public B { D () { cout << "D's constructor"; } };
24th Apr 2017, 4:18 AM
Kumar
+ 2
#include <string> #include "Birthday.h" class People { public: People(string n, Birthday bo); private: string name; Birthday dateOfBirth; };
31st Jul 2020, 12:00 PM
swapnal mandlik
swapnal mandlik - avatar
+ 1
please helping me the sentense
9th Oct 2018, 4:07 AM
mustafe Adam Mohamoud
mustafe Adam Mohamoud - avatar
+ 1
class Human { constructor(name) { this.name = name; } } class Student extends Human { constructor(name, age) { super (name); this.age = age; } }
5th Aug 2019, 5:12 PM
Aftab Ashraf
Aftab Ashraf - avatar
+ 1
class extends super
16th Sep 2019, 11:35 AM
ISINGIZWE GASANA Aline
ISINGIZWE GASANA Aline - avatar
+ 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
23rd May 2020, 8:23 PM
Shailesh Kumar meena
Shailesh Kumar meena - avatar
+ 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
23rd May 2020, 8:32 PM
Shailesh Kumar meena
Shailesh Kumar meena - avatar
0
do you know how you declare a class, declare a constructor, derive a class? which of those are your actual problem?
8th Jan 2017, 10:23 PM
Gunther Strauss
Gunther Strauss - avatar
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
20th Jan 2017, 2:21 PM
prithika t
prithika t - avatar
0
tell me the answer
13th Jun 2017, 1:22 PM
Aaliyah Buchanan
Aaliyah Buchanan - avatar
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; } };
7th Jun 2018, 7:11 PM
Fahd Badi Abd elhamed Galal
Fahd Badi Abd elhamed Galal  - avatar
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; } };
19th Sep 2018, 6:30 PM
Saroj kumar
Saroj kumar - avatar
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
9th Oct 2018, 4:06 AM
mustafe Adam Mohamoud
mustafe Adam Mohamoud - avatar
0
the answer will be like this class Base { protected: int baseVar; }; class Derived : public Base { public: void foo() { baseVar = 12; }
11th Dec 2018, 9:24 PM
Birhan Tassew Reda
Birhan Tassew  Reda - avatar
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; }
29th Dec 2018, 12:58 PM
Shubham Nama
Shubham Nama - avatar
0
''Mother'' class. Mother ::Mother() { cout << "constructor" << endl; } Mother::~Mother () { cout << "destructor" << endl; }
23rd Apr 2019, 10:04 AM
Farshid Rahimi
Farshid Rahimi - avatar
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; } };
23rd May 2020, 8:14 PM
Shailesh Kumar meena
Shailesh Kumar meena - avatar
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; } }
19th Jun 2020, 4:37 AM
TRINH SON
TRINH SON - avatar