source: src/main/java/onetomany/bargainingchipsgame/players/Bob.java@ 253

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

Commit #1 of:
+ negotiator.onetomany package refactored into onetomany package.
+ info created for all contained the packages.
+ current work defined under onetomany.bargainingchipsgame.
+ in this package, onetomany.bargainingchipsgame.players package includes packages for utility function, coordinator, negotiatior, and buyer and seller.
+ negotiator.onetomany package now contains nothing, can be deleted.
+ Interaction thread

File size: 1.8 KB
RevLine 
[253]1/**
2 * Bob class
3 */
4package onetomany.bargainingchipsgame.players;
5
6import onetomany.bargainingchipsgame.Bundle;
7import onetomany.bargainingchipsgame.players.utilityfunction.UF_prcntQTYandprcntPrice;
8import onetomany.bargainingchipsgame.players.utilityfunction.Utility_Function;
9
10/**
11 *
12 * Bob is any buyer agent with UF_prcntQTYandprcntPrice utility function and
13 * the other parameters for name of the instance, wishlsit, deadline, and its picture path.
14 *
15 * @author Faria Nassiri-Mofakham
16 *
17 */
18
19
20public class Bob {
21
22
23public Bob(String n, Bundle w, Utility_Function u, long d, String p)
24{
25 Utility_Function u=new UF_prcntQTYandprcntPrice(wishlist,p1,p2);
26 Agent bob=new Agent("Bob"+n, w, u, d, p);
27 Agent bob=new Agent("Bob", w, u, d, null);
28 System.out.println("\nNew agent is created....\n"+bob+"\n");
29
30}
31
32
33 /**
34 * @return the wishlist
35 */
36public Bundle getWishlist() {
37 return wishlist;
38}
39
40/**
41 * @param wishlist the wishlist to set
42 */
43public void setWishlist(Bundle wishlist) {
44 this.wishlist = wishlist;
45}
46
47/**
48 * @return the p1
49 */
50public double getP1() {
51 return p1;
52}
53
54/**
55 * @param p1 the p1 to set
56 */
57public void setP1(double p1) {
58 this.p1 = p1;
59}
60
61/**
62 * @return the p2
63 */
64public double getP2() {
65 return p2;
66}
67
68/**
69 * @param p2 the p2 to set
70 */
71public void setP2(double p2) {
72 this.p2 = p2;
73}
74
75
76/**
77 * @return the deadline
78 */
79public long getDeadline() {
80 return deadline;
81}
82
83
84
85
86/**
87 * @param deadline the deadline to set
88 */
89public void setDeadline(long deadline) {
90 this.deadline = deadline;
91}
92
93
94public static void main(String[] args)
95{
96 Utility_Function u=new UF_prcntQTYandprcntPrice(wishlist,p1,p2);
97 Agent bob=new Agent("Bob", w, u, d, null);
98 System.out.println("\nNew agent creating....\n"+bob+"\n");
99
100}
101
102
103}
104
Note: See TracBrowser for help on using the repository browser.