Project Detail

Products  

Products is project number 426812
posted at Freelancer.com. Click here to post your own project.

 

| More Free Trial For New Buyers
 

Status:

Selected Providers: fstudio

Budget: $30-250

Created: 04/29/2009 at 16:16 EDT

Bid Count: 11

Average Bid:
$ 100

05/01/2009 at 16:16 EDT

Project Creator: stallion5000
Employer Rating: 10/1010/1010/1010/1010/1010/1010/1010/1010/1010/10 (5 reviews)

Bid On This Project
 

Description

I have provided the following resources for this exercise:

· A character file Products.txt which contains details of the products. This must be stored in the same directory as the server detailed in the next bullet point and the code for the business object. You will not need to change this.

· The complete source code of the server in the class ECommerceServer.java. You will not need to change this.

· The complete source code for the business object Product.java. You will not need to change this.

· The code for the client solution in the class EClientSolution.java.

· The code for the exercise in EClient.java


In this exercise I would like you to develop some of the code for the client used within a very simple ecommerce application which is designed in three layers. The first layer (the database layer) consists of a Properties database and a server which accesses it. A Properties object is a file-based data structure which has the same functionality as a Hashtable. The database associated with this data structure is shown below:

Sh1=Shirts*200*
Tie=Ties*1200*
Scsb=Blue Socks*1500*
Scsy=Yellow Socks*200*

It is a simple database which relates a unique key with the name of a retail product and the current quantity in stock of that product; so, for example, the first line states that Sh1 will be the key for shirts and currently there are 200 in stock. In the database asterisks are used to terminate sub-fields.

The server is very simple: all it does is to continually loop around waiting for messages from clients and acting on them.

The middle layer is implemented using business objects defined by the class Product. This has two instance variables (both strings). The first represents the number in stock of the product and the second represents the name of the product. The class Product consists of two methods which retrieve the instance variables, a static method which initializes the database containing product details and a constructor. The constructor takes a key as an argument and creates an object associated with the key. If the key does not exist in the database then a Product object is still created; however, it will have both its
instance variables set to the string value "Error".

The final layer is the client. This consists of a frame that contains three buttons, a text field and a text area. The product button, when clicked, will take the string in the text field and send a message to the server asking for the name of the product corresponding to the key. When this is returned it is displayed in the text area. The quantity button, when clicked, will take the string in the text field and send a message to the server asking for the quantity in stock of the product corresponding to the key. When this is returned it will be displayed in the text area. In each of the two cases above the server will send a string back representing the data required. If the server is unable to find the product in its
database then it just sends back an asterisk. The third button quits the application.

The client communicates with the server using a simple protocol: if it requires the
quantity in stock of a product it will send a ‘Q’ character followed by the key; if it
requires the name of a product then it sends an ‘I’ character followed by the key.

The tasks that I would like you to carry out are to fill in the missing code which sends a message to the server when the name of the product is asked for and processes the string which returns from the server. I have already implemented the error processing that is needed. The code required should really be only two lines in length.

I want you to carry out the following tasks:

· Read the code in the class Product which represents the business object and understand it.
· Read the code in the class ECommerceServer and understand it.
· Execute the server. It should issue messages indicating that it has started and is waiting for a connection.
· Run the client solution. This will execute the code within EClientSolution. Convince yourself that it is working by typing in some of the product keys, for example Tie.
· Quit the client by clicking the quit button.
· Read the code in EClient which occurs after the ignored section. In the code for processing the product button there are two missing lines. Understand the processing that is going on.
· Supply the missing code, there are only a couple of lines.
· Execute the EClient code and check that you have correctly programmed the example.
· Quit the client by clicking the quit button.
· Explain what is happening in this three-tier architecture.


Additional files submitted:
EClient.java
EClientSolution.java
ECommerceServer.java
Product.java
Products.txt

Messages Posted:0 View project clarification board Post message on project clarification board

Bid On This Project
 

If you are the project creator or one of the bidders Log In for more options

 

30

0 days

04-30-2009 00:27 EDT

Dear sir, I can do it for you, Could you see PMB for more details? Thanks. Best Regards.

help

 

30

1 day

04-30-2009 00:26 EDT

Hi, I am interested in your project.

help

 

200

3 days

04-29-2009 16:44 EDT

Hi, Please check pmb

help

 

50

0 days

04-29-2009 23:33 EDT

Dear friend pls see pmb for more details

help

 

100

3 days

04-29-2009 21:59 EDT

Hi, I had thoroughly read the requirements and viewed the code. I can get this project done professionally. Thanks.

help

 

75

1 day

04-29-2009 22:29 EDT

Hi, I have gone through your requirement and supplied code. I will deliver it to you within a day with description. thanks

help

 

100

5 days

04-29-2009 21:44 EDT

I have carefully reviewed your requirement and code, I think I can help you to implement your exercise.

help

 

60

0 days

04-29-2009 17:18 EDT

(No Feedback Yet)

I have this done for you now. I can supply as soon as you accept my bid. Please see PMB.

help

 

100

2 days

04-29-2009 22:22 EDT

(No Feedback Yet)

Hello Sir/Madam, Lets start this project. I am sun certified java programmer so i can complete your task very easily with 100% Quality in agreed time period. I have understood your requirement waiting for your reply to start the project immediately. Thanks Bala

help

 

250

5 days

04-30-2009 00:49 EDT

(No Feedback Yet)

I will get the code checked by my java champ and pmb you in some 8-10 hours. I am sure we will be able to serve you the best!!!

help

 

100

7 days

04-30-2009 05:47 EDT

(No Feedback Yet)

The whole program should be check out and then have to fill up your standard requirements

help


    Bid on this Project