473,416 Members | 1,463 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

implement problem


I have an claass that implements another one

public class PatientImpl extends UnicastRemoteObject implements
PatientInterface
In PatientInterface, i have this class
public interface PatientInterface extends Remote
{

public String getPatientNummer() throws RemoteException;
public String getSofiNummer() throws RemoteException;
public String getVerzekeringsMa() throws RemoteException;
public String getPolisNummer() throws RemoteException;
public String getNaam() throws RemoteException;
public String getAdres() throws RemoteException;
public String getPostCode() throws RemoteException;
public String getWoonplaats() throws RemoteException;
public String getGebDatum() throws RemoteException;

}
But i get this error message when i want to implement the interface

PatientImpl.java [11:1] PatientImpl is not abstract and does not override
abstract method getPostCode() in PatientInterface

What is wrong here?
Jul 18 '05 #1
5 4489
Irlan agous wrote:
I have an claass that implements another one

public class PatientImpl extends UnicastRemoteObject implements
PatientInterface
In PatientInterface, i have this class
public interface PatientInterface extends Remote
{

public String getPatientNummer() throws RemoteException;
public String getSofiNummer() throws RemoteException;
public String getVerzekeringsMa() throws RemoteException;
public String getPolisNummer() throws RemoteException;
public String getNaam() throws RemoteException;
public String getAdres() throws RemoteException;
public String getPostCode() throws RemoteException;
public String getWoonplaats() throws RemoteException;
public String getGebDatum() throws RemoteException;

}
But i get this error message when i want to implement the interface

PatientImpl.java [11:1] PatientImpl is not abstract and does not override
abstract method getPostCode() in PatientInterface

What is wrong here?


Exactly what the compiler says. Either PatientImpl should be declared
abstract (probably not what you want) or PatientImpl should contain an
implementation of the getPostCode() method declared in the
PatientInterface interface.

Ray

--
XML is the programmer's duct tape.
Jul 18 '05 #2
Thanks

But the PatientInterface is not abstract, and how do i implement a method,
why cant i declate the whole interface if its not abstract?

Irlan
"Raymond DeCampo" <no****@twcny.rr.com> schreef in bericht
news:ji*******************@twister.nyroc.rr.com...
Irlan agous wrote:
I have an claass that implements another one

public class PatientImpl extends UnicastRemoteObject implements
PatientInterface
In PatientInterface, i have this class
public interface PatientInterface extends Remote
{

public String getPatientNummer() throws RemoteException;
public String getSofiNummer() throws RemoteException;
public String getVerzekeringsMa() throws RemoteException;
public String getPolisNummer() throws RemoteException;
public String getNaam() throws RemoteException;
public String getAdres() throws RemoteException;
public String getPostCode() throws RemoteException;
public String getWoonplaats() throws RemoteException;
public String getGebDatum() throws RemoteException;

}
But i get this error message when i want to implement the interface

PatientImpl.java [11:1] PatientImpl is not abstract and does not override
abstract method getPostCode() in PatientInterface

What is wrong here?


Exactly what the compiler says. Either PatientImpl should be declared
abstract (probably not what you want) or PatientImpl should contain an
implementation of the getPostCode() method declared in the
PatientInterface interface.

Ray

--
XML is the programmer's duct tape.

Jul 18 '05 #3
Please do not top post after the reply has been bottom posted.

Irlan agous wrote:
Thanks

But the PatientInterface is not abstract, and how do i implement a method,
This seems like a very basic question; perhaps English is not your
native language?

A programmer implements a method by including a body for the method in
the Java source file. For example:

public class PatientImpl extends UnicastRemoteObject
implements PatientInterface
{
private String postCode;

// What follows is the implementation of the getPostCode()
// method.
public String getPostCode()
{
return postCode;
}
}
why cant i declate the whole interface if its not abstract?
I'm sorry I do not understand this question.

Irlan
"Raymond DeCampo" <no****@twcny.rr.com> schreef in bericht
news:ji*******************@twister.nyroc.rr.com...
Irlan agous wrote:
I have an claass that implements another one

public class PatientImpl extends UnicastRemoteObject implements
PatientInterface
In PatientInterface, i have this class
public interface PatientInterface extends Remote
{

public String getPatientNummer() throws RemoteException;
public String getSofiNummer() throws RemoteException;
public String getVerzekeringsMa() throws RemoteException;
public String getPolisNummer() throws RemoteException;
public String getNaam() throws RemoteException;
public String getAdres() throws RemoteException;
public String getPostCode() throws RemoteException;
public String getWoonplaats() throws RemoteException;
public String getGebDatum() throws RemoteException;

}
But i get this error message when i want to implement the interface

PatientImpl.java [11:1] PatientImpl is not abstract and does not override
abstract method getPostCode() in PatientInterface

What is wrong here?


Exactly what the compiler says. Either PatientImpl should be declared
abstract (probably not what you want) or PatientImpl should contain an
implementation of the getPostCode() method declared in the
PatientInterface interface.

Ray

--
XML is the programmer's duct tape.



Ray

--
XML is the programmer's duct tape.
Jul 18 '05 #4
Thanks for the pointers!
You are right, english is not my native language. its dutch actually, hehe.

why cant i declate the whole interface if its not abstract?

I'm sorry I do not understand this question.

What i mean by this question is.
PatienInterface is declared like this

public interface PatientInterface extends Remote

I dint declare it as an abstract class, so why does it give me the roor
message that it cant implement an ebstrat method from the interface class
It may be a newbie question, sorry, i want to get off this title.hehe

Thanks
Irlan

Irlan
Irlan agous wrote:
Thanks

But the PatientInterface is not abstract, and how do i implement a
method,


This seems like a very basic question; perhaps English is not your native
language?

A programmer implements a method by including a body for the method in the
Java source file. For example:

public class PatientImpl extends UnicastRemoteObject
implements PatientInterface
{
private String postCode;

// What follows is the implementation of the getPostCode()
// method.
public String getPostCode()
{
return postCode;
}
}
why cant i declate the whole interface if its not abstract?


I'm sorry I do not understand this question.

Irlan
"Raymond DeCampo" <no****@twcny.rr.com> schreef in bericht
news:ji*******************@twister.nyroc.rr.com...
Irlan agous wrote:

I have an claass that implements another one

public class PatientImpl extends UnicastRemoteObject implements
PatientInterface
In PatientInterface, i have this class
public interface PatientInterface extends Remote
{

public String getPatientNummer() throws RemoteException;
public String getSofiNummer() throws RemoteException;
public String getVerzekeringsMa() throws RemoteException;
public String getPolisNummer() throws RemoteException;
public String getNaam() throws RemoteException;
public String getAdres() throws RemoteException;
public String getPostCode() throws RemoteException;
public String getWoonplaats() throws RemoteException;
public String getGebDatum() throws RemoteException;

}
But i get this error message when i want to implement the interface

PatientImpl.java [11:1] PatientImpl is not abstract and does not
override abstract method getPostCode() in PatientInterface

What is wrong here?

Exactly what the compiler says. Either PatientImpl should be declared
abstract (probably not what you want) or PatientImpl should contain an
implementation of the getPostCode() method declared in the
PatientInterface interface.

Ray

--
XML is the programmer's duct tape.



Ray

--
XML is the programmer's duct tape.

Jul 18 '05 #5
Irlan agous wrote:
Thanks for the pointers!
You are right, english is not my native language. its dutch actually, hehe.
OK, it helps to know that. I will point out that your English is better
than my Dutch, so we should probably stick to English anyway. :-)

why cant i declate the whole interface if its not abstract?

I'm sorry I do not understand this question.

What i mean by this question is.
PatienInterface is declared like this

public interface PatientInterface extends Remote

I dint declare it as an abstract class, so why does it give me the roor
message that it cant implement an ebstrat method from the interface class
It may be a newbie question, sorry, i want to get off this title.hehe


When a class implements an interface one of two conditions must be met.
Either
i) the class provides implementations for every method declared in the
interface, or
ii) the must be declared abstract.

HTH,
Ray

--
XML is the programmer's duct tape.
Jul 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Medi Montaseri | last post by:
Hi, I think my problem is indeed "how to implement something like java's final in C++" The long version.... I have an abstract base class which is inherited by several concrete classes. I...
26
by: Oplec | last post by:
Hi, I am learning standard C++ as a hobby. The C++ Programming Language : Special Edition has been the principal source for my information. I read the entirety of the book and concluded that I...
2
by: sys | last post by:
I have a Web service and I want it to implement an interface that I specified, say IService. So my Web service class looks like this public class Service1 : System.Web.Services.WebService, IServic...
6
by: Charles Law | last post by:
This is going to seem like a basic OO question, but it comes up and bites me every now and again. Suppose we have a multi-tiered protocol to implement, what is the logical, OO way to design the...
11
by: Kai-Uwe Bux | last post by:
Hi folks, does anyone see a way to implement the following enum_limits template: template < typename EnumType > struct enum_limits { // first element in range of EnumType: static...
4
by: Peter | last post by:
I want to copy a parent class instance's all datas to a child's. It's actually a C++'s copy constructor. But why the following code does not work - there is a compile error! How it should look...
5
by: Stacey Levine | last post by:
I have a webservice that I wanted to return an ArrayList..Well the service compiles and runs when I have the output defined as ArrayList, but the WSDL defines the output as an Object so I was...
1
by: Paul | last post by:
Hi all, I'm trying to implement IList and keep getting an error when trying to implement GetEnumerator(). My class has a List<String> and I've been using its methods as return types for IList,...
0
by: Benjamin | last post by:
I am attempting to create multiple itterators for a custom class that I have created. Basically I have a class that I am populating using XML de-serialization. I want to be able to loop through the...
8
by: John | last post by:
Hi, gurus, How can I implement the following feature in C#: Set objGroup = GetObject("WinNT://" & strComputer & "/" & strGroup & ", group") For Each objMember In objGroup.Members...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.