RECENT ASSIGNMENT

Tweet Share WhatsApp Share
GET ANSWERS / LIVE CHAT


Assessment details for ALL students
Assessment item 2
Due date: 18 September 2014 ASSESSMENT
Weighting: 30%
1
Objectives
The objective of this assignment is for students to:
? Demonstrate an understanding of object-oriented programming concepts, LinkedList/ArrayList,
GUI with menus, sorting algorithms, searching algorithms and reading/writing data from/to a file.
? Develop and test Java applications.
? Evaluate algorithms, data structures and program designs used in developing Java applications.
Assessment Task
Your task is to develop a Java Application that allows the user to read the book title, isbn number,
author name and price from a text file (BookData.txt), save data in a file (NewBookData.txt), display
data in a text area, sort data by the book name and search data by the book price.
The application’s GUI components should consist of a menu bar containing 6 menus (Read File, Save
File, Display Data, Sort Data, Search Data, Help) and a text area (Display Area for Books) as shown
below.There are six menus (Read File, Save File, Display Data, Sort Data, Search Data, Help). Each of the
first 5 menus (Read File, Save File, Display Data, Sort Data, Search Data) contain a single item
(Read, Save, Display, Sort, Search) and Help menu contains 2 items (Help, Exit). The menu items are
described below.
Read File?Read: Reads the data from BookData.txt (see format of this file below) and stores the
data in a Linked List or an ArrayList. The application must use appropriate exceptions to deal with
problems during the file opening (e.g. what to do if file doesn’t exist).
The file contains ISBN number (String), first author name (String), book title (String) and book price
(double). A sample file format for BookData.txt is as follows.
Java Programming, 978-0-13-678-333, Jim Anderson, 89.95
Java How to Program, 897-9-18-677-222, Paul Deitel, 120.50
Save File?Save: Saves all the data from ArrayList/LinkedList to NewBookData.txt file. The new file
only contains author name, book title and price. It also contains the total number of books. The format
for NewBookData.txt file is as follows.
Jim Anderson Java Programming 89.95
Paul Deitel Java How to Program 120.50
Total Books: 2
The application must use the appropriate exceptions to deal with problems during the file saving.
Display Data?Display: Displays all the data from ArrayList/LinkedList in the display area as shown
below.
Sort Data?Sort: Sorts data by the book name in ascending order using the best sorting algorithm
covered in COIT23001 course and displays sorted data in the display area as shown below. You are
not allowed to use any built-in sorting algorithm.Search Data?Search: Asks the user to enter a book price via a dialog box as shown below and uses
the best searching algorithm covered in COIT23001 course to search for the given book price. It
displays appropriate message found or not found in display area.
Help ? Help: Provides instructions to user via a dialog box on how to use the application and
displays the user’s details (e.g. contact person and email) for further help.
Help ? Exit: Allows the user to exit the application.
Data Validation
Input data validation for the Book Price entered to search is required. If no book price is entered or
entered book price is less than $1 and OK button is pressed then the application will pop out a
message box with an appropriate message.
Data Structures & Algorithms
You must use:
? LinkedList or ArrayList for storing book object.
? Best searching algorithm (based on your analysis) covered in COIT23001 course for searching.
? Best sorting algorithm (based on your analysis) covered in COIT23001 course for sorting.
? Two classes to implement the application. One class, named Book which describes an individual
Book (fields such as ISBN, Author, Title, Price and get and set methods) and another class named
BookApplication which contains GUI with components and methods for sorting, searching and
file processing.
? Appropriate fields and methods to store/process book data.Evaluation and Analysis of Data Structures and Algorithms
? You must justify the reason for selecting the data structure (ArrayList or LinkedList). Why do you
think that the data structure used by you is the best data structure for your application? Write
maximum 2-3 lines to answer this question in Report.docx.
? You must justify the reason for selecting the sorting algorithm. Why do you think that the sorting
algorithm used by you is the best sorting algorithm for your application? Write maximum 2-3
lines to answer this question in Report.docx.
? You must justify the reason for selecting the searching algorithm. Why do you think that the
searching algorithm used by you is the best searching algorithm for your application? Write
maximum 2-3 lines to answer this question in Report.docx.
? You must run your application 3 times by increasing the data each time (e.g. 5 books, 50 books,
500 books) and compare time for sorting algorithm. Write in Report.docx, the time taken to sort
in each case.
? You must run your application 3 times by increasing the data each time (e.g. 5 books, 50 books,
500 books) and compare time for searching algorithm (use same search key each time). Write in
Report.docx, the time taken to search in each case.
Implementation Platform
You must implement your program in Java using TextPad Editor which is available in University’s
computing labs and may also be downloaded from the following site:
http://textpad.com/download/index.html
Assignment Submission
You MUST show your tutor the progress (Book.java and BookApplication.java files) in Week 9
Tutorial and Week 10 Tutorial. If you are a distance student, you need to contact the course
coordinator by e-mail.
You MUST submit on 18 September the following files using the Moodle online submission system.
? Book.java - Source code for Book class (fields, constructor, get and set methods)
? BookApplication.java - Source code for class with GUI components, sorting method, searching
method, reading/writing from/to file methods, etc.
? Report.docx – Results of comparing data structures and algorithms as mentioned above (see
section Evaluation and Analysis of Data Structures and Algorithms).
Warning: You must submit your own assignment and correct files.Assessment Item 2 Marking criteria
Total Marks – 30 Marks Allocated
1 GUI implementation and presentation (menus, display area, etc.) 4
2 Read data 2
3 Display data from file 2
4 Save data to file 2
5 Sort data/algorithm 3
6 Search data/algorithm 3
7 Help and Exit 1
8 Input validation and pop out message box 2
9 Design – fields, classes, objects, methods 4
10 Quality of code (comments, indentation, naming and readability) 2
11 Report
Quality (content, presentation, language) (1 mark)
Reason for selecting data structure ArrayList or LinkedList (1 mark)
Reason for selecting the best sorting and searching algorithms (1 mark)
Time comparison/analysis of sorting and searching algorithms (2 marks)
5
12 Late submission penalty is 5% of total mark per day -1.5/day
13 Penalty for using things not covered in lectures and tutorials -3



GET ANSWERS / LIVE CHAT