• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Comments of the given interface

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,


I received my assignment about two weeks ago, and I have only read it so far (lack of time). However, I was wondering if we may (or not) rewrite the comments of the given interface to make them standard javadocs? I don't want to stupidly lose points because I reformatted them; but if I have the possibility, I'd better reformat it completely.
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Olivier,

Welcome to the JavaRanch and good luck with your assignment!

Because I created my own interface (which extends Sun interface to meet the must requirement) I left the comments in the given interface as-is and overrode all methods from the given interface and in my interface I added my javadoc comments.
I think you can change the comments into javadoc style in Sun's interface as long as you don't change any method signatures of course.

Kind regards,
Roel
 
Ranch Hand
Posts: 206
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Roel,

The quote below is an excerpt from the SCJD assignment which I downloaded on December 15th.


Sun Certified Developer for the Java 2 Platform: Application Submission (Version 2.2.3)

Bodgitt and Scarper, LLC.

Server

Required Interface

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 DBAccess
{




I have added some public methods to my Data class implementation (getters) that I want to use when I invoke getSingleton() and receive the instance of my Data class. So, I extended the DBAccess interface, and declared the getters in the extended interface. My question is the following: does my Data class have to directly implement the DBAccess interface? I don't have a must requirement to extend the DBAccess interface. May I extend the interface anyway?

Thanks,

Harry
 
Olivier Gregoire
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Roel De Nijs wrote:Hi Olivier,

Welcome to the JavaRanch and good luck with your assignment!

Because I created my own interface (which extends Sun interface to meet the must requirement) I left the comments in the given interface as-is and overrode all methods from the given interface and in my interface I added my javadoc comments.
I think you can change the comments into javadoc style in Sun's interface as long as you don't change any method signatures of course.

Kind regards,
Roel



Thank you for your response!

Of course, I don't change any method signatures and I don't add/remove methods.

Regards,
Olivier
 
Roel De Nijs
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

This is what I did (and I, and many others, did pass with this approach):So you are not violating any must requirement, because your Data class is implementing DBAccess. The test (Data instanceof DBAccess) will always return true.

@Olivier: no need to quote an entire post. just use it to quote 1 or 2 sentences which you want to refer to in your reply.

Kind regards,
Roel
 
Harry Henriques
Ranch Hand
Posts: 206
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Roel. I did what you did.

Regards,

Harry
 
Cob is sand, clay and sometimes straw. This tiny ad is made of cob:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic