class Person
{
String name;
String birthday;
String getName()
{
return name;
}
void setName(String ten)
{
name = ten;
}
void setBirthday(String sn)
{
birthday = sn;
}
public String toString()
{
String temp = "name: " + name + " ; " + " ngay sinh: " + birthday;
return temp;
}
}
class Employee extends Person
{
double salary;
double getSalary()
{
return salary;
}
void setSalary(double hesoluong)
{
salary = hesoluong;
}
public String toString()
{
String temp = super.toString() + " ; he so luong: " + salary;
return temp;
}
}
class Manager extends Employee
{
Employee assistant;
void setAssistant(Employee assis)
{
assistant = assis;
}
public String toString()
{
String temp = "asistant: " + super.toString();
return temp;
}
}
public class b5_page_150
{
public static void main(String[] args)
{
Person[] ps = new Person[3];
ps[0] = new Person();
ps[1] = new Employee();
ps[2] = new Manager();
ps[0].setName("ruoi muoi");
ps[0].setBirthday("26/7/1999");
System.out.println( ps[0].toString() );
ps[1].setName("trau bo");
ps[1].setBirthday("2605/199x");
ps[1].setSalary(9.9);
System.out.println( ps[1].toString() );
}
}
tại sao em gọi hàm setSalary thì nó báo cant not find sysbol nhỉ


Hoặc là bạn có thể thử cách sau
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?