• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

URLyBird - 'Your data access class must be called "Data.java"'

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody,

My assignment is URLyBird 1.2.3

There is a very strange request:

"Your data access class must be called 'Data.java', must be in a package called "suncertify.db", and must implement the following interface" (DBAccess)

The very important thing is this request is a MUST. But having a class named 'Data.java' means 3 possibilities:

a)a wrong request from SUN - but this is a MUST so I cannot suppose this is a SUN's mistake.

b) I can define class "java" in package suncertify.db.Data - this means to not use Java Code Conventions.

c)more like, having a class named Data in package 'suncertify.db' and this class has a static inner class named 'java'

The difference between b) and c) is that the last one really defined that class in the specified package 'suncertify.db'.

Bot b) and c) means loosing some credits. But to not defined class Data.java (in a file named Data.java, of course) means failing the assignment.

Of course, I could send an email to who2contact@sun.com to ask about it but is possible that I do not receive an answer.

Please, comment this.

Regards,
Catalin Mihalache

SCJP, SCWCD, SCDJWS
 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What they mean is that you need a class named Data in a package called suncertify.db and have the source file called Data.java. It wouldn't really make sense to have a class called java.
 
Catalin Mihalache
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kah Tang,

Logically, you are right - there is meaning in naming a class 'java'. But SCJD assignment request is very clear: a class named 'Data.java' in package suncertify.db. There is not class named 'Data' but 'Data.java'. And I remember that not respecting a MUST means automatic failure.

My solution is something like :

package suncertify.db;

public class Data {
public static class java {
}
}

I know, is stupid, but it respects a MUST from SCJD assignment.

Regards,
Catalin Mihalache
SCJP, SCWCD, SCDJWS
 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Seriously, just make a class which is called "Data" inside a package called "suncertify.db" and you'll be fine.
 
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
reply
    Bookmark Topic Watch Topic
  • New Topic