各位请帮忙修改一下,电视机类,谢谢
class Tv{
private long id;
private String model;//型号
private String company;
private String dimension;//大小
private double weight;
private String state;//状态
static String open;
static String cctv1;
static String add;
public Tv(long i,String m,String c,String d,double w,String s)
{
this.id=i;
this.model=m;
this.dimension=d;
this.weight=w;
this.state=s;
}
public long getId()
{
return this.id;
}
public String getModel()
{
return this.model;
}
public String getCompany()
{
return
}
public String getDimension()
{
return this.dimension;
}
public double getWeight()
{
return this.weight;
}
public String getState()
{
return this.state;
}
public static String kaiGuan()
{
return open;
}
public static String changeChannel()
{
return cctv1;
}
public static String changeVoice()
{
return add;
}
}
class TestTv
{
public static void main(String[] args)
{
Tv t=new Tv(017,"长虹2510","长虹公司","21英寸","35公斤","关机状态");
System.out.println("电视编号:"+t.getId());
System.out.println("型号:"+t.getModel());
System.out.println("生产厂家:"+t.getCompany());
System.out.println("大小:"+t.getDimension());
System.out.println("重量:"+t.getWeight());
System.out.println("状态:"+t.getState());
System.out.println("现在电视机"+t.kaiGuan()+"了");
System.out.println("电视机转到"+t.changeChannel());
System.out.println("电视机"+t.changeVoice()+"音量");
}
}
错误提示
--------------------Configuration: <Default>--------------------
G:\java\第三章:面向对象(上)\电视机类.java:65: 找不到符号
符号: 构造函数 Tv(int,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)
位置: 类 Tv
Tv t=new Tv(017,"长虹2510","长虹公司","21英寸","35公斤","关机状态");
^
1 错误
Process completed.
定义电视机类,方法要包括开/关机,更换频道,提高/减小音量。,我这个方法好象没对,怎么定义方法??谢谢谢谢