CTC++ Coverage Report - Execution Profile    #3/3

Directory Summary | Files Summary | Functions Summary | Execution Profile
To files: First | Previous | Next | Last | Index | No Index


File: io.java
Instrumentation mode: function-decision-multicondition
TER: 82 % ( 9/ 11)

Start/ End/    
True False - Line Source

  1 import java.io.BufferedReader;
  2 import java.io.IOException;
  3 import java.io.InputStreamReader;
  4 public class io
  5 {
  6    int value;
  7    
 
10   8    public boolean allowedValue() throws IOException //check if Value is an Integer && !0
  9    {
  10    BufferedReader console = new BufferedReader(new InputStreamReader(System.in));
  11    String mystring = new String();
  12    mystring = console.readLine();
  13       
10   14    try
  15       {
  16          Integer.parseInt(mystring);                    //check if Integer
  17          value = Integer.parseInt(mystring);   
  18          
  19          if (value != 0)                                //check if !0 
   20             return true; 
    21          else
   22             return false;
  23       }
 - 24       catch(NumberFormatException err)                  //not an Integer
  25       {
 - 26          return false; 
  27       }
  28    }
  29 
 
  30    public void test()
  31    {
  32       Prime myPrime = new Prime(this.value);
  33       
  34       if (myPrime.isPrime())
  35          System.out.println("ja");
    36       else
  37          System.out.println("nein");
  38    }
  39    
  40 }
  41 
***TER 82% (9/11) of SOURCE FILE io.java

Directory Summary | Files Summary | Functions Summary | Execution Profile
To files: First | Previous | Next | Last | Top | Index | No Index