Định nghĩa abstract class Employee có field protected double baseSalary và abstract method double Salary(). Lớp sealed Manager : Employee có field double bonus, constructor nhận (baseSalary, bonus), override Salary() trả về baseSalary + bonus. Đọc baseSalary và bonus, tạo Manager, in Salary() format "0.00" invariant.
Một dòng: baseSalary bonus (số thực, dùng dấu chấm).
0 <= baseSalary, bonus <= 10^7; vào số dùng dấu chấm thập phân.
Một dòng: lương tổng format "0.00".
Ví dụ:
Đầu vào:
1000 250.5
Đầu ra:
1250.50
Giải thích:
Đang tải editor...