diff --git a/EasyMock/src/com/nirman/easymock/Retailer.java b/EasyMock/src/com/nirman/easymock/Retailer.java index ef001ef..76ede96 100644 --- a/EasyMock/src/com/nirman/easymock/Retailer.java +++ b/EasyMock/src/com/nirman/easymock/Retailer.java @@ -1,29 +1,36 @@ -package com.nirman.easymock; - -public class Retailer { - - private int taxes_in_percent = 10; - - public int getPriceForProduct(String productId) throws Exception { - int price; - if (productId.equals("101")) { - price = getPrice(100); - } else if (productId.equals("102")) { - price = getPrice(200); - } else if (productId.equals("103")) { - price = getPrice(300); - } else { - price = 0; - } - return price; - } - - private int getPrice(int basePrice) { - int finalPrice = basePrice + ((basePrice * getTaxRate()) / 100); - return finalPrice; - } - - public int getTaxRate() { - return taxes_in_percent; - } -} +package com.nirman.easymock; + +public class Retailer { + + private int taxes_in_percent = 10; + + public int getPriceForProduct(String productId) throws Exception { + int price; + if (productId.equals("101")) { + price = getPrice(100); + } else if (productId.equals("102")) { + price = getPrice(200); + } else if (productId.equals("103")) { + price = getPrice(300); + } else { + price = 0; + } + return price; + } + + private int getPrice(int basePrice) { + int finalPrice = basePrice + ((basePrice * getTaxRate()) / 100); + return finalPrice; + } + + public int getTaxRate() { + return taxes_in_percent; + } + public String myTaxRate() { + return "100%"; + } + + public String myNewTaxRate() { + return "50%"; + } +} diff --git a/JavaPowershell/.gitignore b/JavaPowershell/.gitignore new file mode 100644 index 0000000..ae3c172 --- /dev/null +++ b/JavaPowershell/.gitignore @@ -0,0 +1 @@ +/bin/