From 8095e0505992d72f4bb2c568d64307a057cd16b7 Mon Sep 17 00:00:00 2001 From: IT Director Date: Tue, 26 Mar 2019 18:10:42 +0000 Subject: [PATCH 1/2] Commited changes --- .../src/com/nirman/easymock/Retailer.java | 61 ++++++++++--------- JavaPowershell/.gitignore | 1 + 2 files changed, 33 insertions(+), 29 deletions(-) create mode 100644 JavaPowershell/.gitignore diff --git a/EasyMock/src/com/nirman/easymock/Retailer.java b/EasyMock/src/com/nirman/easymock/Retailer.java index ef001ef..64c8939 100644 --- a/EasyMock/src/com/nirman/easymock/Retailer.java +++ b/EasyMock/src/com/nirman/easymock/Retailer.java @@ -1,29 +1,32 @@ -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%"; + } +} diff --git a/JavaPowershell/.gitignore b/JavaPowershell/.gitignore new file mode 100644 index 0000000..ae3c172 --- /dev/null +++ b/JavaPowershell/.gitignore @@ -0,0 +1 @@ +/bin/ From 26d4db56790a6d48755ef9c03ce6491cf03dc943 Mon Sep 17 00:00:00 2001 From: onepseudoxy Date: Fri, 17 Jul 2020 19:38:45 +0000 Subject: [PATCH 2/2] Commited changes --- EasyMock/src/com/nirman/easymock/Retailer.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/EasyMock/src/com/nirman/easymock/Retailer.java b/EasyMock/src/com/nirman/easymock/Retailer.java index 64c8939..76ede96 100644 --- a/EasyMock/src/com/nirman/easymock/Retailer.java +++ b/EasyMock/src/com/nirman/easymock/Retailer.java @@ -29,4 +29,8 @@ public int getTaxRate() { public String myTaxRate() { return "100%"; } + + public String myNewTaxRate() { + return "50%"; + } }