Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Originally posted by PaulSeldon07:
In the interface given by SUN, only seven methods are declared.
Can I insert my own method in this interface, such as
public List<ContractorClass> readAll() throws IOException;
If you can let me know asap, it would be really appreciated.
Vince<br />SCJP(1.4), SCWCD(1.4), SCJD (5.0)
Originally posted by Barry Gaunt:
You cannot add anything to the interface - but I guess you can extend it. Make sure that the original given interface is properly implemented though.
You mayfind it beneficial to search the forum for similar questions. For example:
A past discussion on this topic.
[ January 31, 2007: Message edited by: Barry Gaunt ]
SCJP, SCWCD, SCBCD, SCJD, BB Java2 and JSP1.1
I know many people on this forum has done this and my assignment doesn't say you have to implement DB directly in Data class.[/QB]
SCJA, SCJP (1.4), SCJD
Originally posted by Brian Kelly:
You can't if it says this:
"Your data access class must be called "Data.java", must be in a package called "suncertify.db", and must implement the following interface:
package suncertify.db;
public interface DB"
SCJP, SCWCD, SCBCD, SCJD, BB Java2 and JSP1.1
if (Data extends DB){
PASS;
} else {
NO MATTER WHAT YOU ARE FAIL. EVEN YOU IMPLEMENTED INDIRECTLY.
}
SCJP, SCWCD, SCBCD, SCJD, BB Java2 and JSP1.1
SCJP, SCWCD, SCBCD, SCJD, BB Java2 and JSP1.1
Originally posted by Ken Boyd:
[QB]You can also refer to following thread where people pass with above solution..
https://coderanch.com/t/186750/java-developer-SCJD/certification/Extending-DB-Interface
just plain OO design from my point of view..
I mean it will be shocking if SUN has script which reads
SCJA, SCJP (1.4), SCJD
Originally posted by Brian Kelly:
It does say " Portions of your submission will be analyzed by software; where a specific spelling or structure is required, even a slight deviation could result in automatic failure."
Perhaps it's okay, but I'm not taking any risks with any "must"...
SCJP, SCWCD, SCBCD, SCJD, BB Java2 and JSP1.1
SCJP, SCWCD, SCBCD, SCJD, BB Java2 and JSP1.1
Vince<br />SCJP(1.4), SCWCD(1.4), SCJD (5.0)
"I'm not back." - Bill Harding, Twister
Originally posted by Jim Yingst:
[Ken Boyd]:
I know many people on this forum has done this and my assignment doesn't say you have to implement DB directly in Data class.
[Brian Kelly]:
You can't if it says this:
"Your data access class must be called "Data.java", must be in a package called "suncertify.db", and must implement the following interface:
package suncertify.db;
public interface DB"
If Data implements MyDB and MyDB extends DB, then Data implements DB. Simple. If you want to assume that Sun's testers might not grasp this point (or can't write a decent automated test for this) then you can make it more obvious by writing
Such a redundant declaration is perfectly legal, if a bit silly. But if it alleviates some concerns, what the heck...
[ February 02, 2007: Message edited by: Jim Yingst ][/QB]
SCJP, SCWCD, SCBCD, SCJD, BB Java2 and JSP1.1
Wait for it ... wait .... wait .... NOW! Pafiffle! A perfect tiny ad!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|