Assume a developer writes the following class that calculates an item's retail price based on the wholesale cost and markup percentage. Create a unit test to test this class. You may use the source code in any language, pseudo code, or natural language (statements).
public class RetailPriceCalculator {
public static double calculateRetail(double wholesale, double markUp) {
double retail = wholesale * (1 + markUp / 100);
return retail;
}
}
public class RetailPriceCalculator {
public static double calculateRetail(double wholesale, double markUp) {
double retail = wholesale * (1 + markUp / 100);
return retail;
}
}
Comments
Post a Comment