CNT 4714 – Project 1 Solved

44.99 $

Description

5/5 - (2 votes)

Title: “Program Assignment 1: Event-Driven Programming”
Points: 100 points

Objectives: To practice event-driven programming using Java-based GUIs. To refresh your basic Java skills. To simulate (albeit at a very high-level) an enterprise application.

Description: Develop a Java program that creates a standalone GUI application that simulates an estore (we’ll call our store Nile Dot Com… we’re not quite as big as Amazon.com!) which allows the user to add in stock items to a shopping cart and once all items are included, total all costs (including tax), produces an invoice, and append a transaction log file.

Your program development must include the following steps:
1. Create a main GUI containing the following components:
a. An area that allows the user to input data into the application along with the descriptive text that describes each input area.
b. A total of six buttons as shown below with functionality as described below.
c. As illustrated below, the various buttons on the interface are only accessible at certain points during a user’s interaction with the e-store.
2. An input file named “inventory.txt”. This is a comma separated file which contains the data that will be read by the application when the user makes a selection. Each line in this file contains four entries; an item id (a string), a quoted string containing the description of the item, an in stock status (a string), and the unit price for one of the item (a double). A sample file is provided for you on WebCourses. Feel free to create your own input file for testing purposes or augment the provided input file.

Restrictions:
Your source file shall begin with comments containing the following information:
/* Name: <your name goes here>

Input Specification: The file “inventory.txt” as described above (see example below as well).

Output Specification: Output is to appear in the specified components of the GUI and various message boxes that appear, plus the contents of the
“transactions.txt” log file that will be generated.

Deliverables:
You can zip everything into a single folder if you would like.
(1) A working copy of your source code (all .java files) and any necessary supporting libraries.
(2) Include a file that contains the following nine screen shots.
a. The initial GUI (like number 2 in Additional Information below).
b. The GUI after the user has entered an item number (ID) and quantity and clicked the “Process Item #” button (like number 4 below).
c. The pop-up message box when the user has confirmed the selected item (like number 5 below).
d. The pop-up message box when the user has entered an item number (ID) that was not found in the inventory file (like number 5 below).
e. The GUI after the user has confirmed the selected item (like number 6 below).
f. The GUI after the user has confirmed an item and has entered another item and processed it, but not yet confirmed it (like number 7 below).
g. The message dialog box when the user clicks the “View Order” button with multiple items in the order (like number 9 below).
h. The message dialog box when the user clicks the “Finish Order” button for an order containing multiple items (like number 10 below).
i. The message dialog box when the user has entered an item number (ID) for an item that is out of stock (like number 12 below).
(3) Include your “transactions.txt” file as it stands after several different transactions have been recorded. You should have at least 5 different transactions in the file with at least three of these transactions having four or more items in the transaction. (similar to the one shown on the last page of this document).

Additional Information:

1. Screen shot of the contents of an example “inventory.txt” file.

3. GUI after user has entered first item number and the quantity of the item they want to purchase, but before clicking the “Process Item” button.

4. GUI after user has selected the first item and clicked the “Process Item #1” button.

5. When the user clicks on the “Confirm Item #1” button, a confirmation information message appears on the screen.

number will not increment in this case.

7. User enters and processes (but has not yet confirmed) the next item in the order (which we’ll make the last one for this order).

8. The GUI after the user has entered the information for all the items and confirmed the last item they wish to order.

9. When the user clicks the “View Order” button, the following message box should appear.

10. When the user clicks the “Finish Order” button, the invoice message should be generated and displayed.

12. If the user enters an item number for an item that is not in stock (it is in the inventory – just not in stock), the following message dialog should appear. Once the user clicks OK in the dialog box, then they would enter a new item number for another item and continue processing their current transaction.

13. The GUI after the user has clicked the “Finish Order” button and also clicked “OK” on the invoice dialog box.

  • project-1-anoudv.zip