Student.java

1
package edu.ucsb.cs156.student;
2
public class Student {
3
    private String name;
4
    private int perm;
5
6
    public Student() {
7
        name = "Sample Student";
8
        perm = 9999999;
9
    }
10
11
    public Student(String name, int perm) {
12
        this.name = name;
13
        this.perm = perm;
14
    }
15
16
    public String getName() {
17 1 1. getName : replaced return value with "" for edu/ucsb/cs156/student/Student::getName → KILLED
        return this.name;
18
    }
19
20
    public int getPerm() {
21 1 1. getPerm : replaced int return with 0 for edu/ucsb/cs156/student/Student::getPerm → KILLED
        return this.perm;
22
    }
23
24
    @Override
25
    public String toString() {
26 1 1. toString : replaced return value with "" for edu/ucsb/cs156/student/Student::toString → NO_COVERAGE
        return "[name: " + this.name + ", perm: " + this.perm + "]";
27
    }
28
}

Mutations

17

1.1
Location : getName
Killed by : edu.ucsb.cs156.student.StudentTest.test_getName2(edu.ucsb.cs156.student.StudentTest)
replaced return value with "" for edu/ucsb/cs156/student/Student::getName → KILLED

21

1.1
Location : getPerm
Killed by : edu.ucsb.cs156.student.StudentTest.test_getPerm1(edu.ucsb.cs156.student.StudentTest)
replaced int return with 0 for edu/ucsb/cs156/student/Student::getPerm → KILLED

26

1.1
Location : toString
Killed by : none
replaced return value with "" for edu/ucsb/cs156/student/Student::toString → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.5.2