Chat with us, powered by LiveChat My Java Assignment | Writedemy

My Java Assignment

My Java Assignment

Question

Assessment details for ALL students

Assessment item 2

Due date: Thursday of Week 11 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 travel booking data from a text file (inBooking.txt), save data in a file (outBooking.txt), display data in a text area, sort data by booking name and search data by booking name.

The application GUI components should consist of a menu bar containing 3 menus (File, Sort Data, Search Data) and a text area (Display Area) as shown below.

There are three menus (File, Sort Data, Search Data). The File menu contains 4 items (Open, Show Data, Save Data, Exit), Sort Data menu contains 2 items (Bubble Sort and Merge Sort), Search Data menu contains 2 items (Linear Search and Binary Search). The menu items are described below.

FileOpen: Open and read data from inBooking.txt (see format of this file below) and store data in aLinked List or an ArrayList.

The file contains Booking Id (String), Booking Name (String), Flight (double), Accommodation (double), Meal (double) and Total Expenses (double). A sample file format for inBooking.txt is as follows.

1345, Mike Douglas, 102, 120, 100, 322

1879, John Bobber, 200, 180, 120, 500
2560, Andrew Beck, 150, 300, 150, 600
3212, Rick Water, 200, 100, 140, 440

FileShow Data: Read data from ArrayList/Linked List and show in a display area as shown below.

FileSave Data: Read data from ArrayList/LinkedList and save data in outBooking.txt file. The format is same as format in inBooking.txt file.

File Exit: Allows user to exit the application.

Sort DataBubble Sort: Sort ArrayList/LinkedList by name in ascending order using Bubble Sortalgorithm and display sorted data in display area as shown below.

Sort DataMerge Sort: Sort ArrayList/LinkedList by name in ascending order using Merge Sortalgorithm and display sorted data in display area as shown below.

Search DataLinear Search: Ask the user to enter a name via a dialog box as shown below and usea linear search algorithm to search for the name. It should display an appropriate message found or not found in display area.

Search DataBinary Search: Ask the user to enter a name via a dialog box as shown below and usea binary search algorithm to search for the name. It should display an appropriate message found or not found in display area.

Data Validation

Input data validation for name entered to search is required. If no name entered or entered name is longer than 15 characters 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 and processing data.

• linear and binary search algorithms for searching.

• bubble sort and merge sort algorithms for sorting.

• two classes to implement the application. One class, named Booking which describes an individual booking and the other class named ProcessBookingApplication which contains GUI with components and methods for sorting, searching and file processing.

• appropriate fields to store booking id, name, flight, accommodation, meal and total booking cost.

Evaluation and Analysis of Algorithms

You must run your application with a large data file and compare time for Bubble sort and Merge sort. Write in Report.docx which algorithm is better and why (Max 2-3 lines).

You must run your application with a large data file and compare time for Linear search and Binary search. Write in Report.docx which algorithm is better and why (Max 2-3 lines).

Implementation Platform

You should implement your assignment in Java. You can use TextPad or NetBeans or any other IDE, however, you must submit your assignment which compiles and runs in TextPad.

Assignment Submission

You should submit the following files using the Moodle online submission system.

• Booking.java – Source code for Booking class (Fields, constructor, get and set methods)

• ProcessBookingApplication.java – Source code for class with GUI components, sorting methods, searching methods, reading from/to file methods, etc.

• Report.docx – Results of comparing algorithms as mentioned above (see section Evaluation and Analysis of Algorithms).

Assessment Item 2 Marking criteria

Total Marks – 30 Marks Allocated
1 GUI implementation and presentation (menus, text area, etc.) 4
2 Load data 2
3 Display data 2
4 Save data 3
5 Sorting algorithms (2 marks for each algorithm) 4
6 Searching algorithms (2 marks for each algorithm) 4
7 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 – comparison and analysis of sorting and searching algorithms 2

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?

About Writedemy

We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

How It Works

To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Are there Discounts?

All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

Hire a tutor today CLICK HERE to make your first order