source: src/main/java/negotiator/onetomany/Preference.java@ 226

Last change on this file since 226 was 226, checked in by Faria Nassiri Mofakham, 6 years ago

GUI updated (using Jpanel). DemandPlanDrawing updated. PutImaged renamed to DrawImage. DemandPlan is updating for the Utility, Bid, and Preference classes. Protocol and Agents packages (and some classes) added.

File size: 752 bytes
Line 
1package negotiator.onetomany;
2
3import java.util.HashMap;
4
5public class Preference extends DemandPlan
6{
7
8 private Bid desiredBid = new Bid();
9 private HashMap<Product, Double> weight = new HashMap<Product, Double>();
10
11 Product redProduct = new Product("Red");
12 Product pinkProduct = new Product("Pink");
13 Product blueProduct = new Product("Blue");
14
15
16 desiredBid.setQuantity(redProduct,4);
17 desiredBid.setQuantity(pinkProduct,4);
18 desiredBid.setQuantity(blueProduct,2);
19
20 weight.setWeight(redProduct,0.6);
21 weight.setWeight(pinkProduct,0.3);
22 weight.setWeight(blueProduct,0.1);
23
24
25 public Bid getDesiredBid()
26 {
27 return desiredBid;
28 }
29
30
31 public HashMap<Product, Double> getWeight()
32 {
33 return weight;
34 }
35
36}
37
Note: See TracBrowser for help on using the repository browser.