/*
public class TestDoor
{
	public static void main(String[] args) 
	{
		TheftproofDoor t = new TheftproofDoor();
		t.lockUp();
		t.close();
		t.openLock();
		t.open();
	}
}
interface Lock
{
	public void lockUp();
	public void openLock();
}

abstract class Door
{
	public abstract void open();
	public abstract void close();
}

class TheftproofDoor extends Door implements Lock 
{
	
	public void lockUp()
	{
		System.out.println("向左转三圈，锁门");
	}
	public void close()
	{
		System.out.println("关上门");
	}
	public void openLock()
	{
		System.out.println("向右转三圈，开门");
	}
	public void open()
	{
		System.out.println("打开门");
	}
}
*/

public class TestDoor
{
	public static void main(String[] args) 
	{
		Door door = new TheftproofDoor();
		door.close();
		door.openLock();
		door.open();
		door.lockUp();
		door.takePhoto();
	}
}


interface Lock
{
	void openLock();
	void lockUp();
}

interface DoorBell
{
	void takePhoto();
}
abstract class Door implements Lock, DoorBell
{
	public abstract void open();
	public abstract void close();
}

class TheftproofDoor extends Door 
{
	public void open()
	{
		System.out.println("开门");
	}
	public void close()
	{
		System.out.println("关门");
	}
	public void openLock()
	{
		System.out.println("向右转三圈，开锁");
	}
	public void lockUp()
	{
		System.out.println("向左转三圈，上锁");
	}
	public void takePhoto()
	{
		System.out.println("咔嚓，照片已拍好");
	}
}