File notes/fig/uml/Car_Info.tex deleted (index 97ddb63..0000000) |
1 |
|
\documentclass[border=20pt]{standalone}
|
|
2 |
|
\input{template.def}
|
|
3 |
|
|
|
4 |
|
\begin{tikzpicture}
|
|
5 |
|
\node (person) at (0,0){\begin{tabular}{| r l |}
|
|
6 |
|
\hline
|
|
7 |
|
\multicolumn{2}{| c |}{\textbf{Person}} \\
|
|
8 |
|
\hline
|
|
9 |
|
id & : String \\
|
|
10 |
|
name & : String \\
|
|
11 |
|
address & : Street \\
|
|
12 |
|
& City \\
|
|
13 |
|
\hline
|
|
14 |
|
getAge() & : Int \\
|
|
15 |
|
\hline
|
|
16 |
|
\end{tabular}
|
|
17 |
|
};
|
|
18 |
|
\node (phone) at (8, 1){\begin{tabular}{| r l |}
|
|
19 |
|
\hline
|
|
20 |
|
\multicolumn{2}{| c |}{\textbf{Phone}} \\
|
|
21 |
|
\hline
|
|
22 |
|
number & : String \\
|
|
23 |
|
\hline
|
|
24 |
|
\end{tabular}
|
|
25 |
|
};
|
|
26 |
|
\draw[open diamond-] (person) -- node[above, pos=0.1]{$0..\star$} node[above, pos=0.9]{$1..1$} (phone);
|
|
27 |
|
\node (car) at (8, -3){\begin{tabular}{| r l |}
|
|
28 |
|
\hline
|
|
29 |
|
\multicolumn{2}{| c |}{\textbf{Car}} \\
|
|
30 |
|
\hline
|
|
31 |
|
vin & : String \\
|
|
32 |
|
make & : String \\
|
|
33 |
|
year & : Year \\
|
|
34 |
|
brand & : String \\
|
|
35 |
|
\hline
|
|
36 |
|
\end{tabular}
|
|
37 |
|
};
|
|
38 |
|
\draw[-] ($(person)+(2.5,-0.5)$) -- node[above, pos=0.1]{$0..1$} node[above, pos=0.5]{drives} node[above, pos=0.9]{$0..1$} (car);
|
|
39 |
|
%\draw[-] (person) -- node[below, pos=0.1]{$0..1$} node[below, pos=0.9]{$0..4$} ($(car)+(-2.5, 0.5)$);
|
|
40 |
|
\node (seat) at (3.5, -5){\begin{tabular}{| r l |}
|
|
41 |
|
\hline
|
|
42 |
|
\multicolumn{2}{| c |}{\textbf{Seats In}} \\
|
|
43 |
|
\hline
|
|
44 |
|
position & : String \\
|
|
45 |
|
\hline
|
|
46 |
|
\end{tabular}
|
|
47 |
|
};
|
|
48 |
|
\draw[dashed] (seat) -- (3.5, -1.6);
|
|
49 |
|
|
|
50 |
|
\node (insu) at (14.3, -2){\begin{tabular}{| r l |}
|
|
51 |
|
\hline
|
|
52 |
|
\multicolumn{2}{| c |}{\textbf{Car Insurance}} \\
|
|
53 |
|
\hline
|
|
54 |
|
policy number & : String \\
|
|
55 |
|
covered amount & : int \\
|
|
56 |
|
compagny name & : String \\
|
|
57 |
|
\hline
|
|
58 |
|
\end{tabular}
|
|
59 |
|
};
|
|
60 |
|
|
|
61 |
|
\draw[diamond -] (car) -- node[above, pos=0.1]{$0..\star$} node[above, pos=0.9]{$1$} (insu);
|
|
62 |
|
\end{tikzpicture}
|
|
63 |
|
\end{document} |
|
File notes/fig/uml/Driver.tex deleted (index 469781d..0000000) |
1 |
|
\documentclass[border=20pt]{standalone}
|
|
2 |
|
\input{template.def}
|
|
3 |
|
|
|
4 |
|
\begin{tikzpicture}
|
|
5 |
|
\node (movie) at (0,0){\begin{tabular}{| r l |}
|
|
6 |
|
\hline
|
|
7 |
|
\multicolumn{2}{| c |}{\textbf{DRIVER}} \\
|
|
8 |
|
\hline
|
|
9 |
|
id & : String \\
|
|
10 |
|
dob & : Date \\
|
|
11 |
|
name & : String \\
|
|
12 |
|
address & : Street \\
|
|
13 |
|
& City \\
|
|
14 |
|
\hline
|
|
15 |
|
getAge() & : Int \\
|
|
16 |
|
\hline
|
|
17 |
|
\end{tabular}
|
|
18 |
|
};
|
|
19 |
|
\node (cdriver) at (8, 1){\begin{tabular}{| r l |}
|
|
20 |
|
\hline
|
|
21 |
|
\multicolumn{2}{| c |}{\textbf{COMMERCIAL\_DRIVER}} \\
|
|
22 |
|
\hline
|
|
23 |
|
Class & : String \\
|
|
24 |
|
\hline
|
|
25 |
|
\end{tabular}
|
|
26 |
|
};
|
|
27 |
|
%\draw[open diamond-] (movie) -- node[above, pos=0.1]{$0..\star$} node[above, pos=0.9]{$1..1$} (cdriver);
|
|
28 |
|
\draw[{Triangle[open]}-] (movie) -- %node[above, pos=0.1]{$0..\star$} node[above, pos=0.9]{$1..1$}
|
|
29 |
|
(cdriver);
|
|
30 |
|
\node (car) at (9, -2){\begin{tabular}{| r l |}
|
|
31 |
|
\hline
|
|
32 |
|
\multicolumn{2}{| c |}{\textbf{CAR}} \\
|
|
33 |
|
\hline
|
|
34 |
|
vin & : String \\
|
|
35 |
|
make & : String \\
|
|
36 |
|
year & : Year \\
|
|
37 |
|
brand & : String \\
|
|
38 |
|
\hline
|
|
39 |
|
\end{tabular}
|
|
40 |
|
};
|
|
41 |
|
\draw[-] ($(movie)+(2.5,-0.5)$) -- node[above, pos=0.1]{$0..*$} node[above=0.5em]{POSSESSES} node[above, pos=0.9]{$0..*$} (car);
|
|
42 |
|
%\draw[-] (movie) -- node[below, pos=0.1]{$0..1$} node[below, pos=0.9]{$0..4$} ($(car)+(-2.5, 0.5)$);
|
|
43 |
|
\node (seat) at (3.5, -5){\begin{tabular}{| r l |}
|
|
44 |
|
\hline
|
|
45 |
|
\multicolumn{2}{| c |}{\textbf{POSSESSION\_HISTORY}} \\
|
|
46 |
|
\hline
|
|
47 |
|
date of purchase & : Date \\
|
|
48 |
|
\hline
|
|
49 |
|
\end{tabular}
|
|
50 |
|
};
|
|
51 |
|
\draw[dashed] (seat) -- (3.5, -1.2);
|
|
52 |
|
|
|
53 |
|
\node (insu) at (15.5, 2){\begin{tabular}{| r l |}
|
|
54 |
|
\hline
|
|
55 |
|
\multicolumn{2}{| c |}{\textbf{CAR\_INSURANCE}} \\
|
|
56 |
|
\hline
|
|
57 |
|
policy number & : String \\
|
|
58 |
|
covered amount & : int \\
|
|
59 |
|
compagny name & : String \\
|
|
60 |
|
\hline
|
|
61 |
|
\end{tabular}
|
|
62 |
|
};
|
|
63 |
|
|
|
64 |
|
\draw[diamond -] (car) -- node[below, pos=0.1, right=.2]{$1..1$} node[below, pos=0.9, right=0.2]{$1..\star$} node[below right=0.2]{IS\_COVERED\_BY} (insu);
|
|
65 |
|
\end{tikzpicture}
|
|
66 |
|
|
|
67 |
|
\end{document} |
|
File notes/fig/uml/Flight.tex deleted (index 97d35d5..0000000) |
1 |
|
\documentclass[border=20pt]{standalone}
|
|
2 |
|
\input{template.def}
|
|
3 |
|
|
|
4 |
|
\begin{tikzpicture}
|
|
5 |
|
\begin{class}[text width=7cm]{Flight}{0,0}
|
|
6 |
|
\attribute{flightNumber : Integer}
|
|
7 |
|
\attribute{departureTime : Date}
|
|
8 |
|
\attribute{flightDuration : Minutes}
|
|
9 |
|
\attribute{departingAirport : String}
|
|
10 |
|
\attribute{arrivingAirport : String}
|
|
11 |
|
\operation{delayFlight(numberOfMinutes : Minutes)}
|
|
12 |
|
\operation{getArrivalTime( ) : Date}
|
|
13 |
|
\end{class}
|
|
14 |
|
\begin{class}{Plane}{11, -0.8}
|
|
15 |
|
\attribute{airPlaneType : String}
|
|
16 |
|
\attribute{maximumSpeed : MPH}
|
|
17 |
|
\attribute{maximumDistance : Miles}
|
|
18 |
|
\attribute{tailID : String}
|
|
19 |
|
\end{class}
|
|
20 |
|
\association{Plane}{}{0..1}{Flight}{0..*}{}
|
|
21 |
|
\end{tikzpicture}
|
|
22 |
|
|
|
23 |
|
\end{document} |
|
File notes/fig/uml/Hand.tex deleted (index d916363..0000000) |
1 |
|
\documentclass[border=20pt]{standalone}
|
|
2 |
|
\input{template.def}
|
|
3 |
|
|
|
4 |
|
\begin{tikzpicture}
|
|
5 |
|
\begin{class}[text width=7cm]{Hand}{0,0}
|
|
6 |
|
\attribute{\emph{attributes would go here}}
|
|
7 |
|
\operation{\emph{operations would go here}}
|
|
8 |
|
\end{class}
|
|
9 |
|
\begin{class}{Person}{11, 0}
|
|
10 |
|
\attribute{\emph{attributes would go here}}
|
|
11 |
|
\operation{\emph{operations would go here}}
|
|
12 |
|
\end{class}
|
|
13 |
|
\association{Hand}{Belongs}{0..1}{Person}{0..*}{Possesses}
|
|
14 |
|
\end{tikzpicture}
|
|
15 |
|
|
|
16 |
|
\end{document} |
|
File notes/fig/uml/flight_02.tex deleted (index c4d7815..0000000) |
1 |
|
\documentclass[border=20pt]{standalone} |
|
2 |
|
\input{template.def} |
|
3 |
|
|
|
4 |
|
\begin{tikzpicture} |
|
5 |
|
\begin{class}[text width=7cm]{Pilot}{0,0} |
|
6 |
|
\attribute{Id : Integer} |
|
7 |
|
\attribute{Name : String} |
|
8 |
|
\attribute{Experience : Level} |
|
9 |
|
\end{class} |
|
10 |
|
\begin{class}{Plane}{11, 0} |
|
11 |
|
\attribute{tailId : Integer} |
|
12 |
|
\attribute{MaxSpeed : MPH} |
|
13 |
|
\attribute{AirPlaneType: Model} |
|
14 |
|
\end{class} |
|
15 |
|
\association{Plane}{}{1..*}{Pilot}{0..1}{} |
|
16 |
|
\end{tikzpicture} |
|
17 |
|
|
|
18 |
|
\end{document} |
|