Questions tagged [overriding]
Method overriding, in object oriented programming, is a language feature that allows a subclass or child class to provide a specific implementation of a method that is already provided by one of its superclasses or parent classes.
overriding
8,166
questions
0
votes
3
answers
29
views
Overriding a variable assigned to an evaluated method in the parent class using a child class
I am new to object oriented programming. I have a parent class in whose constructor I have a variable (bmi in the below example) that requires a method (bod_mass_idx) of the same class to be evaluated ...
1
vote
0
answers
33
views
Android: OnNewIntent overrides nothing
After recent updates to several libraries in my gradle, when I built my project, it gives me these two errors:
1. 'OnNewIntent' overrides nothing
2. 'dispatchKeyEvent' overrides nothing
I see that ...
0
votes
0
answers
15
views
What is the rationale behind "extension by overriding" method of inheritance, as seen in Odoo's http.Controller?
Question:
With regards to OOP inheritance, what is the rationale/use case for extension by overriding as opposed to the standard extension by inheritance?
Regarding OOP, as far as I have learnt, ...
-1
votes
0
answers
30
views
how to call same method from parent and child class using child class object when the argument is same but the implementation is different in child [closed]
class Demo1{
void m1(int a) {
System.out.println(a);
}
}
class Demo2 extends Demo1{
void m1(int a) {
System.out.println(a+a);
}
void m1(int ...
0
votes
0
answers
25
views
Stop callers from accidentally closing CloseableHttpClient
I am configuring a class to manage an Apache HttpClient that will be used application-wide for the lifetime of the application, like the following:
public class HttpManager {
private ...
1
vote
1
answer
43
views
Inherit override-equivalent as different methods
Several methods from interface, super class or new method are override equivalent. I need to make different realization for each. Example:
public interface A {
int f();
}
public interface B {
...
0
votes
2
answers
65
views
Single event handler in c# code for all custom buttons / MAUI .NET8
Simple ContentPage with a lot of buttons on it. I want a single event handler (OnButtonPress) to decode which button was pressed and take a variety of actions. Instead of tediously writing Clicked=&...
0
votes
1
answer
25
views
How to add overrides in "MODULE.tools" file in Bazel?
I want to use a local buildozer Bazel Module while building Bazel from source.
In MODULES.bazel file, I could override the bazel_dep by using local_path_override similar to remoteapis here.
However ...
0
votes
0
answers
14
views
Restrict Kivy FileChooserListView to use double-click to open folder
I'm using Python's Kivy FileChooserListView in a popup, and I want it to require you to double click a folder to open it more like in Windows, but I cannot figure out how to do it.
The problem is that ...
0
votes
0
answers
26
views
Resource Override Python
I am using Chrome Resource Override extension in portable chrome. I am using Selenium Python in the project. But now I need to remove this extension. Can I do it using only Python? Can you help me?
I ...
1
vote
1
answer
42
views
Parameter Overriding
How and where do I perform parameter override to this question?
While I try to override it using #, I am receiving a warning stating that the port size does not match to the inputs and outputs or the ...
2
votes
2
answers
131
views
Why does a "new" method block overriding?
public class A
{
public virtual void Write() { Console.Write("A"); }
}
public class B : A
{
public override void Write() { Console.Write("B"); }
}
public class C : B
{
...
-3
votes
1
answer
59
views
Cannot override method retainAll() of java Collection Interface [closed]
I am trying to implement the Collection interface of the java.util package by class ImplementCollectionInterface. Here the java compiler is giving an error:
ImplementCollectionInterface is not ...
0
votes
0
answers
33
views
Override of product sorting in a back office order
I'm on prestashop 8.1.2 and I'd like to create a custom order for displaying the products of an order in the backoffice.
I realized that this sorting was done in the handle() of the file src\Adapter\...
0
votes
0
answers
29
views
Webapp in blazor webassembly, alow to modify Json through Edge option Override content and pass the process
In a Webapp in blazor webassembly, the option on Edge navigator Devtools / "Override content" allow to modify the json file and pass the process.
Exemple :
I recieved from a call API a ...