For this project, we will be designing two programs - a client program for a user...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
For this project, we will be designing two 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 your system and communicate with each other using networking code. Functional Specifications For the client program, you will need to create a program that meets the following criteria: ● 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. ● A text area that will present the order information provided by the server. For the server program, you will need to create a program that meets the following criteria: ● 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. The price of items will be as follows: burger - $5.00 fries - $2.00 shake - $3.50 The price of items will be as follows: burger - $5.00 fries - $2.00 shake - $3.50 Example Scenario For example, if the user ordered two burgers and two shakes, the server would respond with this information for the client to present to the user: order number: 1000 total: $18.02 (2 burgers * $5+ 2 shakes * $3.50) *.06 sales tax Later, if another order was received consisting of a single shake, the server would respond with: order number: 1001 total: $3.71 Note that the order number is always unique! For this project, we will be designing two 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 your system and communicate with each other using networking code. Functional Specifications For the client program, you will need to create a program that meets the following criteria: ● 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. ● A text area that will present the order information provided by the server. For the server program, you will need to create a program that meets the following criteria: ● 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. The price of items will be as follows: burger - $5.00 fries - $2.00 shake - $3.50 The price of items will be as follows: burger - $5.00 fries - $2.00 shake - $3.50 Example Scenario For example, if the user ordered two burgers and two shakes, the server would respond with this information for the client to present to the user: order number: 1000 total: $18.02 (2 burgers * $5+ 2 shakes * $3.50) *.06 sales tax Later, if another order was received consisting of a single shake, the server would respond with: order number: 1001 total: $3.71 Note that the order number is always unique!
Expert Answer:
Answer rating: 100% (QA)
Heres a basic outline of how you might structure your client and server programs in Java Please note that this is a simplified version and you might need to handle exceptions and edge cases according ... View the full answer
Related Book For
Management Accounting Information for Decision-Making and Strategy Execution
ISBN: 978-0137024971
6th Edition
Authors: Anthony A. Atkinson, Robert S. Kaplan, Ella Mae Matsumura, S. Mark Young
Posted Date:
Students also viewed these programming questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Can you create a meme for me using a communication concept?
-
You are looking to help a small municipality finance their drinking water treatment facility with the installation of UV (ultraviolet) disinfection. The total cost of the project is estimated to be...
-
Return to Problem 37. What will be the payoff to the put, Pu, if the stock goes up? What will be the payoff, Pd, if the stock price falls? Value the put option using the risk neutral shortcut...
-
Give an example of a manufacturing overhead cost in a steel mill.
-
Mikes Powersports uses the (perpetual) LIFO inventory method. Mikes Powersports started August with 10 helmets that cost \($54\) each. On August 19, Mikes Powersports bought 15 helmets at \($56\)...
-
A farmer has to lift up a boulder 12 inches in the air in order to put it in his wagon. The boulder weighs 2000 lbf. The farmer has the following tools available: a fixed pulley and a moveable pulley...
-
Lab and supervision activities - Albert estimates that these activities are split 60% Chardonnay-Estate, 25% regular Chardonnay, and 15% Blanc de Blanc. Other production activities and costs not...
-
You first need to download the spreadsheet with stock price and return data from the Assignments tab in Canvas and access the spreadsheet tab titled "Stock Price Data". This tab contains monthly...
-
Molly's Shoe Outfitters is considering a project that has the following cash flow and WACC data. Based on its NPV, Molly's should accept the project. WACC: 12% Year 0 1 2 3 4 5 Cash flows -$2,000...
-
Find solution of the following differential equation y" - x(y') = 0
-
- Show that the vectors [23-1-1], [1 1-2-4], [313 -2], [630-7] form a linearly dependent set.
-
Figure P3 Ho 4 m P B I 4 m F J 4 m b) Calculate the vertical reaction at support A. [0 mark] Provide your answer in units of kN to 4 decimal places. Indicate a horizontal force pointing left as being...
-
Research the following Statutes and Secondary Sources on Lexis. For each problem, Answer in the proper citation format in accordance with ALWD. On statutes and constitutions, be sure to include the...
-
solve [2(3+5.3)] ()
-
Mark the correct statement: All of these statements are correct O The measured values are collectively called data Random errors tend to cancel themselves out over a large number of measurements It...
-
Trade credit from suppliers is a very costly source of funds when discounts are lost. Explain why many firms rely on this source of funds to finance their temporary working capital.
-
Pierre LeBlanc, manager of Centaur Corporation, is thinking about implementing a target costing system in his organization. Several managers have taken him aside and have expressed concerns about...
-
Product mix decision Boyd Wood Company makes a regular and a deluxe grade of wood floors. Regular grade is sold at $16 per square yard, and the deluxe grade is sold at $25 per square yard. The...
-
What is an extrinsic reward?
-
Assume Knowlton Holdings Ltd. completed these long-term non-strategic investment transactions during 2020 : 1. Journalize Knowlton's investment transactions assuming the company reports any changes...
-
Suppose on February 1, 2020, General Motors paid \(\$ 41\) million for a \(40 \%\) investment in ABC Ltd., an auto parts manufacturer. Assume \(A B C\) earned net income of \(\$ 6\) million and paid...
-
Return to exercise SB-7, the Prudential Bache (PB) investment in CitiCorp bonds. Journalize the following on PB's books: a. Purchase of the bond investment on January 2, 2020. PB expects to hold the...
Study smarter with the SolutionInn App