Assignment 2.1 Test Driven Development

POC TEST OF TECH.IO For Course Material suppliments

Ye be warned! This is just a demo of Do not assume this is even remotely accurate or relevant.

Test driven development

Test driven development is a software development technique that allows you to create software based on a pre-defined specification or set of specifications that you define in advance of writing your code. This way you constrain yourself to a set of features and behaviours that you need to implement and can continuously test your code until the expected behaviour is achieved.


Assignment 2.1
In this assignment you have been given a specification to create a calculator program. A senior developer has provided an Interface that describes what methods the calculator is expected to have, and a suite of tests to test these methods. Your task is to implement this interface, and write a calculator class that passes the test suite.

    public interface ICalculator {
        double Add(double firstNumber, double secondNumber);
        double Subtract(double firstNumber, double secondNumber);
        double Multiply(double firstNumber, double secondNumber);
        double Divide(double firstNumber, double secondNumber);

Write your code here

Write your code inside the already defined Calculator class
Create your playground on
This playground was created on, our hands-on, knowledge-sharing platform for developers.
Go to
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
Online Participants