Fixed startMoney for Nodes and Product

This commit is contained in:
Daniel Poustka 2020-12-26 10:30:22 +01:00
parent 015d558afe
commit b77e9a690a
7 changed files with 7 additions and 9 deletions

View File

@ -47,7 +47,6 @@ public class NodeFactory
switch (Objects.requireNonNull(nodeType))
{
//TODO Money constructor
case Farmer:
n = new Farmer(startMoney);
break;
@ -66,7 +65,6 @@ public class NodeFactory
}
String[] subs = subsChannels.split(";");
//todo Node subscription to channels by parser data
for (String s : subs)
{

View File

@ -4,7 +4,7 @@ import java.util.Random;
public class Customer extends BuyerNodeBase {
public Customer(int startMoney) {
public Customer(double startMoney) {
super();
}

View File

@ -2,7 +2,7 @@ package cz.cvut.fel.sit.omo.foodchain.node;
public class Distributor extends RetailerNodeBase {
public Distributor(int startMoney) {
public Distributor(double startMoney) {
super();
}
}

View File

@ -5,7 +5,7 @@ import cz.cvut.fel.sit.omo.foodchain.product.Product;
public class Farmer extends SellerNodeBase {
public Farmer(int startMoney) {
public Farmer(double startMoney) {
super();
}

View File

@ -2,7 +2,7 @@ package cz.cvut.fel.sit.omo.foodchain.node;
public class Processor extends RetailerNodeBase {
public Processor(int startMoney) {
public Processor(double startMoney) {
super();
}
}

View File

@ -2,7 +2,7 @@ package cz.cvut.fel.sit.omo.foodchain.node;
public class Seller extends RetailerNodeBase {
public Seller(int startMoney) {
public Seller(double startMoney) {
super();
}
}

View File

@ -27,7 +27,7 @@ public class Product
this.money = Monetary.getDefaultAmountFactory().setCurrency("USD").setNumber(0).create();
}
public Product(String name, ProductType productType, Double money)
public Product(String name, ProductType productType, double money)
{
this.name = name;
this.productType = productType;
@ -49,7 +49,7 @@ public class Product
this.money = Monetary.getDefaultAmountFactory().setCurrency("USD").setNumber(0).create();
}
public Product(String name, ProductType productType, ProductState productState, Double money)
public Product(String name, ProductType productType, ProductState productState, double money)
{
this.name = name;
this.productType = productType;