Develop a java application

Assignment Help JAVA Programming
Reference no: EM13192699

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.

647_Application GUI components.png

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.

File→Open: Open and read data from inBooking.txt (see format of this file below) and store data in a Linked 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

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

552_Application GUI components2.png

File→Save 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 Data→Bubble Sort: Sort ArrayList/LinkedList by name in ascending order using Bubble Sort algorithm and display sorted data in display area as shown below.

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

2468_Application GUI components1.png

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

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

116_Application GUI components3.png

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.

Reference no: EM13192699

Questions Cloud

Define glutamic acid hydrochloride : What volume (in liters) of 1.10 M KOH solution should be added to a 0.090 L solution containing 10.2 g of glutamic acid hydrochloride (Glu, FW=183.59
How to maintain monopoly over the production of electricity : You own a building that has 4 possible uses: a cafe, a craft store, a hardware store, and a bookstore. The value of the building in each use is $2000; $3000; $4000; and $5000, respectively. You decide to open a hardware store. The opportunity cost..
Define the temperature of the calormieter increases : The temperature of the calormieter increases from 19.7 C to 20.6 C if under constant volume condidions, the heat of combusion of glucose is -2805 kJ/mol
State the standard enthalpy of formation of carbon monoxide : The standard enthalpy of formation of carbon monoxide is more esothermic than the sum of the standard enthalpies of formation of methane and water.
Develop a java application : Your task is to develop a Java Application that allows the user to read travel booking data from a text file, save data in a file, display data in a text area, sort data by booking name and search data by booking name.
State what is the pressure in atm inside the kernel right : A typical popcorn kernel has a volume of .250 mL and contains 1.114 mg of water. The kernel will pop at a temperature of 170 C. What is the pressure in atm inside the kernel right before it explodes?
Define what is the identity of the precipitate : What is the identity of the precipitate and what is the change in enthalpy of the reaction per mole of copper? Assume the calorimeter absorbs negligible quantity of heat and the specific heat and density of the solution are that as pure water.
State what is the mass of the precipate is formed : What is the mass of the precipate is formed when 170.0mL of 0.200 M MgSO4 reacts wit excess Na3PO4?
What is the present worth of the cash flow : First we have to determine the general inflation rate over the project period, then we need to convert the cash flows into actual dollars into equivelant constant dollars with year zero as the base year. Then if the annual inflation free interest ..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Object from question 1 manage its display

Write a Java statement to have the object from question 1 manage its display area by dividing it into 3 rows which have 4 columns each.

  Program that allows a user to input coordinates

In Java make a program that allows a user to input coordinates as to make a Hexagon via an array, and my professor has set the standards of: Write a class Polygon which draws a hexagon for a set of numbers given by the user.

  An infix to postfix method for my java program.

an infixToPostFix method for my java program. The method must work with stacks and it should take a string as parameter. The method should be able to convert to postfix mathematic expressions such as: (12 + 4) - 23(9-6)/12. Treat the parenthesis as l..

  Write a class that reads a file

In java, write a class that reads a file and outputs a list of the unique words in the file and the number of times each unique word occurs.Hint: use a HashMap with keys being the words and values being integer counts associated with the words.

  Consider the problem of finding the position

Consider the problem of finding the position, p, of the last occurrence of a given number, x, in an array, A. We thus want a function FindLast(A,n,x) with precondition

  Design a single class that expresses the commonality

Design a single class that expresses the commonality of these concepts.

  Using an array in java

Using an array in Java - have a list of keywords from a web service and have to print out the list of keywords on the screen with one keyword on each line. This is my code

  Application named arithmeticmethods

Create an application named ArithmeticMethods whose main() method holds two integer variables. Assign values to the variables. In turn, pass each value to methods named displayNumberPlus10()

  Write specifications for method which advances date by one

Write specifications for the method which advances any given date by one day. Comprise a statement of purpose, pre- and post-conditions, and description of parameters.

  Write java program to utilizes gui with five text fields

Write down the program called MaxMinAvgGUI.java which utilizes GUI with five(5)text fields which asks user to enter 5(five) decimal numbers. 1(one)number in each text field.

  Information from the user and prints a payroll statement

Write a program that accepts the following information from the user and prints a payroll statement

  String as its parameter and returns the length

Write a method named longestWord that accepts a String as its parameter and returns the length of the longest word in the string.A word is a sequence of one or more non-space characters (any character other than the space character).

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd