Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

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!) 1 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. 3. An output file (append only) named "transactions . txt" must be created that uniquely logs each user transaction with the e-store. The unique transaction id will be generated as a permutation of the date/time string when the transaction occurred (see below). 1. Screen shot of the contents of an example "inventory.txt" file. /eclipse-workspace-2022-12/CNT 4714 - Project 1 - Spring 2023/inventory.txt inventory.txt 2. Initial GUI: 3. GUI after user has entered first item number and the quantity of the item they want to purchase, but before clicking the "Find Item" button. 4. GUI after user has selected the first item and clicked the "Find Item \#1" button. 5. When the user clicks on the "Find Item \#1" button and the item is found in the inventory, but the item is not in stock, then the following message would appear and the user is prompted to enter another product id. (see below as well) Nile Dot Com - ERROR Sorry... that item is out of stock, please try another item 6. When the user clicks on the "Find Item \#1" button, if the item is not found in the inventory, then the following message would appear on the user's screen. 7. When the user clicks the "Purchase Item \#1" button, the following message would appear on their screen. Discount is based on the quantity of an item. If: 8. The main GUI after the user has purchased the first item. 14=0%59=10%1014=15% 9. User enters and finds (but has not yet purchased) the next item in the order (which we'll make the last one for this order). 10. The GUI after the user has entered the information for all the items and purchased the last item they wish to order. 11. When the user clicks the "View Current Order" button, the following message box should appear. Nile Dot Com - Current Shopping Cart Status 1. 14 "Stanley \#2 Philips Screwdriver" \$6.9510\% $6.95 2. 3451 "Oakley Jawbreaker sunglasses" $236.0020%$472.00 12. When the user clicks the "Complete Order - Check Out" button, the invoice message should be generated and displayed. The date and time are used to create the unique transaction id in the Date: 1/11/23,7:53:39 PM EST "transactions.txt" file. For the invoice the format is "DD/MM/YY HH:MM:SS Number of line items: 2 TMZ" Item\# / ID / Title / Price / Qty / Disc \% / Subtotal: 1. 14 "Stanley \#2 Philips Screwdriver" $6.9510%$6.95 2. 3451 "Oakley Jawbreaker sunglasses" $236.0020%$472.00 Order subtotal: $478.95 Tax rate: 6% Tax amount: $28.74 ORDER TOTAL: $507.69 Thanks for shopping at Nile Dot Com! 13. The transaction file after order shown above was finished. Note the unique transaction ids based on the date and time. 14. 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. Notice below, that after clicking ok in the dialog box, the GUI is reset to the original item number and the input fields are empty. Sorry... that item is out of stock, please try another item 5. The GUI after the user has clicked the "Complete Order-Check Out" button and also clicked "OK" on the invoice dialog box. 16. The transaction file after several orders have been completed. Note the unique transaction ids based on the date and time for every separate transaction. This file shows eight separate transactions. 000 A weeclipse-workspace-2022-12/CNT 4744-Project 1-Spring 2023|transactions.tat (1) trarsartionstit 1 110120231953, 14, "Stanley \#2 Philips Screndriver", 6.95, 1, 0.0, \$6.95, 1/11/23, 7:53:39 PN EST 2 110120231953, 3451, "0akley Jakbreaker sunglasses", 236. 0, 2, 0.0, \$472, 80, 1/11/23, 7:53:39 PN EST 3 110120232015, 1111, "Top Secret Twenty One - Janet Evanovich", 8.99, 4, 0.0, $35.96,1/11/23,8:15:11 PH EST 4 110120232015, 268, "Sidi wire 2 carbon shoes", 499.99, 1, 0.0, \$499.99, 1/11/23, 8:15:11 PN EST 5 110120232015, 8543, "Ritchey 1 inch threaded headset - silver", 45.0, 20, 0.2, \$720.00, 1/11/23, 8:15:11 PN EST 6 110120232017, RTX3452, "Laser Pointer", 38.8, 25, 0.2, \$776.00, 1/11/23, 8:17:13 PM EST 7 110120232017, 22389, "Swingline Nodel B2200 stapler", 18.0, 8, 0.1, \$129,60, 1/11/23, 8:17:13 PN EST 8 110120232017, 29741, "Plush teddy bear 8 inch", 24.0, 3, 0.0, $72.00,1/11/23,8:17:13 PH EST 9 110120232017, 14909, "1/4in - 28tpi sS nuts", 1.0,400,0.2,$320.00,1/11/23,8:17:13 PH EST 10 110120232017, 47831, "8x10 picture frane", 4.95, 50, 0.2, \$198. 00, 1/11/23, 8:17:57 PM EST 11 110120232019, 228865X, "3M Super 33+ electrical tape box 10", 32.5, 10, 0.15, \$276.25, 1/11/23, 8:19:51 PN EST 12 1101202322019, 67913, "Gios Torino t-shirt size XXL", 25. 0, 3, 0.0, 575. 00, 1/11/23, 8:19:51 PY EST 13 110120232019, 113355, "The Bourne Identity - blu-ray", 15.95, 12, 0.15, \$162.69, 1/11/23, 8:19:51 PH EST 14 110120232019, 286934, "1 lb-coffee beans", 6.5, 35, 0.2, \$182.00, 1/11/23, 8:19:51 PN EST 15 1101202322019, 339921, "YY Yanaha KT 100 kart engine", 950.0, 2, 0.0, \$1,900. 00, 1/11/23, 8:19:51 PN EST 16

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions