• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

NX:Am I allowed to modify the "DBMain" interface?

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I am working on the URLyBird and I have a question after having
a look at the interface "DBMain", which is the only given java
codes. Are we allowed to modify this interface such as by adding
more methods and more exceptions? I believe it is possible since
it's not written anywhere that we are not allowed to do so.
Thanks in advance for the reply!
Sang-Wook
 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My instructions state: "Your data access class must be called "Data.java", must be in a package called "suncertify.db", and must implement the following interface: ". So I'd say no, you can't modify it.
Charlie
 
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kim,

Originally posted by Sang-Wook Kim:
Hello,
I am working on the URLyBird and I have a question after having
a look at the interface "DBMain", which is the only given java
codes. Are we allowed to modify this interface such as by adding
more methods and more exceptions? I believe it is possible since
it's not written anywhere that we are not allowed to do so.
Thanks in advance for the reply!
Sang-Wook


Nope(Its not advisable). If you want to add any helper methods and other exceptions, you can extend the given interface and add additional methods and exceptions to new interface.
A -- Sun provided interface.
B -- Your interface.
C -- Data class.
You can do somewhat like this...

You can add to B as you wish.
Good Luck
 
Sang-Wook Kim
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Charlie, Satish,
Thank you for your replies! So I should leave "DBMain" as it is.
Thanks again and good luck!
Sang-Wook
 
Satish Avadhanam
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Sang-Wook Kim:
Dear Charlie, Satish,
Thank you for your replies! So I should leave "DBMain" as it is.

Yep

Thanks again and good luck!
Sang-Wook

 
Poop goes in a willow feeder. Wipe with this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic