1) (80 points)
You work for ACME products, a retail company that sells 3 sizes of bags of dog food from its warehouse: small bag for $5, medium size bag for $10, and large bags for $15. You have 5 small bags, 3 medium size bags, and 2 large bags in your warehouse. Your remotely located customer (client) will select which kinds of dog food he/she wants to buy, and will pay online.
You will report on the ACME side (server) how many bags of dog food of each size are remaining, and how much money you have collected. You will assume that the customer always pays in multiples of $5, and we will ignore things like exactly how it’s done, if the customer selects a $5 payment then a $5 payment will be sent, and we will ignore things like credit cards, etc. You will inform the customer when no more bags of dog food of a particular size are available. You will report all current status on both client and server.
You will do this two ways:
- (40 points) Write a small socket program to do the above. Use a command line interface for the customer and for the server.
- (40 points) Write a small program using JAX-WS to do the above. Use a command line interface for the customer and for the server.
I have given you starter socket code and starter JAX-WS code on canvas. You MUST start with THIS CODE THAT I HAVE GIVEN YOU. DON’T USE outside code that you download from the internet. DON’T write your own from scratch.
Grading for both a) program and b) program:
- Detailed instructions for how to run program. (15 points)
If I have to ask you for help to run the program you will lose this 15 points. If I can’t run it (at that point you lose the 15 points) then I will email you and give you ONE chance to improve your instructions. If I can’t run the program even after you email me back with improved instructions from your email response, then you will lose ALL points from the program.
NOTE: this includes comments in the actual program.
- Client connects to server (5 points)
- Dog food handled correctly on server, including running out of bags (5 points)
- Payment handled correctly on client (5 points)
- Dog food handled correctly on client (5 points)
- Payment handled correctly on server (5 points)
2) (20 points)
Describe the advantages and disadvantages when comparing JAX-WS to sockets. This must be TYPEWRITTEN and turned in along with your program source code and detailed instructions.
- Course Help
- Homework Help
- Writing Help
- Academic Writing Assistance
- Editing Services
- Plagiarism Checker Online
- Research Writing Help