Archived
Among the following propositions, which are the basic principles of OOP ?
-1
Community Evaluations
Auteur anonyme
28/04/2023
C'est une très mauvaise question, ou une très mauvaise traduction. Toutes les réponses conviennent, son redondantes si l'on en choisi plusieurs et/ou manquent de concepts quand on en choisi une seule.
9
You need to develop a class for which there should be only one instance throughout your application. Which design pattern should you use for this?14
Is the following code valid?
class Person {
constructor(name, age) {
this.name = name;
this.age = age;
}
}
const person = new Person('John', 20);
console.log(person.name);
console.log(person.age);4
Can an interface inherit from another interface?5
Is the following code valid?
class Person {
constructor(name, age) {
this.name = name;
this.age = age;
}
}
const person = new Person('John', 20);
console.log(person.name);
console.log(person.age);8
Can we extend an abstract class in Java?4
Which design pattern allows to dynamically add responsibilities to an object?4
Is the following code valid?
class Person {
constructor(name, age) {
this.name = name;
this.age = age;
}
}
const person = new Person('John', 20);
console.log(person.name);
console.log(person.age);