Hard
Given a class A that implements a method to record the values of the class members in a database. Given a class A1 that inherits from A and a class A2 that also inherits from A.
You must develop as quickly as possible, and with the least code possible, a program that allows the recording of the data of an instance A, an instance A1 or an instance A2 in a database. How will you proceed? (two choices required)
Author: Eric HostaleryStatus: PublishedQuestion passed 1347 times
Edit
3
Community Evaluations
Auteur anonyme
05/06/2023
It looks like a bug, send us a mail to [email protected] with a screenshot and more information if it happens again !
Similar QuestionsMore questions about OOP
13
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
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?7
Can we extend an abstract class in Java?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);3
Can an interface inherit from another interface?