- 实现思路
- 编写类及接口
- 编写测试类、让手机播放音频、发信息和通电话
- 让智能手机上网、播放视频、照相、发信息和通电话

TheakePictures接口
//照相
public interface TheakePictures {
void takePictures();
}``
//连接网络
NetWork接口
public interface NetWork {
void netWorkConn();
}
PlayWiring 接口
//播放
public interface PlayWiring {
void play();
/**
* 手机抽象类
*/
public abstract class Handset {
private String brand;
private String type;
public abstract void sendInfo();
public abstract void call();
public abstract void info();
public String getBrand() {
return brand;
}
public void setBrand(String brand) {
this.brand = brand;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public abstract void show();
}
/**
* 智能手机类
*/
public class AptitudeHandset extends Handset implements NetWork,TheakePictures,PlayWiring{
@Override
public void sendInfo() {
System.out.println(this.getBrand()+this.getType()+"发信息");
}
@Override
public void call() {
System.out.println(this.getBrand()+this.getType()+"打电话");
}
@Override
public void info() {
System.out.println(this.getBrand()+this.getType()+"收信息");
}
@Override