Java Unit Test for RetailPriceCalculator class | Practice Question

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;
    }

}

CONTACT DETAILS

For any other questions or other tasks please feel free to contact me
via email: mhassnainjamil@gmail.com
via WhatsApp: +92-324-7042178
via skype: hassnainjamil1

Comments

Popular posts from this blog

[SOLVED] Tape for a Turing Machine using Doubly-linked List in Java with full source code

[SOLVED] Branch Coverage, Statement Coverage and Path Coverage | Java Unit Testing

[SOLVED] Buggy Search And Sort Buy Reporting with Java source code