SCJP, SCJD
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
SCJP, SCJD
Personally I would go a step further, and have a separate class for the locking as well. But that is my personal choice.
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.
Clarity and Maintainability
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. Code complexity, including nesting depth, argument passing, and the number of classes and interfaces, should be reasonable.
"Life is like playing a violin in public and learning the instrument as one goes on."<br /> <br /> - Samuel Butler
Absolutely!Originally posted by Czarak Ynehac:
Firstly let me say I belive you could pass SCJD with flying colours with either using the facade pattern in relation to Data and locking/file handling or by putting all this code into your Data class.
I think it can be readily argued that having separate classes will make the design clearer .From the instructions:
Clarity and Maintainability
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. Code complexity, including nesting depth, argument passing, and the number of classes and interfaces, should be reasonable.
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
SCJP, SCJD, SCWCD, OCPJBCD
Originally posted by Mihai Radulescu:
PizzaHut - here I order (sometimes) Pizza
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Consider Paul's rocket mass heater. |