-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreports.dart
28 lines (25 loc) · 1.01 KB
/
reports.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
abstract class Report {
String showPrimaryGradeReport();
String showSecondaryGradeReport();
String showGrade3Report();
}
class HTMLReport implements Report {
String showPrimaryGradeReport() =>
"<h1>This is a grade Primary report</h1>\n";
String showSecondaryGradeReport() =>
"<h1>This is a grade Secondary report</h1>\n";
String showGrade3Report() => "<h1>This is a grade 3 report</h1>\n";
}
class PlainTextReport implements Report {
String showPrimaryGradeReport() => "This is a grade Primary report\n";
String showSecondaryGradeReport() => "This is a grade Secondary report\n";
String showGrade3Report() => "This is a grade 3 report\n";
}
class XMLReport implements Report {
String showPrimaryGradeReport() =>
"<StudentReport>This is a grade Primary report</StudentReport>\n";
String showSecondaryGradeReport() =>
"<StudentReport>This is a grade Secondary report</StudentReport>\n";
String showGrade3Report() =>
"<StudentReport>This is a grade 3 report</StudentReport>\n";
}