COIT20256 | Data Structures GUI | Java

Home Recent Questions COIT20256 | Data Structures GUI | Java

1.    Objectives

The purpose of this assessment item is to assess your skills attributable to the following learning outcomes and achieving the expected graduate attributes of advanced level knowledge, cognitive, technical, and creative skills, and self-management.

• Design and implement appropriate data structures for application development
• Analyse, develop and implement software solutions with the focus on data structures and algorithms
• Apply classes, inheritance, polymorphism, and exception handling

2. Assessment task

Your task in this assessment is to analyse the given problem, model, and design the required data structures using UML class diagrams. You will be implementing the software solution, applying efficient algorithms, inheritance, polymorphism, and exception handling. The topics required for this assessment task are from Weeks 1-5. Your Java Application should have an interactive Graphical User Interface (GUI) based on the JFrame class using SWING GUI components. You should also write a report, as specified in this document, demonstrating your conceptual knowledge.

2.1 Problem

Hotels are the heart of tourism industry in any nation. Hotels are booked using a software application with an easy to use, and intuitive user interface. NEXT hotel is a major hotel business group and they have a hotel in Brisbane. The IT manager of the Brisbane operation has kindly agreed to support a project to develop a prototype for a new Hotel Booking System (HBS) which will be further developed into a webservice. The support for the full development of the system depends on the quality of the prototype.

Therefore, you are invited to design and develop an initial prototype for the HBS to enable a user to enter the customer details and booking details and save the data to a file. You will be developing the Java application with a GUI.

The users accessing the HBS should able to:

1. Enter the Customer details
2. Enter room booking details
3. Save the entered data to a file.

The hotel room details including rates, and payment processing is outside the scope of this work.

2.2 Design Guidelines

You can use the following guidelines in your modelling and GUI design.

Data Structures

You may follow the class design given below. You should read the specification carefully and design the classes using UML class diagrams and include the attributes with correct data types and all the methods, clearly indicating public or private. Clarify your doubts during the design stage so that your implementation can be less error prone and faster to complete.

i) Customer class

This is a generic class and has the attributes:


first name

last name

email address


This class should have:

a parameterised constructor, accessor, mutator methods, and a toString() method.

ii) DomesticCustomer class

This class extends the Customer class.

In addition to the inherited attributes, this class has: Driver License Number

Expiry Date

This class should have a parameterised constructor, copy constructor, a default constructor, accessor, mutator methods, and a toString() method.

iii) InternationalCustomer class

This class extends the Customer class.

In addition to the inherited attributes, this class has: Passport Number


Expiry Date

This class should have a parameterised constructor, copy constructor, a default constructor, accessor, mutator methods, and a toString() method.

Hints and tips: Refer to Week 3 Lecture and tutorial solutions, and the Textbook chapter on Polymorphism for the correct implementation of polymorphic behaviour.

iv) Booking class

This class has the attributes: Check in

Check out

Number of guests

Room type

Room rate

This class also includes a Customer object for one of the guests who does the booking. The check in and check out are dates in which the guests will be checking in checking out of the rooms. Use Date type variable for storing the check in and check out dates.

The room type is a value which specifies the type of room and amenities in that room. You can use the list of room types and rates obtained from hotel management and these are: Superior_Queen: $250, Breakfast_Queen: $270, Deluxe_King: $240, Deluxe_Twin: $240.

v) DataFile class

This class will have a parameterised constructor that takes the filename to be created.

Include a method to write data a file named ‘bookingData.csv’ using the values from and ArrayList<> of Bookings.

Use necessary file handing exceptions.

vi) BookingGUI class

This class should have all the GUI components as described under the Graphical User Interface Design section. This class:

1. has the main method and starts the application
2. initialize the GUI components
3. stores the user entered values in temporary variables, and creates necessary objects
4. stores the data file name and creates the DataFile object
5. invokes the DataFile class method to write the objects to the DataFile

Graphical User Interface

The application should have a GUI for user interactions. This GUI should have the necessary components to enable the user to execute all the functions as provided in Section 2.1 above. You may use the guidelines provided below for your GUI design and implementation. Variations to the provided guidelines are acceptable as long as it meets the user requirements.

i) Input Panel

The top panel can have Labels to display attribute names and TextFields to enable the user to enter the attribute values for the Customer and Booking classes. Use RadioButtons for user to select between Domestic Customer and International Customer. Once the user chooses one of the options, the required Labels and TextFields should be displayed for entering data. Use a ComboBox to display and choose the Room types. You may arrange Labels and TextFields in horizontal or vertical alignments. You can use

ii) Display Panel

This panel can have a TextArea to display welcome message to the User and other messages during the program execution. Once the user clicks the ‘Save Data’ Button, display the saved Booking details.

iii) Button Panel

This Panel can have a label “Command Buttons” and can contain the required Command Buttons of ‘Enter Data’, ‘Save Data’, ‘Clear Display’ and ‘Quit’.
A full GUI design diagram is not given to encourage you to design user friendly interface.

The functions of the three Command Buttons are given below.

Display a welcome message when the program starts.

Enter Data Button

The user enters the Domestic or International Customer details and the Booking details and clicks the ‘Save Button’.

You should validate the check in and check out entries so that:

a) the check-out date should be later than the check in date.
b) both the dates should be later than the current date. (assuming bookings are done and confirmed at least 12 hours prior to check in.)

If there are errors, appropriate error message should be displayed.

All the TextFields should be completed. Display appropriate error messages if the user hasn’t entered value in any of the TextFields.

If entries are correct display a message informing booking confirmation. The Booing and Customer details should be added to an ArrayList of Booking.

An example display is shown below. You can design and choose your own wordings for the message to make it user friendly.

Search Here

Latest Reviews

  • Kannon
    13 Jul, 2019

    I asked for essay help from Assignment Help 4 Me and I am happy that the essay writers completed my task on time. The prices they asked for are worth in comparison to the services rendered.

  • Liam
    13 Jul, 2019

    Assignment Help 4 Me is the best help provider. I took assistance to get my essay completed and I am glad that the writers delivered the quality content as they promised within the time committed.

  • Silas
    12 Jul, 2019

    Accounting is a very interesting subject but when it comes to assignment writing, I feel hard to get through the same. But, since the assignments have to be completed somehow, I preferred to avail online help from Assignment Help 4 Me. All thanks to them that they helped me complete my work on time at reasonable prices.

View All Reviews


Assignment Help 4 Me