编译问题
我的代码:
//我定义了一个类
import java.io.*;
public class Book
{ String Title;
String Pdate;
double Words;
public double price()
{
char month;
month=Pdate.charAt(5);
if(month=='0')
{
if(Pdate.charAt(6)<='6')
return Words/1000*35*1.2;
if(Pdate.charAt(6)>'6' &&
Pdate.charAt(6)<='9')
return Words/1000*35*1.18;
}
if(month=='1')
return Words/1000*35*1.18;
}
public Book(String T,String P,double W)
{
Title=T;
Pdate=P;
Words=W;
}
}