Question: How do I create a Order Placement Screen in JavaFX with the following information: Stimulus/Response Sequences The employee opens the application. The employee then logs

How do I create a Order Placement Screen in JavaFX with the following information:

Stimulus/Response Sequences

The employee opens the application.

The employee then logs into the application.

The employee selects Place Order from an Action menu.

The system displays a list of customers in a drop down.

The system displays a list of products in a drop down.

The employee enters the desired quantity of products to order.

The employee selects a customer and product.

The employee presses the Place Order button to place the order.

The system responds telling if the order was added successfully or if there was an error.

Requirements

1: Verify the employee has logged in.

2: Check that there is enough quantity of the product to be ordered. If not, raise an exception, otherwise, continue.

3: Insert a record in the order table to include in the customer ID, employee ID who is logged in, date of the order, and the order status (pending, delivered)

4: Insert a record in the order-detail table to indicate the order ID, product ID, and quantity.

5: Update the product table to deduct the number of items ordered.

6: Display any errors either beside each input field or above all the input fields.

7: Validate that all the input fields have been entered. The quantity must be a valid integer greater than zero.

8: All the database statements must execute in a database transaction.

9: All input fields should be cleared if the transaction was successful.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!