COSC1295 Advanced Programming Assignment

Assignment Help JAVA Programming
Reference no: EM132423991

COSC1295 - Advanced Programming - RMIT University

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

Task Specifications

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

Attachment:- Advanced Programming.rar

Reference no: EM132423991

Questions Cloud

Analyze John Woodens Pyramid of Success : Typify your leadership style and provide three (3) examples of how your own temperament, motivation pattern, thinking styles, character, expectations
Calculate the density according to the student data : He finds the volume to be 4.20cm3. Calculate the density according to the student's data. Please answer the following question.
How much energy would be required to melt a moderately : How much energy would be required to melt a moderately large iceberg with a mass of 2.3 million metric tons (2.30 × 10^6 metric tons)? (A metric ton is 1000 kg.
Calculate heat lost by water : Calculate a) heat lost by water, and 2) heat gained by the ice cube after it melts.
COSC1295 Advanced Programming Assignment : COSC1295 Advanced Programming Assignment Help and Solution, RMIT University - Assessment Writing Service - develop a Graphical User Interface for the City
What is the mass of the copper block : When the two substances reach thermal equilibrium, the final temperature of both substances is 24.2 °C. What is the mass of the copper block?
What is the half-life of polonium-218 : What is the half-life of polonium-218 if 9.12 minutes are required for the activity of a sample of polonium-218 to fall to 12.6 percent of its original value?
What is the new volume occupied by the gas : What is the new volume occupied by the gas? Answer in units of mL.
What is the heat combustion : What is the heat combustion when 500.0g acetylene is burned

Reviews

len2423991

12/26/2019 11:59:32 PM

All information displayed to the user and all user interactions should be done via the GUI. There must be no Console input and output. Please follow all the requirements ,Rubric carefully and thoroughly and blue color text like "link, example,here " etc. contact me.

Write a Review

JAVA Programming Questions & Answers

  Create a servlet that displays a form when the doget method

Create a Servlet that displays a form when the doGet method is invoked. The form will contain a post action that directs the form post back to the same servlet, which in the doPost method will append the form data to a random access file. After th..

  The business world would be concerned with assertions

100-300 Words. What might be some of the issues that the business world would be concerned with assertions?  For example, if I don't get my newspaper delivered, this is something that needs to be flagged.  Where do you see the businesses in your comm..

  Elements of a column of a two-dimensional array

When processing all the elements of a column of a two-dimensional array, what possible runtime error do we have do worry about that the number of column elements may not be constant across all rows.

  Solving programming problems

Write a computer program that will figure out the total of an order when given the amount of the order ($1000) and a sales tax rate of eight percent.

  Methods that require multiple parameters

Methods that require multiple parameters. The program prompts the user for two numeric values.

  Allows the user to enter students names followed

Write a program that allows the user to enter students names followed by their test scores and outputs the following information(assume that the maximum nmber of students in the class is 50

  Java program to find solution of cryptarithmetic puzzle

A solution to puzzle is S=9, R=8, O=0, M=1, Y=2, E=5, N=6, D=7. Write down a java program which finds solution to cryptarithmetic puzzle of: TOO + TOO + TOO + TOO = GOOD.

  Create a base banking account

Create a base banking account. Decide what characteristics are common for checking and saving accounts and include these characteristics in the base class

  Create a japplet that contains two parallel arrays

Create a "JApplet" that contains two parallel arrays with at least five friends' names and phone numbers. Allow the user to enter either a name or phone number and to click a "JButton" to display the other.

  Write a program that creates an apartment object and prompts

Create a structure named Apartment that contains data fields to hold the number of bedrooms, the number of bathrooms, and the monthly rent for the apartment.

  Write a java program and pseudocode to read a number

Write a java program and pseudocode to read a number up to 15 digits long or a date (dd/mm/yyyy). The program should distinguish numbers from input date, and prints them in alphabetic spelling form

  Write a script that inputs three integers

Write a script that inputs three integers from the user and displays the sum, average, product, smallest and largest of the numbers in an alert dialog2

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