Ok, I just want to understand if there was a way to avoid downcasting or "if" statements, in order to ensure the right use of the system just with the Java compiler.
Thank's for the tips!
Bye
And so class CarType1 like:
public class CarType1 extends Car {
private DriverType1 driver;
setDriver (Driver _driver) {
driver=(DriverType1)_driver;
}
getDriver (Driver _driver) ...
}
Simply I'd like to avoid the downcast.
Ok. In this way I will have a method in Car such as setDriver(:Driver).
I just think about this solution.
But in subclasses CarType1 and CarType2 I will have to put a method with the same signature, and I would like instead methods like setDriver(:DriverType1) and setDriver(:DriverType2) but in...
Hi.
A question about relationship between subclasses of two hierarchies.
If I have two hierarchies, where root classes are, for example: Car and Driver. Subclasses are CarType1,CarType2 and DriverType1,DriverType2.
I want to model a relation such as "drive" or "is driven by", but I want to say...
...sorry.
In the first question:
...A "Reader" class will be associated to each "EPeople"
is wrong, I mean:
...A "Reader" class will be associated to each "EPerson"
...Your idea works in the same way?
I mean:
...Your idea works also in this situation?
bye
Thanks Gil.
I'm astonished for the quality and the speed of your response... I'm not an expert, and so my judgement could not be so important but I loss days on this problem without getting a so functional solution. My problem, I think, was my typical object-oriented newbies approach: I look...
I have an installation of DSpace, a MIT open-source software that manages self-archiving. I need to implement a subsystem on it in order to introduce quality control. The requirements of the subsystem are explained in the paper www.dimi.uniud.it/~mizzaro/research/papers/EJ-JASIST.pdf. I have...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.