进行语法分析时已到达文件结尾
class Date{
private int year,month,date;
public Date()
{
System.out.println("日期未输入");
}
public Date(int year,int month,int date)
{
this.year=year;
this.month=month;
this.date=date;
}
}
class Certificate extends Date
{
private String number,name;
private char 易做图;
public Certificate()
{
System.out.println("请输入数据");
}
public Certificate(String number,String name,char 易做图)
{
super();
this.number=number;
this.name=name;
this.易做图=易做图;
}
public Certificate(int year,int month,int date,String number,String name,char 易做图)
{
super(year,month,date);
this.number=number;
this.name=name;
this.易做图=易做图;
}
}
class Teacher extends Certificate
{
private String section,job;
public Teacher()
{
System.out.println("请输入教师资料");
}
public Teacher(int year,int month,int date,String number,String name,char 易做图,String section,String job)
{
super(year,month,date,number,name,易做图);
this.section=section;
this.job=job;
}
public void show_Teacher()
{
System.out.println("教师资料\n"+"编号:"+number+"\n姓名:"+name+"\n性别"+易做图+"\n出生年月"+year+"-"+
month+"-"+date+"\n部门:"+section+"\n职务:"+job);
}
class IssueDate extends Date
{
public IssueDate()
{
System.out.println("请输入签发日期");
}
public IssueDate(int year,int month,int date)
{
super(year,month,date);
}
public void show_IssueDate()
{
System.out.println("签发日期:"+year+"-"+month+"-"+date);
}
}
class Student extends Certificate
{
private String college,major,info;
public Student()
{
System.out.println("请输入学生资料");
}
public Student(int year,int month,int date,String number,String name,char 易做图,String college,String major,String info)
{
super(year,month,date,number,name,易做图);
this.college=college;
this.major=major;
this.info=info;
}
public void show_Student()
{
System.out.println("学生资料\n"+"编号:"+number+"\n姓名:"+name+"\n性别:"+易做图+"\n出生年月:"+year+"-"+
month+"-"+date+"\n学院:"+college+"\n专业:"+major+"\n注册信息:"+info);
}
class AdmissionTime extends Date
{
public AdmissionTime()
{
System.out.println("请输入入学时间");
}
public AdmissionTime(int year,int month,int date)
{
super(year,month,date);
}
public void show_AdmissionTime()
{
System.out.println("入学时间:"+year+"-"+month+"-"+date);
}
}
}
public class SchoolManagement
{
public static void main(String args[])
{
Teacher teacher=new Teacher();
Teacher.IssueDate issuedate=teacher.new IssueDate();
Student student=new Student();
Student.AdmissionTime admissiontime=student.new AdmissionTime();
teacher.show_Teacher();
issuedate.show_IssueDate();
student.show_Student();
admissiontime.show_AdmissionTime();
}
}
--------------------编程问答-------------------- class Teacher extends Certificate
{
private String section,job;
public Teacher()
{
System.out.println("请输入教师资料");
}
public Teacher(int year,int month,int date,String number,String name,char 易做图,String section,String job)
{
super(year,month,date,number,name,易做图);
this.section=section;
this.job=job;
}
public void show_Teacher()
{
System.out.println("教师资料\n"+"编号:"+number+"\n姓名:"+name+"\n性别"+易做图+"\n出生年月"+year+"-"+
month+"-"+date+"\n部门:"+section+"\n职务:"+job);
}
class IssueDate extends Date
{
public IssueDate()
{
System.out.println("请输入签发日期");
}
public IssueDate(int year,int month,int date)
{
super(year,month,date);
}
public void show_IssueDate()
{
System.out.println("签发日期:"+year+"-"+month+"-"+date);
}
}
这个类后面少了一个大括号。。。
补充:Java , 非技术区