Project 1 Solution

$35.00 $29.05

You'll get a: . zip file solution, download link after Payment


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 e-store (we’ll call our store Nile Dot Com… we’re not quite as big as!)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:

    1. An area that allows the user to input data into the application along with the descriptive text that describes each input area.

    1. A total of six buttons as shown below with functionality as described below.

    1. As illustrated below, the various buttons on the interface are only accessible at certain points during a user’s interaction with the e-store.

  1. 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 three entries; an item id (a string), a quoted string containing the description of the item, 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.

  1. 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).


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.

  1. Source =

Page 1


  1. Submit a working copy of your source code (all .java files), including your inventory.txt file, via WebCourses

  1. Include a file that contains screen shots, similar to those illustrated below, that shows your application in action as a user interacts with your e-store to purchase items.

  1. Include a screen shot of your “transactions.txt” file showing at least the last few transactions (similar to the one shown on the last page of this document).

  1. You can zip all of the above into a single folder.

Additional Information:

Shown below are example screen shots of the GUI to help illustrate how your application is to operate.

Page 2

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

lu6292cuqyr tmp 2d8e988e666c0f80

Page 3

2. Initial GUI:

Allows for

Confirms that

processing an

the item is

item once it is



View the

order so far.

Note that the

lu6292cuqyr tmp a21ae9f9b5f3305

Confirm Item”,

View order”,

and “Finish

Order” buttons

are not initially



an order –


invoice and

adds to the




Clears order

and starts over

  • no write to transaction file

  1. GUI after user specifies total number of items in the order and makes a selection for item #1, but before clicking the “Process Item” button.

lu6292cuqyr tmp a3971b7f530a9b80

Page 4

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

lu6292cuqyr tmp d21b92e742aa3bdb

Note that the “Confirm

Item #1” button is now

active and the “Process

Item #1” button is inactive.

Information on the item selected/purchased has been extracted from the inventory file and written into the window on the line for item #1. Note proper currency formatting.

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

lu6292cuqyr tmp 161b8bad4caffb14

User entered an incorrect

item ID. This message

would be displayed when

user pressed the Process

Item button. This is the

only “error” you will need

Page 5

to catch.

lu6292cuqyr tmp ab3028d8a9580177

6. The main GUI after the user has confirmed the first item.

Note that

the buttons



Discount is based on the quantity of a item. If:

1-4 = 0%

5-9 = 10%

10-14 = 15%

>=15 = 20%

Note that the text areas

for entering the second

item information are

cleared and ready for



Subtotal should

for previous

reflect current

item remains

total of all

on display.

confirmed items.

  1. User enters and processes (but has not yet confirmed) the next item in the order (which is the last one for this order).

lu6292cuqyr tmp 51b4a73334523fb5

Page 6

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

lu6292cuqyr tmp 74d477fd12af4f9b

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

lu6292cuqyr tmp c328461ecb60261a

Page 7

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

The date and time are used to create the unique transaction id in the “transactions.txt” file. For the invoice the format is “DD/MM/YY HH:MM:SS TMZ”

lu6292cuqyr tmp 40e8cf78bc76dfa4

  1. The transaction file after order shown above was finished. Note the unique transaction ids based on the date and time.

lu6292cuqyr tmp 7761f51df38e823e

The transaction occurred on 08/27/2020 at

17:20 (5:20pm). See the invoice message

above. Permutation used here is:


Page 8

  1. 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 seven separate transactions.

lu6292cuqyr tmp facfce0a910637b4

Page 9