Question: Java - I need to make 2 programs. A client program for a user to enter a ( very ) basic fast - food order

Java - I need to make 2 programs. A client program for a user to enter a (very) basic fast-food order and a server program that can compute an order number and total with tax and write a transaction log. Both programs will run simultaneously on the system and communicate with each other using networking code.
*Functional Specifications for the Client Program*
-Present a JavaFX or Java Swing interface that will consist of a form containing at least three possible things to order (burger, shake, order of fries). Each of these items should allow you to specify a quantity.
-Provide a Send Order button that will collect all items ordered and send this information to your fast-food server.
-Accept a response from the fast-food server that will contain a unique order number and a total of all items ordered plus 6% sales tax. This must be unique for the life of the server (i.e., no deduction for cases where you start the server again and seed with the same initial number). If I submit two orders I should receive two unique order numbers to avoid a point deduction.
-A text area that will present the order information provided by the server (items ordered, number of each, cost of each and total).
*Functional Specifications for the Client Program*
-Be multithreaded in that each incoming order will be processed on a separate thread
-Code to compute a unique order number. The order number will be stored in a static variable and shared amongst all threads. Initialize the order number to start at 1000.
-Code to compute the order total which would include all line items (burgers, shakes and fries) as well as the sales tax of 6%.
-Write the order information to a log file on disk. This is our transaction log and evidence of an order. A standard text file will suffice and must include an order number that the server generates, the client IP address, and the computed total.
-Code to respond back to the fast-food client with the order number and total information.
Price of items: burger = $6. fries = $2. shake =$5.
Response from the system should be something like:
order number:
total:
**the order number should always be unique
recommended to create an object that represents the order that will contain the possible line items and quantity of each as well as the order number and total. also a toString() implementation for the transaction log.

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 Programming Questions!