//=================================================================================================
public class UseCloneCop {
//-------------------------------------------------------------------------------------------------
    public static void main(String[] args) {

        CloneCop firstCop,secondCop;

        firstCop = new CloneCop("Vic Mackey");
        firstCop.setGun(new CloneGun("Beretta",10));
        firstCop.loadGun();

        secondCop = firstCop;
        if (firstCop == secondCop) {
            System.out.println("The two cops are ==");
        } else if (firstCop.equals(secondCop)) {
            System.out.println("The two cops are equal");
        } else {
            System.out.println("The two cops are different");
        }
        System.out.println();

        secondCop = firstCop.clone();
        if (firstCop == secondCop) {
            System.out.println("The two cops are ==");
        } else if (firstCop.equals(secondCop)) {
            System.out.println("The two cops are equal");
        } else {
            System.out.println("The two cops are different");
        }
        System.out.println();

        firstCop.fireGun();
        firstCop.fireGun();
        firstCop.fireGun();
        if (firstCop == secondCop) {
            System.out.println("The two cops are ==");
        } else if (firstCop.equals(secondCop)) {
            System.out.println("The two cops are equal");
        } else {
            System.out.println("The two cops are different");
        }
    }
//-------------------------------------------------------------------------------------------------
}
//=================================================================================================
