GeeCON Prague 2014*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes GUI question on contractor project Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "GUI question on contractor project" Watch "GUI question on contractor project" New topic
Author

GUI question on contractor project

Daniel Shihh
Greenhorn

Joined: Aug 16, 2013
Posts: 2
Dear all,

I've started looking into GUI requirement so I can start implementing it. As read from the document, the gui requirement section only states that "book" and "search filter", "search result tables" are "must" items. My concern is that none of them uses the dao (Data.class) functions such as deleteRecord, createRecord. Would it be fine to not use them on the UI?

The link below helps me out a lot. I think I will pick the Java performance tuning course. The not necessary item designed in that GUI are "Unbook", "select all" only, right?

http://www.coderanch.com/t/559696/java-developer-SCJD/certification/GUI


Although there are functionality (such as delete record, create record, unbook) that are not mentioned in the GUI requirement section, I am worried that I would get many points deducted if I don't have them in. I guess I am concerned because in background section, it says this app. is intended for "customer service representatives". So it implicitly implies, these audience should be exposed to all functionalities

A word of advice will be appreciated
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2452
    
    8

Welcome champ.

From my understanding, you need to implement ALL methods (including create, delete, unbook etc) in the Data class.

As for the UI, ask yourself this question: How would you test it if such and such function work? Testing using the UI vs testing using the Data class is something you should consider. But then you will need to do some extra screens/forms for create.

For me, I had create, book/unbook, search, delete in my UI.


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5 OCPBCD5
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5299
    
  13

That's an easy one.

You must implement the Data class, so every method should be implemented.

The GUI section only has 2 requirements: book and search. So you only need to implement book and search in your GUI. And it's true some of the methods of the Data class will not be used. If you want to test these methods, just write a unit test using one of the testing frameworks (like JUnit or TestNG). In fact you should make sure that your Data class works flawlessly using nothing more than test cases. Once the Data class is finished you can proceed with the next step. That's how I handled the assignment.

Why would you in fact spend time to implement create functionality in your GUI? You won't get extra credits (clearly stated in instructions), you might lose points (because you have a bug) and maybe even the sales representatives won't use the create-functionality you provided, because insertions of new records is done through a batch job (so your create-function is useless)


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 762
Look at the test created by Roberto:
http://www.coderanch.com/t/427863/java-developer-SCJD/certification/Tests-Data-class-locking-mechanism

When you run your test, run it without your GUI to make sure your locking mechanism works.

For me, I only have search button and book button. There is no requirement for unbook. Once a record is book, a customer id is input next to the record in the GUI. That is all you need.

As a friendly reminder, unbook is different from unlock a record.
The lock and unlock method make sure no 2 threads access the same record at the same time during a booking process.
Daniel Shihh
Greenhorn

Joined: Aug 16, 2013
Posts: 2
Dear all,

Thanks for the clarification. Now I know the "must" items (explicit written) in the documentation are really the only things need to focus on.

Thanks once again
 
GeeCON Prague 2014
 
subject: GUI question on contractor project