Literature and Lectures
This page contains some useful tutorials for the astah UML editor, information about the text book including reading instructions, and recordings from all lectures.
1. Astah Tutorial
There is a user's guide at http://astah.net/manual Links to an external site..
Videos that show how to create class and sequence diagrams using Astah:
- Fundamental UML Class Diagram, 3 min lectures for your daily modeling - (1) Fundamental UML Class Diagram
Links to an external site.
- Fundamental UML Sequence Diagram,3 min lectures for your daily modeling - (2) Fundamental UML Sequence Diagram
Links to an external site.
- 3 TIPS to create UML Class Diagrams fast, http://astahblog.com/2015/03/11/uml_class_diagram/ Links to an external site.
2. Course Literature, A First Course in Object Oriented Development
The course text book, Lindbäck: A First Course in Object Oriented Development, exists only as a pdf which is available here, object-oriented-development.pdf
Links to an external site..
The code examples from the book are included in this NetBeans project, https://github.com/oodbook/code/
Links to an external site.
3. Lecture Content and Reading Instructions
All lectures are recorded, there are no live lectures except the first. The lectures focus on explaining and giving examples, they do not cover all material. It is therefore not sufficient to just watch the videos, but instead necessary to also read the specified sections of A First Course in Object Oriented Development
Preparation for Seminar 1
Lecture 1, Introduction, Mars 22 10.15-12
To read
Chapter two of A First Course in Object Oriented Development.
Recording
Here is the recorded zoom lecture, https://youtu.be/nIUP5oblktk Links to an external site.. The very first part where I introduce myself is missing, since I forgot to start the recording.
Jag vill poängtera två saker:
- Börja arbetet på en gång, seminarieuppgifterna är omfattande. Det är också nödvändigt att ha tittat på föreläsning 1-4 eller läst kapitel fyra i boken innan första övningen den 25/3.
- Detta ämne handlar i stor utsräckning om diskussion och utvärdering. Det finns många sätt att lösa en uppgift utan att göra direkta fel, och det är viktigt att utvärdera för- och nackdelar hos olika lösningar. Samarbeta därför helst om seminarieruppgifterna (rapporten är dock individuell).
Lecture 2, UML
To read
Section 4.1 of A First Course in Object Oriented Development.
Recording
Föreläsning 2, UML Links to an external site.
Innehåll
- 00:00 Links to an external site. Välkommen till kursen
- 00:28 Links to an external site. Vad är UML?
- 02:17 Links to an external site. Att skapa ett diagram i astah
- 03:46 Links to an external site. Klassdiagram
- 04:34 Links to an external site. Attribut i klassdiagram
- 08:24 Links to an external site. Associationer i klassdiagram
- 13:21 Links to an external site. Noter i klassdiagram
- 15:04 Links to an external site. Övning 1 på klassdiagram
- 17:35 Links to an external site. Övning 2 på klassdiagram
- 20:48 Links to an external site. Sekvensdiagram
- 24:24 Links to an external site. Meddelanden i sekvensdiagram
- 28:28 Links to an external site. Loopar i sekvensdiagram
- 29:44 Links to an external site. If-satser i sekvensdiagram
- 32:09 Links to an external site. Övning på sekvensdiagram
Solutions to exercises
Here is the astah project created in the video, uml-intro.asta Download uml-intro.asta
Lecture 3, Domain Model
To read
Section 4.2 of A First Course in Object Oriented Development.
Recording
Föreläsning 3, domänmodell, del 1 Links to an external site.
Innehåll
- 00:00 Links to an external site. Vad är analys?
- 03:12 Links to an external site. Vad är en domänmodell?
- 07:50 Links to an external site. Steg 1, substantividentifikation
- 11:32 Links to an external site. Steg 2, kategorilista
- 29:05 Links to an external site. Steg 3, ta bort onödiga klasser
Föreläsning 3, domänmodell, del 2 Links to an external site.
Innehåll
- 00:00 Links to an external site. Steg 4, attribut
- 21:13 Links to an external site. Steg 5, associationer
- 35:00 Links to an external site. Typiska misstag i domänmodeller
- 44:48 Links to an external site. Övningar på att upptäcka misstag i en domänmodell
Solutions to exercises
Here is the astah project created in the video, analys.asta Download analys.asta
Lecture 4, System Sequence Diagram
To read
Section 4.3 of A First Course in Object Oriented Development.
Recording
Föreläsning 4, systemsekvensdiagram Links to an external site.
Innehåll
- 00:00 Links to an external site. Repetition av analysens innehåll
- 00:30 Links to an external site. Vad är systemsekvensdiagram?
- 13:58 Links to an external site. Exempel på att rita systemsekvensdiagram
- 35:04 Links to an external site. Loopar och if-satser i systemsekvensdiagram
- 49:03 Links to an external site. Övning på att se fel i systemsekvensdiagram
Solutions to exercises
Here is the astah project created in the video, analys-inkl-ssd-vt20.asta Download analys-inkl-ssd-vt20.asta
Preparation for Seminar 2
Lecture 5, Encapsulation, Cohesion and Coupling
To read
Sections 5.1-5.2 of A First Course in Object Oriented Development.
Recording
Föreläsning 5, designprinciper, del 1 Links to an external site.
Innehåll
- 00:00 Links to an external site. Översikt över designdelen av kursen
- 02:24 Links to an external site. Introduktion till design
- 06:50 Links to an external site. UML för designdiagram
- 21:02 Links to an external site. Övning på att översätta UML till kod
- 41:17 Links to an external site. Översikt över designprinciperna
- 46:13 Links to an external site. Inkapsling
- 56:46 Links to an external site. Övning på inkapsling
Föreläsning 5, designprinciper, del 2 Links to an external site.
00:00
Links to an external site. Hög sammanhållning
07:03
Links to an external site. Övning på sammanhållning
17:10
Links to an external site. Låg koppling
23:24
Links to an external site. Övning på koppling
Solutions to exercises
Here is the astah project with the solutions to the cohesion and coupling exercises, cohesion-coupling-vt20.asta Download cohesion-coupling-vt20.asta
Here is a git repository with the solution to the exercise in implementing a sequence diagram, https://github.com/KTH-IV1350/lec5-UML-to-code Links to an external site..
Lecture 6, Architecture
To read
Section 5.3 of A First Course in Object Oriented Development.
Recording
Föreläsning 6, arkitetur, del 1 Links to an external site.
Innehåll
- 00:00 Links to an external site. Introduktion till arkitektur
- 02:45 Links to an external site. Vad är mönster för mjukvaruutveckling?
- 05:34 Links to an external site. Mönstret MVC
- 17:21 Links to an external site. Paketprivat åtkomst
- 19:35 Links to an external site. MVC-övning, del 1, paketdiagram
- 21:57 Links to an external site. MVC-övning, del 2, Controller
- 23:12 Links to an external site. MVC-övning, del 3, interaktionsdiagram
- 30:22 Links to an external site. MVC-övning, del 4, kod
Föreläsning 6, arkitektur, del 2 Links to an external site.
Innehåll
00:00
Links to an external site. Mönstret lager
18:40
Links to an external site. Mönstret DTO
32:15
Links to an external site. Övning på lager, del 1, paketdiagram
35:00
Links to an external site. Övning på lager, del 2, klassdiagram
39:30
Links to an external site. Övning på lager, del 3, interaktionsdiagram
1:01:17
Links to an external site. Övning på lager, del 4, kod
Solutions to exercises
Here is the astah project with the diagrams created in the architecture exercises, mvc-layer-vt20.asta Download mvc-layer-vt20.asta
Here are git repositories with the code written in the architecture exercises
- https://github.com/KTH-IV1350/lec6-mvc-exe Links to an external site.
- https://github.com/KTH-IV1350/lec6-layer-exe Links to an external site.
Lecture 7, Design Exercise
To read
Section 5.4-5.6 of A First Course in Object Oriented Development.
Recording
Innehåll
00:00
Links to an external site. Presentation av föreläsningens innehåll
02:17
Links to an external site. Översikt av designmetoden
09:15
Links to an external site. Steg 1, skapa lager, skapa klassdiagram
15:31
Links to an external site. Steg 2, designa en systemoperation
36:42
Links to an external site. Steg 3, kolla att designprinciperna följs och steg 4, uppdatera klassidagrammet
38:43
Links to an external site. Design av main
47:51
Links to an external site. Några ord om nästa systemoperation
Solutions to exercises
Here is the astah project with the design that was created in the exercise, process-sale.asta Download process-sale.asta
Preparation for Seminar 3
Lecture 8, Programming Best Practices
To read
Sections 6.1-6.4 of A First Course in Object Oriented Development.
Recording
Föreläsning 8, programmeringsprinciper, del 1 Links to an external site.
Innehåll
00:00
Links to an external site. Presentation av föreläsningar inför sem 3
01:40
Links to an external site. Presentation av föreläsningens innehåll
02:17
Links to an external site. Paketindelning
07:19
Links to an external site. Kodkonventioner
10:05
Links to an external site. Kommentarer
14:11
Links to an external site. Övning på kommentarer
17:58
Links to an external site. Introduktion till illaluktande kod och refaktoreringar
20:07
Links to an external site. Illaluktande kod: duplicerad kod
26:21
Links to an external site. Övning på duplicerad kod
28:56
Links to an external site. Illaluktande kod: lång metod
33:28
Links to an external site. Övning på lång metod
38:44
Links to an external site. Illaluktande kod: Stor klass
Föreläsning 8, programmeringsprinciper, del 2 Links to an external site.
Innehåll
00:00
Links to an external site. Illaluktande kod: lång parameterlista
08:26
Links to an external site. Övning på lång parameterlista
12:16
Links to an external site. Illaluktande kod: för mycket primitivt data
23:04
Links to an external site. Övning på primitivt data
27:25
Links to an external site. Illaluktande kod: meningslösa namn
31:31
Links to an external site. Övning på meningslösa namn
34:04
Links to an external site. Illaluktande kod: Anonyma värden
37:45
Links to an external site. Övning på anonyma värden
Solutions to exercises
Here is a NetBeans project with the code that was written during the exercises, refact-exe-solution.zip Download refact-exe-solution.zip
Lecture 9, Testing
To read
Sections 7.1-7.3 of A First Course in Object Oriented Development.
Recording
Föreläsning 9, enhetstester, del 1 Links to an external site.
Innehåll
00:00
Links to an external site. Introduktion till föreläsningen
00:35
Links to an external site. Introduktion till automatiserade tester
08:36
Links to an external site. Egenskaper som tester måste ha
11:26
Links to an external site. Ett första exempel på enhetstest
18:02
Links to an external site. JUnit
25:15
Links to an external site. Hur tester skapas i NetBeans. OBS! Det går bra att använda viken IDE som helst, det är lika lätt att skapa tester oavsett vilken IDE som används.
32:19
Links to an external site. Övning på testning
37:33
Links to an external site. Best practices för att skriva tester
Föreläsning 9, enhetstester, del 2 Links to an external site.
Innehåll
00:00
Links to an external site. Hur testkoden organiseras
07:05
Links to an external site. Vad ska testas?
11:42
Links to an external site. Övning på att testa rätt saker
18:07
Links to an external site. Tester för svårtestade program
28:52
Links to an external site. Övning på svårtestat program
35:04
Links to an external site. Hur testning hanteras i ett mjukvaruprojekt
Solutions to exercies
Here is the NetBeans project that was used as an example during the lecture, junit5intro.zip Download junit5intro.zip.
Lecture 10, Programming and Testing Exercise
To read
- Section 6.5-6.6 of A First Course in Object Oriented Development
- Section 7.4-7.5 of A First Course in Object Oriented Development
Recording
Föreläsning 10, övning på programmering och testning Links to an external site.
Innehåll
00:00
Links to an external site. Introduktion till föreläsningen
00:56
Links to an external site. Funktionaliteten som ska implementeras och testas
01:22
Links to an external site. Astah kan skapa Java-kod (fast inte jättebra kod)
02:27
Links to an external site. Implementation av main
09:58
Links to an external site. Test av main
13:09
Links to an external site. Fortsatt implementation av main
16:13
Links to an external site. Implementation av systemoperationen startSale
31:19
Links to an external site. Test av startSale. OBS! Detta test testar utskrift till System.out, vilket hör till "additional higher grade tasks", inte till sem 3.
Solutions to exercises
Here is a NetBeans project with the code that was written during the exercise, AmazingPOS.zip Download AmazingPOS.zip.
Lecture 11, Guest Lecture on Git
Guest lecture on Git, by Jenny Olsson. Jenny is a former TIDAB student who is now working with software development.
To read
This is not covered in the book.
Recording
Jenny was unfortunately not available this year. Here is a recording of last year's guest lecture.
- Del 1, lec11-gastforelasning-del1.ogv
- Del 2, lec11-gastforelasning-del2.ogv
Preparation for Seminar 4
Lecture 12, Exception Handling
To read
- Chapter eight of A First Course in Object Oriented Development.
Recording
Föreläsning 12, undantaghantering, del 1 Links to an external site.
Innehåll
00:00
Links to an external site. Presentation av föreläsningar inför sem 4
02:36
Links to an external site. Repetition av grunder om undantag
03:15
Links to an external site. UML för undantag
10:55
Links to an external site. Checked eller unchecked?
13:53
Links to an external site. Undantagsklassers namn
23:56
Links to an external site. Övning på checked/unchecked och namn
27:50
Links to an external site. Använd alltid undantag för fel
30:50
Links to an external site. Använd undantag endast vid fel
31:59
Links to an external site. Övning på returvärde vs undantag
Föreläsning 12, undantaghantering, del 2 Links to an external site.
Innehåll
00:00
Links to an external site. Rätt abstraktionsnivå
04:02
Links to an external site. Inkludera information om felet
06:46
Links to an external site. Övning på information om fel
12:08
Links to an external site. Javadoc
13:05
Links to an external site. Övning på javadoc
16:54
Links to an external site. Tillståndet ska vara oförändrat vid undantag
20:39
Links to an external site. Övning på kontroll av inparametrar
26:42
Links to an external site. Ignorera aldrig undantag
29:16
Links to an external site. Meddela användaren
30:44
Links to an external site. Loggning
31:25
Links to an external site. Övning på felmeddelanden och loggning
Lecture 13, Polymorphism
To read
- Section 9.1-9.2 of A First Course in Object Oriented Development.
Recording
The same exception was by mistake included several times in the throws clause written at the end of part one. This is corrected in the beginning of part two.
Föreläsning 13, polymorfism. del 1 Links to an external site.
Inehåll
00:00
Links to an external site. Definition av polymorfism
01:59
Links to an external site. Exempel på polymorfism, programmet innan polymorfism införs
06:34
Links to an external site. Exempel på polymorfism, hitta det publika gränssnittet
09:46
Links to an external site. Exempel på polymorfism, publikt gränssnitt bryts ut till interface
21:19
Links to an external site. Exempel på polymorfism, klassdiagram
22:22
Links to an external site. Exempel på polymorfism, ta bort beroendet av implementationen
28:57
Links to an external site. Exempel på polymorfism, byta implementation under exekvering
37:05
Links to an external site. När ska polymorfism användas?
40:13
Links to an external site. Att ladda class-filer under exekvering (ingår ej i kursen)
Föreläsning 13, polymorfism, del 2 Links to an external site.
Innehåll
00:00
Links to an external site. Presentation av övning på polymorfism
02:06
Links to an external site. Kod för övningen
04:19
Links to an external site. Övning på polymorfism, hitta det publika gränssnittet
12:00
Links to an external site. Övning på polymorfism, klassdiagram
21:03
Links to an external site. Övning på polymorfism, kommunikationsdiagram
28:28
Links to an external site. Övning på polymorfism, kod
Solutions to exercises
Here are NetBeans projects with the code that was written during the lecture.
- iv1350-polym-logger.zip Download iv1350-polym-logger.zip
- iv1350-polym-exe.zip Download iv1350-polym-exe.zip
Here is the astah project that was created during the lecture, polym-exe.asta Download polym-exe.asta
Lecture 14, Design Patterns
To read
- Section 9.4 of A First Course in Object Oriented Development, but not the pattern Template Method.
Recording
Föreläsning 14, designmönster, del 1, introduktion och mönstret observer Links to an external site.
Innehåll
00:00
Links to an external site. Introduktion till designmönster
05:40
Links to an external site. Mönstret observer
09:53
Links to an external site. Presentation av kursbokens exempel på observer
11:39
Links to an external site. Varför mönstret observer behövs i kursbokens exempel
15:17
Links to an external site. Implementation av observer i kursbokens exempel
36:06
Links to an external site. Kommentarer om observer
Föreläsning 14, designmönster, del 2, mönstren strategy, factory och singleton
Links to an external site.
The loop at line 80 in CarRegistry should have been removed when the strategy pattern was implemented, but was instead left. This is corrected in the git repository project below.
Innehåll
00:00
Links to an external site. Mönstret strategy
02:31
Links to an external site. Presentation av kursbokens exempel på strategy
05:53
Links to an external site. Implementation av strategy i kursbokens exempel BUGG
17:48
Links to an external site. Kommentarer om strategy
20:43
Links to an external site. Mönstret factory
21:42
Links to an external site. Presentation av kursbokens exempel på factory
24:53
Links to an external site. Implementation av factory i kursbokens exempel
30:20
Links to an external site. Kommentarer om factory
33:07
Links to an external site. Mönstret singleton
37:45
Links to an external site. Implementation av singleton i kursbokens exempel
Föreläsning 14, designmönster, del 3, mönstret composite
Links to an external site.
At about 12:30 a package private constructor is created, but it's by mistake given public accessibility instead of package private. Also, PromotingMatch shall return null on line 80 if no matching car is found. The call to PerfectMatch which was previously there is now done by the composite. Both these mistakes are corrected in the git repository project below.
Innehåll
00:00
Links to an external site. Introduktion till mönstret composite
00:23
Links to an external site. Presentation av kursbokens exempel på composite
02:09
Links to an external site. Mönstret composite
07:53
Links to an external site. Implementation av composite i kursbokens exempel
19:20
Links to an external site. Kommentarer om composite
Solutions to exercises
Here is a git repository with the code that was written during the lecture, https://github.com/KTH-IV1350/lec14-oodbook-examples-des-pat.git Links to an external site.
Preparation for Additional Higher Grade Tasks
Lecture 15, Inheritance
This lecture is not required for seminar four, but only for the additional higher grade tasks.
To read
- Section 9.3 of A First Course in Object Oriented Development, and the pattern Template Method, which is described in section 9.4.
Recording
Föreläsning 15, arv del 1, introduktion till arv Links to an external site.
Innehåll
00:00
Links to an external site. Introduktion till arv
02:01
Links to an external site. Skillnaden mellan polymorfism, implementation av interface, och arv.
05:22
Links to an external site. Ett första exempel på arv
08:38
Links to an external site. Omdefiniering av en metod
12:14
Links to an external site. Skillnaden mellan deklaration och implementation
15:36
Links to an external site. Anrop av metod i superklass
18:23
Links to an external site. Arv i UML och åtkomsten protected
Föreläsning 15, arv del 2, design av arv Links to an external site.
Innehåll
00:00
Links to an external site. Presentation av föreläsningen
00:23
Links to an external site. Problem 1 med arv, svårt återanvända kod
08:06
Links to an external site. Problem 2 med arv, arv bryter inkapsling
25:15
Links to an external site. Problem 3 med arv, ingen kontroll av publikt gränssnitt
29:00
Links to an external site. Villkor för att använda arv
34:00
Links to an external site. Exempel på lämpliga sätt att använda arv
Föreläsning 15, arv del 3, mönstret template method Links to an external site.
Innehåll
00:00
Links to an external site. Introduktion till föreläsningen
00:40
Links to an external site. Mönstret template method
06:02
Links to an external site. Presentation av kursbokens exempel på template method
11:30
Links to an external site. Implementation av template method i kursbokens exempel
Solutions to exercises
Here is a NetBeans project with the template method implementation that was written in part three, oodbook-examples-des-pat-with-temp-met.zip Download oodbook-examples-des-pat-with-temp-met.zip. The other code examples written during the lecture are identical to the code in the text book's git repository, Links to an external site. https://github.com/oodbook/code/ Links to an external site.