Recent Question/Assignment

COIT11134 Object Oriented Programming (T2 2016)
Assignment 2
Due date: Friday of Week 10 (20 May 2016) 11:45 pm AEST
Weighting: 20%
Length: N/A
Objectives
• Develop a Java GUI application using layout managers
• Develop an application that uses two or more classes
• Read and/or write from/to text files
• Use search algorithms and/or sort algorithms
• Use ArrayList or LinkedList or any other data structure
General
In your assignment 2, you can continue to develop the Java GUI application that you have created in your assignment 1. If you would like to modify the codes that you have submitted in your assignment 1, you are free to do so. You can adopt any layout pattern as suitable to the requirements of the application in your assignment 2.
Assignment Task specification
CQPC has decided to increase the charges for General pest control, Termite Inspection and Termite control fill jobs by charging additional charges depending on the number of rooms and halls in the customer’s premises. The following table provides the details relating to the additional charges:
Additional charges
$10 for each room
$15 for each hall
No additional charges for any other areas such as kitchen, bathroom, etc.,
In order to include these additional charges in the Java GUI application, you may need to do any or all of the following:
• develop additional Java classes
• extend the existing Java classes that you have developed for your assignment 1
• implement newly created interface(s)
CQPC also wants to view the income generated by different contractors. Hence, you need to store the details of all the contract works performed in a file and also to provide appropriate searching facilities to display the details of contract work(s) that have been performed by the selected (searched) contractor. You can assume that CQPC gives contract works only to three or four pre-listed contractors whose details are already available (names of the contractors are left to your choice).
Hence the software application that you will develop in assignment 2 should perform the following:
1. When the application is started, it should read all the completed contract works’ details from the existing text file (“pest.txt”) and display the latest-completed-contract work.
2. The application should provide necessary controls to search and display the details of contract works performed by a given/selected contractor (details to be obtained/selected from/by the user). If the search criterion is not met then an appropriate message has to be displayed.
3. The application should provide appropriate controls on the screen to obtain the data for a new contract work; perform error checking and display the details of new contract work. You are allowed to copy the relevant codes from your assignment 1 and use them for this purpose.
4. The application should have the facility to append/save the details of newly performed contract work in the same text file (“pest.text”).
You are allowed to have additional controls that are required and to develop your own layout for the assignment 2. For your help in developing the Java application, a java file will be available later (around week 7) in your course web-page. It is not mandatory but the source codes from that java file can be used by you as part of your assignment 2 development. Please note that you may need to add/delete/modify the existing codes, methods, etc., in that java file so that your application performs appropriately including meaningful error/exit messages required if any. Please note that you also need a text file “pest.txt” with appropriate contents for running the GUI application initially.
Note: If you need to make suitable assumptions for the development of the above Java application, please provide them in the form of comments in the test driver file.
Assignment submission
1. You have to submit your assignment using the Moodle online submission system.
2. You have to submit a zip file containing the text file “pest.txt” and all java source code files including the test driver file (any additional library/jar files used if any).

Assignment 2 Marking criteria
Item Description Maximum
marks
1 GUI displays (2) details of the latest-completed contract work after reading (2) from the file “pest.txt” without any compilation/ run time errors 4
2 Allows to search (1) and displays the details of contract work(s) performed by the given contractor (1) 2
3 Displays appropriate message when the above search criterion is not met 1
4 GUI displays the controls for new contract work data entry (including number of Rooms and Halls) 2
5 GUI displays the controls for selection of type of pest control jobs performed in the new contract work 2
6 Calculates total charges correctly for the new contract work 2
7 Performs input validation (1) and displays all the details of a new contract work(2) 3
8 Saves/appends the details of new contract work into the file “pest.txt” 2
9 Quality of code (comments, constants, indentation, naming, readability, etc.,) 2
Less late penalty (5% per calendar day)
Less Plagiarism
Total 20
Note: If the program does not compile / run, partial marks may be given appropriately based on the submitted-source codes.