Commit fb37d2a9 authored by Gerson Sunye's avatar Gerson Sunye
Browse files

mapping UML to code

parent 4653a978
......@@ -18,7 +18,7 @@
\usepackage{amsmath}
\usepackage{siunitx}
\usepackage{exsheets}
\SetupExSheets{solution/print=false}
\SetupExSheets{solution/print=true}
\usepackage{booktabs}
\usepackage{paralist}
......@@ -161,6 +161,7 @@ UnlimitedNatural & \\
\begin{question}
\textbf{Attribute Implementation (Getter/Setter approach)}
......
......@@ -40,6 +40,10 @@ public class Event {
}
public void setName(@Nonnull String str) {
Validate.notNull(str);
Objects.nonNull(str);
name = str;
}
......@@ -56,6 +60,7 @@ public class Event {
}
protected void setStart(@Nonnull Date d) {
Validate.isTrue(d.before(end));
start = d;
}
......@@ -64,6 +69,8 @@ public class Event {
}
protected void setEnd(@Nonnull Date d) {
Validate.isTrue(d.after(start));
end = d;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment