package ru.job4j.profession;

/**
 * This class contains methods to heal the people.
 *
 * @author Kucykh Vasily (mailto:basil135@mail.ru)
 * @version $Id$
 * @since 11.04.2017
 */
public class Doctor extends Profession {

    /**
     * This is constructor of the Doctor class.
     *
     * @param name is Name of the doctor
     * @param diploma is diploma of the doctor
     * @param speciality is a speciality of the doctor
     * @param workExp is the work experience of the doctor
     */
    public Doctor(String name, String diploma, String speciality, int workExp) {
        super(name, diploma, speciality, workExp);
    }

    /**
     * This method heal the patient by a medical preparations.
     *
     * @param patient is the patient of the doctor
     * @return string doctor heal patient by medical preparations
     */
    public String medication(String patient) {

        String result;
        StringBuilder builder = new StringBuilder();

        builder.append(this.getName());
        builder.append(" heal ");
        builder.append(patient);
        builder.append(" by medical preparations");

        result = builder.toString();

        return result;

    }

    /**
     * This method surgery operation with the patient.
     *
     * @param patient is the patient of the doctor
     * @return string doctor surgery operation with patient
     */
    public String surgeryOperation(String patient) {

        String result;
        StringBuilder builder = new StringBuilder();

        builder.append(this.getName());
        builder.append(" surgery operation with ");
        builder.append(patient);

        result = builder.toString();

        return result;

    }

    /**
     * This method resuscitation of the patient.
     *
     * @param patient is the patient of the doctor
     * @return string doctor resuscitation patient
     */
    public String resuscitation(String patient) {

        String result;
        StringBuilder builder = new StringBuilder();

        builder.append(this.getName());
        builder.append(" resuscitation ");
        builder.append(patient);

        result = builder.toString();

        return result;

    }

    /**
     * This method inspect the patient.
     *
     * @param patient is the patient of the doctor
     * @return string doctor inspect patient
     */
    public String inspectionPatient(String patient) {

        String result;
        StringBuilder builder = new StringBuilder();

        builder.append(this.getName());
        builder.append(" inspect patient ");
        builder.append(patient);

        result = builder.toString();

        return result;

    }

}

@@ -856,30 +856,31 @@
  medication(
-String
+Patient
  patient) %7B%0A
@@ -1061,16 +1061,26 @@
 (patient
+.getName()
 );%0A     
@@ -1416,30 +1416,31 @@
 ryOperation(
-String
+Patient
  patient) %7B%0A
@@ -1631,32 +1631,42 @@
 r.append(patient
+.getName()
 );%0A%0A        resu
@@ -1928,22 +1928,23 @@
 itation(
-String
+Patient
  patient
@@ -2130,32 +2130,42 @@
 r.append(patient
+.getName()
 );%0A%0A        resu
@@ -2416,22 +2416,23 @@
 Patient(
-String
+Patient
  patient
@@ -2594,24 +2594,24 @@
 patient %22);%0A
-
         buil
@@ -2628,16 +2628,26 @@
 (patient
+.getName()
 );%0A%0A    

Refactor Doctor.java