Develop a graphical user interface for the citylodge rental

Assignment Help Basic Computer Science
Reference no: EM132375624

Overview

You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the CityLodge rental room management program created in Assignment 1.

This assignment is designed to help you:

1. Enhance your ability to build a Graphical User Interface using JavaFX
2. Practise implementation of various GUI event handlers and handling exceptions
3. Read from and write to a database using Java JDBC technology
4. Incorporate text file handling in your program to import and export data

NOTE:

• This assignment is of a size and scope that can be done as an individual assignment. Group work is not allowed.
• A more detailed marking rubric and demo schedule will be provided closer to submission.

General Implementation Requirements

• All information displayed to the user and all user interactions should be done via the GUI. There must be no Console input and output.
• You are free to create your own GUI layouts as long as your layouts are clear and meet the requirements shown in the following sections. Marks might be deducted for very poor GUI design.
• Any user inputs via the GUI should be validated.
• You must not use 3rd-party GUI components which are not built by you.
• Marks will be allocated to proper documentation and coding layout and style. Your coding style should be consistent with standard coding conventions shown in the General Implementation Requirements section of Assignment 1.
• Your programs will be marked with Java SE 8.0. Make sure you test your program with this setting before your final submission.

Task Specifications

NOTE: Carefully read the following requirements. In addition, regularly follow the Canvas assignment discussion board for assignment related clarifications and discussion.

Packages and Organisation of Code

You must use the following packages to separate your code into sets of related classes and interfaces:

• view: contains all your GUI classes.
• controller: contains all your listener classes which store event handling code.
• model: contains the main business logic of your application, all your classes to store and process data (Room, Standard Room, Suite...), all exception classes and all database and file handling classes.

You can use sub-packages inside the packages shown above.

Data Generation

You are required to generate data for 6 rooms, including 3 standard rooms and 3 suites. At least one standard room and one suite having 2 completed rental records with random information such as customer ids, rent, return dates, rental fees and late fees that you are free to create as long as they are reasonable.

Each room must have a corresponding image. Image size should not be large (preferably from 100KB to 250KB). Click here for an example of such an image. You must keep all images in a folder named images which is a direct sub-folder of your assignment project. If a room has no corresponding image, a default image with the phrase "No Image Available" should be used (please see this example).

Exception Handlings

Creating Custom Exception Classes

In assignment 1, methods such as rent(...), returnRoom(...), performMaintenance(), completeMaintenance(..) have boolean as return types to indicate whether the corresponding operation is executed successfully or not. In assignment 2, you are required to modify all those methods so that all of them will return void instead of boolean and will throw custom exceptions. You are required to create custom exceptions such as RentException, ReturnException, MaintenanceException, InvalidIdException.... to represent various exceptional cases that can occur when those methods are executed. All of those custom exception types should allow appropriate error messages to be specified when exception objects are created.

Generating and Propagating Exception Objects

To use your custom exceptions effectively, you will need to look for areas in your program where you need to handle various cases such as when there is an invalid room id, or when a room or suite cannot be rented or returned, or when there is an invalid user input... Then you should generate appropriate exceptions and throw those exceptions back to the appropriate class to be handled.

Handling Exceptions

Those various exception objects should then be allowed to propagate back to the appropriate class (i.e. those exception should not be caught locally within the class that generates the exception).

All exceptions will need to be caught and handled in an appropriate manner by displaying a dialog box via the GUI to the user, showing the error message contained within the various exception objects that have been propagated up from the relevant method call.
Using Database For Data Persistence

Every time your program is executed and terminated, data will be read from and save to a database. For this assignment, you should use an embedded HSQLDB (shown in the lecture) or SQLite database. You must keep all database files in a folder named database which is a direct sub-folder of your assignment project.

You must create at least one table in your database to store all data of the CityLodge application including room and rental records. You are free to design the database, to chose appropriate tables, columns, data types that are suitable for storing data in your application.

NOTE: No need to store images directly in the database. Only image file names should be stored as text in the database. All images will still be kept in the images folder which is a direct sub-folder of your assignment project.

Graphical User Interface (GUI)
All user interaction with the CityLodge system will be done via the GUI. Users should be able to click buttons, select menu items, choose list items from drop-down lists to perform all functionalities described in Assignment 1 such as add, rent and return a room as well as perform and complete room maintenance.

Main Program Window

• This is the first window a user will see when running your program.
• This window should contain a menu bar from which users can execute the main functionalities of your program, such as adding a new room, import room data from text file, export room data to text file, quit the program and other main functionalities described below. When a button is clicked or a menu item is selected, new windows or dialog boxes should be displayed to allow users to perform corresponding functionalities.
• The centre area of this window will contain a scrollable list of standard rooms and suites managed by your program. Each list item displays information about a rental room using various JavaFX User Interface Controls such as ImageView, Label, Buttons..., rather than just a text area showing the output of getDetails() method. Click here for an example of how the list of standard rooms and suites should look like.
? In this list, each list item provides an overview of a room with an image of that room, room type, status, features... and a button that users can click on to go to the detail view of that room to perform more functionalities related to that room (more details are in the Room Detail Window section shown below)

Room Detail Window

• When the user selects a standard room or a suite in the room list shown in the Main Program Window, your program must display this Room Details Window to allow the user to see all details of the selected room, including a larger image of that room.
• This window must have a scrollable list to display complete rental records of that room.
• This window must have buttons which allow users to perform various activities related to this room such as rent, return, maintenance and complete maintenance.
• Users should be provided with a way to return to the Main Program Window from this Detail Window

Other GUI Requirements

• You are encouraged to explore and use various JavaFX User Interface (UI) controls to implement your graphical interfaces for functionalities such as add room, return room, maintenance and complete maintenance. Some suggestions for such UI controls are the Dialog class and its subclasses such as TextInputDialog, ChoiceDialog and Alert classes in the javafx.scene.control package.
• All user inputs via the GUI must be validated.
• All error messages and messages from Exception objects should be displayed in the GUI using JavaFX Alert classes in the javafx.scene.control package. Do not output any error message to the Console.
• Important functionalities such as Save to Database, Import, Export, Quit should always be available in the main menu bar of your program.
Using Text Files for Exporting and Importing Data

Your CityLodge GUI program must contain Export Data and Import Data menu items in the main menu bar to allow users to:
• export all room data of your program and corresponding rental records to a single text file.
• import all room data and corresponding rental records from a given text file.

Those text files must follow a pre-defined format as shown here.

When the user selects the Export Data menu item, your program should export all data to a single text file named export_data.txt, which will be saved in a folder chosen by the user. (Hint: this feature can be implemented in your GUI program by using the DirectoryChooser class in the javafx.stage package).

When the user selects the Import Data menu item, your GUI program must display a FileChooser window (hint: FileChooser class is located in the javafx.stage package) to allow the user to select a text file also in the format as shown above. Your program must be able to read rooms and rental record data from that text file. If a room has no corresponding image, a default image with the phrase "No Image Available" should be used.

NOTE: You don't need to export images. All images will still be kept in the images folder in your assignment project. Only image file names should be exported as shown in the format shown above.

Attachment:- Advanced Programming.rar

Reference no: EM132375624

Questions Cloud

What is fisher doing differently than what you did : Is this truly Fisher's approximate real interest rate that you calculated? If not, what is Fisher doing differently than what you did?
Explain how the group dynamics may influence treatment : When working with families and groups the priority is for the social worker to understand the process that is taking place. In both situations there.
What is the firm roe : ACME Inc. has a profitability ratio of 0.11, an asset turnover ratio of 1.7, a price to earnings ratio of 17.4, and a total asset to equity ratio of 1.50.
Does the proposal seem reasonable : Discuss its logic, advantages, and disadvantages.
Develop a graphical user interface for the citylodge rental : COSC1295 - Advanced Programming - RMIT University - Develop a Graphical User Interface for the CityLodge rental room management program created in Assignment
Payment of local property taxes : Why should nonprofit organizations be exempt from payment of local property taxes? Don't they benefit from local services just as much as proprietary businesses
Describe the impact of co-occurring on treatment : A major issue that influences diagnoses of addiction are co-occurring disorders. There has been a long-standing debate over which is primary-the addiction.
Little james will go off to college : If Abrah'saccount is expected to earn 7%, how much must she save each year over the next four years?
Determining the length and the content of the interview : Identify a family member, friend, neighbor, or colleague that is over the age of 50. Obtain their consent to interview them about the topic at hand.

Reviews

len2375624

9/24/2019 4:05:03 AM

This second assignment is based on the first assignment and the code of the first assignment of teacher is attached.My first assignment gain low marks and please complete perfectly based on the teacher''s first.Thank you so much

len2375624

9/24/2019 4:04:15 AM

Object Oriented Design and Encapsulation Your program must make good use of object-oriented concepts such as inheritance, encapsulation, polymorphism, composition, method overriding and overloading wherever appropriate. All classes are properly encapsulated. No unnecessary variables. Correct use of generic collections and generic data type. 12.0 to >0.0 Pts Mark0.0 Pts No marks 12.0 pts Coupling and Cohesion The source code is cohesive and has low coupling. Code is separated into model, view and controller packages. Classes and methods are succinct and have a clear separation of concerns. Code duplication is minimised. 8.0 to >0.0 Pts Mark0.0 Pts No marks 8.0 pts Source Code Quality Appropriate class, method and variable names. Adequate commenting and formatting, easily comprehensible, use of constants etc. 8.0 to >0.0 Pts Mark0.0 Pts No marks 8.0 pts

len2375624

9/24/2019 4:03:17 AM

Exception Handling Methods to rent, return, perform and complete maintenance all return void and throw custom exceptions such as RentException, RetumException, InvalidIdException... when errors happen. Creating, throwing and catching custom exception objects appropriately. 10.0 to >0.0 Pts Mark0.0 Pts No marks 1 0.0 pts

len2375624

9/24/2019 4:02:51 AM

You must compress all files in your project (including source code files and other resources such as database files and images) into one zip file and submit only that zip file (no RAR or 7-Zip). You must submit the zip file of your project in the Assignment 2 page on Canvas. You can submit your assignment as many times as you want prior to the due date. The latest submission will be graded. you are required to come to a demo session starting in Week 13 (the duration of each demo session is 10 minutes). During the demo, you will download your final submission from Canvas and run your program on your computer and demonstrate the main features of your program to a tutor. NO MARK will be given if you fail to come to a demo session.

len2375624

9/24/2019 4:02:35 AM

Other Requirements ? Although you are not required to use more than one class per task, you are required to modularise classes properly. No method should be longer than 50 lines. ? You should aim to provide high cohesion and low coupling. ? You should aim for maximum encapsulation and information hiding. ? Your coding style should be consistent with Java coding conventions ? You should comment important sections of your code remembering that clear and readily comprehensible code is preferable to a comment. ? Your programs will be marked with Java SE 8.0. Make sure you test your programs with this setting before you make the submission.

Write a Review

Basic Computer Science Questions & Answers

  Glsl keywords or function name

Explain the following GLSL keywords or function name. You must also explain the parameters and output if applicable. Provide examples. Do not write more than 500 words in total.

  Discuss the impact of the roles on health care organization

Discuss the impact of the roles on the health care organizations. Create a diagram with the career choice as the focal point and identifying the work roles within one of the services or product you identify.

  Short java code example

Instructions for HW: Provide your own short Java code example that uses a For or While loop. Be sure to test and describe what your code is doing.

  Provide a simple example of timing diagrams

Provide a simple example of timing diagrams. Provide the history of VHDL programming language.

  Deciding what quantity of peaches to can

Dole and Del Monte play a strategic game when simultaneously deciding what quantity of peaches to can.

  Integer the largest positive integer

The typical result is "wrap-around" of the range of representable integers with the smallest negative integer following the largest positive integer.

  Describe the equal pay for equal work

Define and describe the "equal pay for equal work" provisions typically found in employment standards legislation in Canada. Define and describe the "equal pay for work of equal value" provisions typically found in pay equity legislation in Canada.

  Determining the factors of managerial economics

What factors of Managerial economics does online auction sites affect?

  What new threats do computer systems and networks pose

What new threats do computer systems and networks pose to personal privacy? Conversely, what threats are enabled or enhanced by computer systems and networks? How does cryptography help or hinder protection of privacy and public safety? What po..

  Find the leftmost even number

Please do it in Lisp, thanks a lot. Assume L is list of only integer numbers (Including zeros, or positive, or negative numbers, or could be an empty list).

  Comparison of relative sizes of two floating-point number

Use this network, along with external logic gates, as necessary, to design the required network for the comparison of floating-point numbers.)

  Review the apriori algorithm

Review the "APRIORI ALGORITHM" List the SKU which was purchased the most. List the two SKUs that were purchased most frequently together.

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