Questions tagged [implements]

`implements` is a keyword in several programming languages used to denote implementation of an interface.

implements is a keyword in several programming languages which support OOP (such as Java or PHP) used to denote interface implementation (as opposed to extends used to denote implementation inheritance).

Related

404 questions
0
votes
2 answers

Implementing Interface from C# to VB.NET

I had downloaded a C# project and wanted to work on VB.Net so I decided to convert that from C# to VB.NET and I encountered some problems when it came to implementing interfaces. I keep getting errors in VB.NET about implementation about how I must…
Zer0
  • 1,002
  • 1
  • 19
  • 40
0
votes
1 answer

Magento: Admin Form Contains Abstract Method -> Error

I'm getting following error when I acces my form: Class MP_Search_Block_Adminhtml_Option_Edit_Tab_Form contains 1 abstract method and must therefore be declared abstract or implement the remaining methods…
mpfmon
  • 185
  • 12
0
votes
1 answer

ArrayList with Objects which implements an Interface

I want a ArrayList, where you can add Objects , which implements an Interface. Something like this: ArrayList list = new ArrayList(); What is the correct syntax for this?
user4937236
0
votes
2 answers

Automatically implementing an interface for wrapping an existing implementation

I have a class A that implements interface IA: class A : IA { f(){...} } I want to wrap A using a new class WrapA that will implement IA as well, with the intention of wrapping A by calling each one of its functions as a new task: class WrapA :…
Mugen
  • 8,301
  • 10
  • 62
  • 140
0
votes
1 answer

Implementing FileTable

I've got a quick question which I hope I can get some help with. I need to create a database and then implement File Tables for the following text files: testFile1.txt testFile2.txt testFile3.txt Once this process is finished, I simply have to…
nica_cher
  • 11
  • 4
0
votes
3 answers

Int value does not change after calling method

After calling doReading(),the value of pages is supposed to change, but it does not. Is it possible to do this without declaring int pages; in the MyMath2 and MyScience2 classes. The output should be something like: Before reading: Math- must read 5…
apsstudent
  • 89
  • 1
  • 10
0
votes
2 answers

Does Implements works only with interfaces?

Learning a little-bit about java Interfaces and Implements made me question , if Inheritance works only with classes does the Implements work only with Interfaces , or it may has another uses? Does java has to offer us "built-in" Interfaces that…
homerun
  • 19,837
  • 15
  • 45
  • 70
0
votes
1 answer

Implementation of a Nested Interface of a Subclass

In Java, can a class implement an interface nested in one of its sub-classes?
0
votes
1 answer

error when adding GPS library admob

the error is : The type AdListener cannot be a superinterface of FlyingPanda; a superinterface must be an interface public class FlyingPanda extends Activity implements AdListener { where is the problem i try to replace the implements kyeword…
0
votes
1 answer

design pattery strategy with access to parent class

I want to implement the strategy design pattern using php: interface dummy_function { public function render(); } class a implements dummy_function { public function render() { echo "class a\n"; // I want to acess…
Marco
  • 3,470
  • 4
  • 23
  • 35
0
votes
1 answer

Do interfaces just DESCRIBE what implemenations need to do?

I'm just learning about PHP's interfaces as I have never really used them before, but as I understand it they are only a interface, as they are called, to kind of uphold how classes that implement them are structured? So for example, if you wanted…
Brett
  • 19,449
  • 54
  • 157
  • 290
0
votes
4 answers

How to create interface to two class and mark methods, which I can use?

class Rifle { void shoot() { System.out.println("rifle shoot"); } void reload() { System.out.println("rifle reload"); } void onlyRifle() { System.out.println("rifle!"); } } class Shotgun { void…
Artik
  • 153
  • 4
  • 14
0
votes
2 answers

Implement Serializable to a class implementing an Interface

I have this super class named Person which is inherited by two other classes, Employee & Client I am using an interface so as I can use generics on the two sub classes and hence the Person class implements this interface, Searchable. Is it possible…
0
votes
1 answer

My class implements interface with methods. which arent implemented but no errors

I've created dao class that implements an interface with two methods. None of them are implemented in that dao class. I am getting no errors. Everything compiles and works. What am I doing wrong? Here's my dao class: package…
masterdany88
  • 5,041
  • 11
  • 58
  • 132
0
votes
2 answers

same method signature in interface and class

interface TestInterface { void work(); } class TestClass { public void work(){ System.out.println("Work in CLASS"); } } public class Driver extends TestClass implements TestInterface { public static void main(String[] args)…
Omar.Nassar
  • 379
  • 1
  • 3
  • 14