Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

B&S: Specs Question

 
Saheed Adepoju
Ranch Hand
Posts: 267
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
I just picked up my assignment again yesterday and analysed it again and i need some clarifications regarding my requirements!
1)
when i read in the records i found out that i had 29 records, so i suppose the 0th postion is the first record and so on and so forth?

// Deletes a record, making the record number and associated disk
// storage available for reuse.
// Throws SecurityException if the record is locked with a cookie
// other than lockCookie.
public void delete(int recNo, long lockCookie)

What exactly is the use of the delete function? I am assuming is used to just delete a record in file?I know most people make use of an unbook method while using an Adapter pattern, is this what is used while unbooking?


// Modifies the fields of a record. The new value for field n
// appears in data[n]. Throws SecurityException
// if the record is locked with a cookie other than lockCookie.
public void update(int recNo, String[] data, long lockCookie)


Is this the method used to book a contractor? If this is so does it not mean all we all to do to book a contractor would be to just write to the field of the owner and we have a booking? If not what method do we need to book a contractor?(Sorry if i am asking the same question twice)


All text values, and all fields (which are text only), contain only 8 bit characters, null terminated if less than the maximum length for the field. The character encoding is 8 bit US ASCII.

My confusion in the above statement is in respect to the null terminated What does this mean? I have seen intances where candidates say this is wrongly specified? How would get to know if mine is null terminated or space terminated(As show as most candidates)?

Next i would like to discuss some pseudocode concerning my approah to reading all the necessary records, i intend to use the Value-Object pattern! Here it goes:
Do i use this approach

Or this approach:






I would like to put the Contractor Objects within a Map(Maping the record values to the associated Objects).

I dont know if my approch is good, but i would reallt love a directional push! Anyways i would appreciate your efforts in helping me out! Thanks!

Apologies if i might sound abit confused! I am still learning!


[ October 11, 2005: Message edited by: Saheed Adepoju ]
 
Seb Mathe
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Saheed,

I think you're a little bit impatient...

What I can say about your questions is :
- raf.seek(5) will not search the 5th record !!
- look at an ASCII table to find the code of the NUL character
- revisit Value-Object pattern, i've not understood your question about it. (Is it time to talk about design patterns ?)

I've beginning working on B&S assignement 2 weeks ago, and none of my design choices are definitively made. Try, test, read specifications carefully, and search here when you have doubts (Pay attention, most of the time, you search an answer, you find two questions ! )

At this point of my work, I've a "prototype" of an application (I can read the file, display contractors, ...), I know I'm far from my final solution.

I'm currious about knowing your B&S version, (mine seems to be diffrent...)
 
Saheed Adepoju
Ranch Hand
Posts: 267
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks alot for your reply! I guess you are right! I will just keep hard @ it! I am sure i will get to a point where i will figure it out! My assignment version is 2.1.1! Curious as well, what's your assignment version
 
Seb Mathe
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've B&S 2.3.3

I don't have the lockCookie number...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic