You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/9/en/part9d.md
+29-26Lines changed: 29 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -547,64 +547,67 @@ which tells us that we are using a variable somewhere where it should never be u
547
547
Let us now continue extending the app created in exercise 9.14. First, add the type information and replace the variable *courseParts* with the one from the example below.
Now we know that both interfaces *CourseNormalPart* and *CourseSubmissionPart* share not only the base attributes but also an attribute called *description*, which is a string in both interfaces.
608
+
Now we know that both interfaces *CoursePartBasic* and *CoursePartBackround* share not only the base attributes but also an attribute called *description*, which is a string in both interfaces.
606
609
607
-
Your first task is to declare a new interface that includes the *description* attribute and extends the *CoursePartBase* interface. Then modify the code so that you can remove the *description* attribute from both *CourseNormalPart* and *CourseSubmissionPart* without getting any errors.
610
+
Your first task is to declare a new interface that includes the *description* attribute and extends the *CoursePartBase* interface. Then modify the code so that you can remove the *description* attribute from both *CoursePartBasic* and *CoursePartBackround* without getting any errors.
608
611
609
612
Then create a component *Part* that renders all attributes of each type of course part. Use a switch case-based exhaustive type checking! Use the new component in component *Content*.
610
613
@@ -616,7 +619,7 @@ Lastly, add another course part interface with the following attributes: *name*,
0 commit comments