Evaluate a variety of data structures and algorithmic

Assignment Help JAVA Programming
Reference no: EM132314781

Assignment Specification

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.

• Compare and contrast different algorithms in problem solving
• Design and implement appropriate data structures for application development
• Evaluate a variety of data structures and algorithmic approaches including: recursion, linked lists, stacks, queues, streams, search trees, sorting and searching
• Analyse, develop and implement software solutions with the focus of data structures and algorithms
• Apply classes, inheritance, polymorphism, and exception handling
• Programmatically connect to a database and implement the database operations
• Work collaboratively as part of a small team
• Demonstrate socially innovative practices in software development

2. Assessment task - Paired Programming

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, database programming, and exception handling. You will be using a variety of data structures and algorithms in your solution design. The topics required for this assessment task are from Weeks 1-10. Your Java Application should have an interactive Graphical User Interface (GUI) based on the JFrame class using SWING GUI components. Your application will connect to a database programmatically, executing necessary SQL queries within your java program.

You should also write an individual report, as specified in this document, demonstrating your conceptual knowledge and communication skills.

Problem
This is an extension to the problem given in Assessment Item 1 as specified here. 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.

The initial prototype you have designed for the HBS has very limited functionality of enabling a user to enter customer details, booking details, and save the data to a file. In this Assignment, you have to extend the prototype developed as part of your first Assessment to a functional application that can be released as a beta version for initial testing

The application developed as part of your first Assignment has created a datafile named ‘bookingData.csv' The file has the customer details and booking detailed saved as a list of comma separated values. Include in this file a list of ten (10) to fifteen (15) bookings.
The HBS should have the following functionality
1. Load the data from the .csv file and save the list to a database (only for the first time).
2. Load the data from the database to a Linked List
3. Save new bookings into the database
4. Display the sorted checkout date and Customer names (sorted by last name) in two ListBoxes.
5. Display the complete booking details of the selected items in the TextArea.
If the User chooses one or more check out dates from the ListBox, or one or more customer names, display the booking details for those

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

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. Include two ListBoxes for displaying the check out dates and Customer names. You may arrange Labels and TextFields in horizontal or vertical alignments.
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', ‘Display Choices', ‘Clear Display' and ‘Quit'.
A full GUI design diagram is not given to encourage you to design a user friendly interface. Display a welcome message when the program starts.

Hello Mary Welcome to the Hotel Booking System

Enter the details of the booking including the details of the person responsible for the booking in the given spaces and click the ‘Enter Data' button. Domestic customer's driver's licence number, and expiry date should be entered. An internal customer's passport number and expiry date should be entered.

Use ctl+click to select multiple items from the displayed List of check out dates or Customer names.

Use the Display Choices button to view details of your choices Use the Save button to save the entered bookings.

Initialisation

Your application should start by loading the data from the data file and saving the data to a database only for the first time. If the database exists and contains records, then the program need not load data from the file. Rather, the application should load the data from the database.

Enter Data Button
The user enters the Domestic or International Customer details and the Booking details and clicks the ‘Enter Data 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 a LinkedList of Booking.
An example display is shown below. You can design and choose your own wordings for the message to make it user friendly.

Display Choices Button
The user clicks this button to view the booking details of the chosen customer/s or check out date/s using the ListBoxes. Display appropriate error messages if the user clicks this button before choosing items.

Save Button
Clicking this button should save the new bookings from the LinkedList to the database.
Clear Display Button
Clicking on the "Clear Display" button should clear all contents from the TextArea, and the TextFields.
Quit
The "Quit" button should allow the user to exit from the application.

Data Structures
You may follow the class designs 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.
You can use classes from your own Assignment One solution or from Assignment One solution provided on the Unit website. But you should understand the code and make necessary changes.

i) Customer class (same as Assignment One)

This is a generic class and has the attributes: title first name last name email address phone

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

ii) DomesticCustomer class (same as Assignment One)
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 (same as Assignment One)
This class extends the Customer class.

In addition to the inherited attributes, this class has: Passport Number
Country 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

v) DatabaseUtility class

This class is for saving and reading data from the ‘HotelBooking' database. This database should store records of bookings and customers.

This class should have the following attributes.

Databse url name sqlConnection username password
bookingList to store and return the booking details data.

This class should have a constructor to set values to the attributes and connect to the database. A method to create the Database tables executing the sql queries.

Method to insert the Customer Data Method to insert all the Booking data.

Method to read data from the database and return the Booking details

You should use PreparedStatements in the above methods to insert values into the database or read values from the database.

i) DataFile class (modified from Assignment One)

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

Include a method to write data to a file named ‘bookingData.csv' using the values from ArrayList<> of Bookings.
Use necessary file handing exceptions.

In addition to the above methods already implemented as part of Assignment One include a method to read data from the file and load it a LinkedList of Bookings.

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 read the objects from the DataFile

6. creates a DatabaseUtility object, and invokes methods to save records to the database and read records from the database.

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

You can use the following guidelines to design your database tables.

Tables

1. customer: to store the customerId, title, first name, last name, email address, phone, and Passport/Licence number, country, expiry date

2. booking: to store the bookingId, customerId, check in date, check out date, number of guests, room type, room rate. (one customer can make more than one bookings).

Note: The primary keys are generated during the programmatic creation of the tables and used for other database operations. The primary keys can be auto-incremented integer values. Create an ERD to understand the relationship between tables.
You can use a Sql query to initialize the auto-incremented primary key value to a specific number.

Example: TABLE_SET_FIRST_CUSTOMER_ID = "ALTER TABLE CUSTOMER AUTO_INCREMENT = 1001";

Execute the query as shown below after executing the query to create Table.

statement.executeUpdate(TABLE_SET_FIRST_CUSTOMER_ID);

3. Coding
Include necessary accessor, mutator methods, constructors, and toString() method for each class. Also, follow good coding practices, using meaningful names, camel case notation for naming, constants as necessary, and include meaningful comments. You can use NetBeans or another IDE to develop your application. Follow the coding standards given in the Unit website.

1. Paired Programming:

You can work in pairs to complete the coding. You can share the coding tasks, merge and compile the source code. You can choose your partner yourself. You should ensure that you inform your tutor about the partner. If you have any problem with choosing a partner, please inform your tutor. Distance students also can work in pairs. If there are any problems please contact the Unit Coordinator.

4. Report

Each one of you should submit a report containing the following details. This should be completed independently, not as a team.

1. UML class diagrams for the classes

2. Test plan showing input data, expected results, and actual results

3. Write your suggestions on future modifications to the HBS so that User can use it to enter review on Guests behaviour so that any guests who have followed unhealthy practices such as smoking inside the room, or have been unfriendly or noisy causing disturbance to others can be quickly identified in case of future booking requests. This can be done by suggesting modifications to the GUI or program functionality. You need not implement any additional features, but only write about possible features including changes to the GUI design.

Attachment:- Assignment.rar

Verified Expert

In this assignment, we have develop application in java.gere we have create gui for for reservations. There are two of reservations. One is domestic and another is international. Here we g have store record in the csv file

Reference no: EM132314781

Questions Cloud

Create an array table in java using given details : Create An Array Table In Java. Create a 10 x 10 two dimensional array of int data type (Remember that arrays start with 0, not 1.
Describe the meaning of design concepts : Research one of the following items: The meaning of design concepts: abstraction, refinement, modularity, software architecture.
Define step-by-step software process to accomplish workflow : CS457 UML activity diagram describing the step-by-step software processes needed to accomplish workflow (this should include an initial activity, activity).
Define how it is used to model behavior for policy making : The paper must address how IT is used to model behavior for policy making. Paper must be in correct APA format, use correct grammar, and need to include.
Evaluate a variety of data structures and algorithmic : Compare and contrast different algorithms in problem solving - Design and implement appropriate data structures for application development
Describe the goals and objectives of the project : Develop a thirty to forty (30-40) page project plan in which you: Write a five to ten (5-10) page executive summary that provides a high-level technical.
Write a report on topic - Transport Industry : THT3112 Assignment - Group report. Write a report that identifies the underlying drivers and trends that are influencing this tourism mega trend
Define what are the consequences for non-compliance : In 500 words or more, explain PCI compliance to the database administrator at a large retailer. Consider the consequences for non-compliance. The response must.
What are the levels of physical security : The county just elected a new sheriff. He does not have a keen understanding of what is Physical Security. It is your responsibility to brief the sheriff.

Reviews

len2314781

5/31/2019 11:15:19 PM

14 Penalties 15 Late Penalty (-1.5 marks (5% of total allocated marks) per calendar day) 16 Source code found entirely different from the styles followed in the Unit or containing constructs outside of this Unit will be penalised (-1 to -10 marks depending on the amount of source code) 17 Plagiarism (penalty as per the plagiarism policy) 18 Total 30

len2314781

5/31/2019 11:15:11 PM

5 Programmatic creation of tables and use of prepared statements. 3 6 Use of exception handling (use appropriate exception classes and informative messages) 2 7 “Enter Data” button function 1 7 “Display Choices” button function 2 9 Save button function 3 10 “Clear Display” button function 2 11 Quit” button function 1 12 Good coding practices including comments, indentation, use of constants as required, use of meaningful names, and camelCase notation for names, following coding standards given on the Unit Website 3 13 Individual Report: Well presented report with student details, correct UML class diagrams, views on extending the system to include the customer behaviour 4

len2314781

5/31/2019 11:15:02 PM

S.No Total Marks - 30 Marks Allocated 1 Graphical User Interface Presentation 2 2 Design and use of appropriate data structures and UML class diagrams 2 3 Design and implementation of DatabaseUtility class enabling correct creation of database and access 2 4 Efficient program design and implementation avoiding redundant code, correct use of searching and sorting methods and other library methods as required. 3

len2314781

5/31/2019 11:14:50 PM

You should submit the following source code files and word document using the Assignment 2 submission link available from the Unit website. (Note: the file names/class names could be changed to meaningful names). Please do not zip the whole project folder and submit it. Submit only one set of source code files per team. • Customer.java – Source code for the Customer class • DomesticCustomer.java– Source code for the DomesticCustomer class • InternationalCustomer.java – Source code for the InternationalCustomer class • Booking.java • DatabaseUtility.java – Source code for DatabaseUtility class • BookingGUI.java – Source code for the BookingGUI class • DataFile.java – Source code for the DataFile class • Report.doc – Your word document containing the report. The application program should create the database and necessary tables. So there is no need to submit any database files. Only one submission per pair is required.

Write a Review

JAVA Programming Questions & Answers

  Write a program that displays the squares

Using a for loop, write a program that displays the squares of all integers greater than 0 and less than or equal to a given number n. Use the c ++ programming language to write the code.

  Write a code for an arduino and servo motor

You need help writing a code for an arduino and servo motor. You need the servo motor to rotate 180* after pressing a button.

  Write an employee payroll program

Write an employee payroll program that uses polymorphism to calculate and print the weekly payroll for your company. There are three types of employees - hourly, salaried, and salaried plus commission. Each type of employee gets paid using a diffe..

  Write a class to encapsulate data and behavior of a product

Create a class to encapsulate the data and behavior of a product in a store's inventory. The class should have the following data for an inventory item: Product Number - String.

  Palindrome is a sequence of char that reads backward forwrd

A palindrome is a sequence of characters that reads the same backward as forward. For example, each of the following five-digit integers is a palindrome: 12321, 55555, 45554, and 11611. Write an application called Palindrome.java that asks the user t..

  Write the java class Tunes that sorts the CD objects

Write the java class Tunes that sorts the CD objects by title of CD class in lexicographic order and print the ordered cd objects by title to console

  Write complete java program to read from keyboard

Write complete Java program to read, from keyboard, a student's first and last name and six grades. It will display on screen last name then first letter of first name with a period.

  Implement a sorting algorithm for inclusion in a package

Prepare a targeted plan in which you present your detailed strategies to recruit and select 20 Engineers to hire (full-time or part-time) within 8 months - Implement a sorting algorithm for inclusion in a package for a lucrative client.

  Provide the class declaration for three of the classes

MN404 Fundamentals of Operating Systems and Java Programming Assessment. Provide the class declaration for three of the classes

  Associative memory device

1. How can the associative memory device needed for a TLB be implemented in hardware, and what are the implications of such a design for expandability?

  Consider the binary search tree

What tree results after you insert the nodes 44, 48, 32, 36, 38, and 49 in that order? You only need to show the final result.

  User interface menu using doubly linked lists

Each mNode defines the main menu item name, two links to its mNode neighbors (the previous and next mNode) and a link to its first submenu node.

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