CONSTRUCT AN INTERACTIVE JAVA GRAPHICAL USER INTERFACE APPLICATION
The primary theme of the paper is CONSTRUCT AN INTERACTIVE JAVA GRAPHICAL USER INTERFACE APPLICATION in which you are required to emphasize its aspects in detail. The cost of the paper starts from $119 and it has been purchased and rated 4.9 points on the scale of 5 points by the students. To gain deeper insights into the paper and achieve fresh information, kindly contact our support.
1.Construct an interactive Java Graphical User Interface (GUI) Application. This application should be based on the JFrame class and uses SWING GUI components.
The task is to develop a Java Application which will make it possible for users to make bookings for holidays, accommodation as well as flights and meals before travelling. This booking process will involve selecting options from three lists which are in drop-down format. Assume that flight, accommodation and meals are always selected by the users. The GUI for the application should be as shown below, with the components laid out in like manner (i.e. in the same order).
The booking should be stored in a text file. The program should show the bookings made from the text file.
[40 marks]
Description of the 3 functions:
Function 1: Process Booking: [4 marks]
The “Process Booking” button calculates and sums up the cost of selected flights, accommodation as well as meals. A dialog box should pop out after calculations are done,
Table a. Accommodation
Accommodation
|
Cost (P)
|
Motel
|
150
|
2 Star Hotel
|
250
|
3 Star Hotel
|
550
|
Table b. Flights
Flights
|
Cost (P)
|
London
|
1400
|
Dubai
|
400
|
India
|
1800
|
Table c. Meals
Meals
|
Cost (P)
|
All meals
|
100
|
Breakfast
|
20
|
Lunch
|
35
|
Dinner
|
45
|
Function 2: Show Booking Cost [4 marks]
Upon pressing the ‘Show Booking Cost’ button the total booking cost for the overseas holidays should be displayed, i.e. the cost of flights plus accommodation costs plus cost of meals as shown below:
Function 3: Exit [4 marks]
The “Exit” button should allow the user to exit from the application.
Hint: Your application MUST have at least two Classes (Booking and Booking
Application)
The class Booking should have the following:
The class booking should have variable and constant declaration, a constructor to initialize variables and three (3) methods,
- To accept index from flight array and return flight cost
- To accept index from accommodation array and return accommodation cost
- To accept index from meal array and returns meal cost
The class Booking Application should have the following:
Declaration
Declare variables and constants
Declare three arrays of type string to store flights, accommodation and meals
Declare window width and height
Constructor
Use JFrame super class to set the window title
Create an instance of booking object
Call method to create 1 level, 3 combo boxes and 3 buttons
Call method to create panels and add label, combo boxes and buttons to panel
Add a panel to frame and make it visible
Method1
Create greeting label, 3 combo boxes (1 for flights, 1 for accommodation and 1 for meals)
and 3 buttons. Register the action listeners
Method2
Create panel and add components (1 level, 3 combo boxes, 3 buttons) Other
Inner listener class for flight combo box
Inner listener class for accommodation combo box
Inner listener class for meal combo box
Inner listener class for Process Booking Button Inner listener class for Show Booking Cost Button Inner listener class for Exit Button
Quality of code------------------------------------------------------------------------- [8 marks]
Report Structure:
You need to submit your work with a proper project document with the following details:
The report cover page should contain student name, Registration ID, Tutor name, Module name and Batch code
Introduction about problem statement
Coding
Output of the problem
Conclusion
References
Marking Grid:
Factors
|
Description
|
Mark
|
REPORT (30)
|
Introduction about
problem statement
|
Does the report identify the correct problem
statement with details
|
4
|
Coding
|
Does the project use the correct Swing
components and buttons with proper class and methods used
|
4
|
Output of the
problem
|
Does the report shows the expected screen
shot of the output.
|
4
|
Reference
|
5 substantial resources of which 2 should be
journals
|
15
|
Conclusion
|
Does the report give the proper conclusion
|
3
|
PRESENTATION (10)
|
Presentation skills
|
4
|
Question and answer
|
6
|
PROJECT SOLUTION AND TESTING (60)
|
Graphical User Interface presentation (main window and
two dialog boxes) - 2 marks for each part
|
6
|
Correct use of Inheritance and Composition
|
5
|
Quality of code (indentation, comments, readability and
naming)
|
8
|
Class variables and constants, including meaningful names
|
5
|
Methods (3 in Booking class, 2 in Booking Application class)
– 2 marks for each method (no marks awarded for main() )
|
10
|
Classes including 5 listener classes - 2 marks for each
constructor
|
10
|
Constructors - 2 marks for each constructor
|
4
|
“Process Booking” button that works
|
4
|
“Show Booking Cost” button that works
|
4
|
“Exit” button that works
|
4
|
Total
|
100
|
100% Plagiarism Free & Custom Written
Tailored to your instructions