package ru.job4j.profession;

/**
 * This class is class of profession teacher.
 *
 * @author Kucykh Vasily (mailto:basil135@mail.ru)
 * @version $Id$
 * @since 11.04.2017
 */
public class Teacher extends Profession {

    /**
     * This is constructor of teacher.
     *
     * @param name is the name of the teacher
     * @param diploma is the diploma of the teacher
     * @param speciality is the speciality of the teacher
     * @param workExp is the work experience of the teacher
     */
    public Teacher(String name, String diploma, String speciality, int workExp) {
        super(name, diploma, speciality, workExp);
    }

    /**
     * This method teach a student.
     *
     * @param student is the name of a student
     * @return just a string
     */
    public String teach(String student) {

        String result;
        StringBuilder builder = new StringBuilder();

        builder.append(this.getName());
        builder.append(" teach ");
        builder.append(student);

        result = builder.toString();

        return result;

    }

    /**
     * This method exam a student.
     *
     * @param student is the name of a student
     * @return just a string
     */
    public String exam(String student) {

        String result;
        StringBuilder builder = new StringBuilder();

        builder.append(this.getName());
        builder.append(" examinate ");
        builder.append(student);

        result = builder.toString();

        return result;

    }

}

@@ -791,20 +791,21 @@
 teach(St
-ring
+udent
  student
@@ -983,32 +983,42 @@
 r.append(student
+.getName()
 );%0A%0A        resu
@@ -1233,20 +1233,21 @@
  exam(St
-ring
+udent
  student
@@ -1403,24 +1403,24 @@
 aminate %22);%0A
-
         buil
@@ -1437,16 +1437,26 @@
 (student
+.getName()
 );%0A%0A    

Refactor Teacher.java