< Summary

Information
Class: com/ucoruh/calculator/Calculator
Assembly: calculator
File(s): src/main/java/com/ucoruh/calculator/Calculator.java
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 49
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Line coverage
<init>()-100%
<clinit>()-100%
add(...)-100%

File(s)

src/main/java/com/ucoruh/calculator/Calculator.java

#LineLine coverage
 1/**
 2
 3@file Calculator.java
 4@brief This file serves as a demonstration file for the Calculator class.
 5@details This file contains the implementation of the Calculator class, which provides various mathematical operations.
 6*/
 7
 8/**
 9
 10@package com.ucoruh.calculator
 11@brief The com.ucoruh.calculator package contains all the classes and files related to the Calculator App.
 12*/
 13package com.ucoruh.calculator;
 14
 15import org.slf4j.LoggerFactory;
 16
 17import ch.qos.logback.classic.Logger;
 18/**
 19
 20@class Calculator
 21@brief This class represents a Calculator that performs mathematical operations.
 22@details The Calculator class provides methods to perform mathematical operations such as addition, subtraction, multipl
 23@author ugur.coruh
 24*/
 125public class Calculator {
 26
 27  /**
 28   * @brief Logger for the Calculator class.
 29   */
 130  private static final Logger logger = (Logger) LoggerFactory.getLogger(Calculator.class);
 31
 32  /**
 33   * @brief Calculates the sum of two integers.
 34   *
 35   * @details This function takes two integer values, `a` and `b`, and returns their sum. It also logs a message using t
 36   *
 37   * @param a The first integer value.
 38   * @param b The second integer value.
 39   * @return The sum of `a` and `b`.
 40   */
 41  public int add(int a, int b) {
 42    // Logging an informational message
 143    logger.info("Logging message");
 44    // Logging an error message
 145    logger.error("Error message");
 46    // Returning the sum of `a` and `b`
 147    return a + b;
 48  }
 49}

Methods/Properties

<init>()
<clinit>()
add(II)