• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

B&S: Some thought and clarifications

 
Saheed Adepoju
Ranch Hand
Posts: 267
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
I have been succesfully able to read the data file and obtain the records and display them and right now i really need a bit of directions!And also i read my specs and i would like to share my interpretations!First i would like to discuss how i would like to carry on with the rest and ask for some advice:
1) I would like to create a contractor class that would have a bunch of setters and getters that would save each information from the fields of a record obtained from a Dataschema that i would like to create as a singleton within the data class(I am totally new to Design patterns but i have loads of ideas from this site and also a book on design patterns)! I would then create an object of the contractor class(which would include the byte flag and also the owner) and store them up in a Map using the byte flag to Map to the individual records(So as to know which is valid and which is not)! What do you guys think?
Next my liitle thought
In my specs it says:
The IT director does not anticipate much reuse of the first Java technology system, but intends to use that system as a learning exercise before going on to a web based system.


Since he doesnt require the reuse of the first Java Technology it is safe to assume one could decide to hard-code the columns of the JTable or make it dynamic isnt it? But i intend to get the column names from the DataSchema singleton; am i on the right track?

Next I noticed a little funny phrase and i am sure everyone would jump at me when i sayt this: My specs reads:

The company's IT department has a data file that contains the essential information for the company, but because the data must continue to be manipulated for reports using another custom-written application, the new system must reimplement the database code from scratch without altering the data file format.

Strange enough it never said we must implement the given interface, it just said we must reimplement the database code from scratch wihout altering the data file format! Meaning you cant alter the data file but could add to or change the interface, even though i am sticking to the given interface and not changing a thing

One last thing i also saw was the following section in the specs:
A data access system that provides record locking and a flexible search mechanism

It never mentioned whether it was on the client side or on the server side!So it means it could be anywhere, either exposed to the client or not!

Well i could have misinterpreted the specs or might sound abit confused!But that why we are all here! I await an insight from this lovely community about my interpretation of my specs and also how i wanna continue! Have a lovely day!
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12014
220
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Saheed,

I would like to create a contractor class that would have a bunch of setters and getters that would save each information from the fields of a record obtained from a Dataschema
Take a look at the Value Object design pattern or the Transfer Object design pattern - sound familiar?

I would then create an object of the contractor class(which would include the byte flag and also the owner) and store them up in a Map
Sounds like a database cache - something that is discussed regularly here - many candidates implement one.

Since he doesnt require the reuse of the first Java Technology it is safe to assume one could decide to hard-code the columns of the JTable or make it dynamic isnt it?
You could do that. However just because they don't need it doesn't mean that you cannot implement a more flexible solution. If you did decide to hard code the columns, then I would think you should document why you chose to do this so that the assessor knows that you did consider and reject other solutions.

Strange enough it never said we must implement the given interface
Don't you have the instruction: "Your data access class must be called "Data.java", must be in a package called "suncertify.data", and must implement the following interface:"?

It never mentioned whether it was on the client side or on the server side!So it means it could be anywhere, either exposed to the client or not!
Take a look at Should lock methods be callable by the client for various interpretations of bits of the spec that might agree or disagree with your interpretation .

Regards, Andrew
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic