Hey, i need a project done for me, [snip]
heres the background of the problem,
Your task is to complete the implementation of a seller server that can be connected to by a telnet buyer. Both seller and buyer will bargain with each other over the network to arrive at a deal and set the price of an item. The seller is implemented as a multithreaded server that will accept any number of client connections. The buyer should be able to connect to a seller over the network and initiate a bargaining session.
The seller has a cost (randomly generated) associated with the item being sold and will not sell at a price lower than the cost value. The seller also has a number of days in which to sell. If the seller’s time limit expires, the whole deal is aborted. One day ticks by each time after each round of bargaining.
For example, a seller with an item worth 100 and a time limit of four days to sell may receive a client bid of 90. If that bid is countered with an offer of 120, the buyer must decide by how much to increase his/her bid. The second round may lead to a bid of 95 and an offer of 115.
Either the buyer or the seller may decide to accept the price set by the other party at any time after the first bid is made. If time runs out and a deal has not been made, the deal is aborted and neither side makes any profit. A seller must not accept a bid less than the cost of the item.
An abstract seller class will be provided for you to extend. You must not alter this class in any way; instead create your own classes that extend the abstract seller class and devise a bidding strategy to counter buyer’s bids.