as my understanding is we should only use the methods in the Data.java interface supplied in the assignment and not introduce new ones.
Roel De Nijs wrote:So creating your own method is 1 possibility. Another possibility would be to call read-method for each recNo returned by the find-method.
Cheers, Roberto Perillo
SCJP, SCWCD, SCJD, SCBCD
I am working on GUI start up I want to get all Rooms from the data file to populate in the GUI table.
There is a find(String [] criteria) method which if the array parameter is null should return all records, but problem is it only returns the int recNos. I need to get the entire details of all the records niot just the recNo......
I dont want to maintain maps or data in the GUI package as I believe this is not good practice.
I suppose I could create a new method similar to find that returns String [] array or even a Room object but is there a problem with this, as my understanding is we should only use the methods in the Data.java interface supplied in the assignment and not introduce new ones.
Fernando Franzini - Java Blog
SCJP 6.0 , SBCD (Preparing..),
MSc Enterprise Systems Development, BSc Computer Science
You may assume that at any moment, at most one program is accessing the database file
The Great King of Belgium (Roel) wrote:As far as I know using a record cache together with a singleton Data class with all synchronized methods is the easiest and most simple approach...
Cheers, Roberto Perillo
SCJP, SCWCD, SCJD, SCBCD
In the future, URLyBird wants to move into Internet-based marketing, and hopes to be able to accept bookings direct from customers over the web.
Your user interface should be designed with the expectation of future functionality enhancements, and it should establish a framework that will support this with minimal disruption to the users when this occurs.
You may assume that at any moment, at most one program is accessing the database file
A clear design, such as will be readily understood by junior programmers, will be preferred to a complex one, even if the complex one is a little more efficient.
SCJP 6.0 , SBCD (Preparing..),
MSc Enterprise Systems Development, BSc Computer Science
After all I believe that the puprose of this assignment is to let us explore the possible issues that may arise and how we will resolve them.
There's a way to do it better - find it. -Edison. A better tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|