有同学能帮我看一下我写的有啥问题嘛
题目:利用抽象类和接口知识点编写一个功能
例如 手机 >非智能手机>智能手机
抽象类的基本属性 手机的基本属性
抽象类的抽象方法 基本电话功能
接口
1,有摄像和拍照功能
2,蓝牙功能
3,定位功能
代码:package com.dmd;
public abstract class phone {
private String brand;
private int price;
public abstract void call();
public abstract void message();
public phone(String brand, int price) {
System.out.println("Basic attributes and functions");
this.brand = brand;
this.price = price;
this.call();
this.message();
}
public interface photograph {
public void photograph();
}
public interface bluetooth {
public void bluetooth();
}
public interface location {
public void location();
}
}