Institute of Computer Science
  1. Courses
  2. 2018/19 fall
  3. Object-oriented Programming (LTAT.03.003)
ET
Log in

Object-oriented Programming 2018/19 fall

  • Kodutööd ja praktikumid
  • Loengud
  • Kursuse korraldus
  • IDE juhendid
  • Silumisest
  • Edasijõudnute rühm

Prakside kava

  1. Sissejuhatus.
    1. static vs dynamic; kompileeritud vs interpreteeritud; java, javac
    2. IDEA setup + run application
    3. discussion: skoop, primitiivid, täisarvudega jagamine, numbrite castimine, string -> int/double teisendus
    4. IDE tricks: psvm, sout, fori, ctrl+q javadoc; code style, reformat code
  2. Java põhikonstruktsioonid.
    1. pre/post-increment, ternary operator, class imports
    2. meetodi signatuur, overloading, void, early return, array[][]
    3. array loomise variandid, arraysse elementide lisamine, Arrays.toString
    4. harjutused: meetodid, arrayd, cli-args
    5. IDEA advanced: iter, rename symbol, extract method/var, ctrl+b, ctrl+alt+left/right, debugging
    6. koduste tööde esitamisest
  3. Objektid. Klassid.
    1. code style conventions. muutujate ja meetodite nimed
    2. constructor vs method, Object.toString, access modifiers, this (static meetodis?), getter/setter (encapsulation), default constructor, value vs reference
    3. instance vs class, final keyword, static keyword
    4. IDEA: alt+insert → generate constructor/getters/setters/tostring
    5. praksis teha P4, P6, H2, H4
    6. TODO rohkem aega harjutusteks, osad küsimused järgmisesse praksi
  4. Sõned. Failid. Listid.
    1. static method vs instance method
    2. static field
    3. object identity, string equals vs ==
    4. package, import
    5. java.io.File pitfalls
    6. generics; ide warnings
    7. praksis teha P1, P8, H3
  5. Polümorfism, liidesed
    1. kordamine (pass by value, static); signatuur
    2. kordamine: String vs StringBuilder
    3. interface, polymorphism, default methods, dynamic dispatch
    4. praksis peatüki teksti vahel olevad ülesanded
  6. Inheritance
    1. kordamine: final, private, pass by reference/value
    2. meetodi kutsumisel super, this
    3. constructor delegation, super()
    4. dynamic method lookup, instance vs static methods
    5. IDEA: ctrl+i, ctrl+o
    6. praksis P6, tabelid
  7. IO Streams
    1. kordamine: primitives
    2. streamide põhimõte, suurte failidega töötamise probleemid
    3. põhilised meetodid: read(byte[]), write(byte[]), close
    4. InputStreamReader, BufferedReader, DataInputStream/TLV/available()
    5. thread dumps
    6. tcp/ip in 5 minutes
      https://github.com/mbakhoff/sockets-template
      TODO kuidas kirjutada head protokolli
    7. praksi ülesanded: P4, H5, P8
  8. Veahaldus
    1. rühmatööde tutvustus
    2. exceptioni viskamine, propageerumine
    3. millal püüda; rethrow!!
    4. finally, try-with-resources
    5. praksis P3, P6, P9, H4, H10
  9. Git
    1. git demo
    2. ülesandekomplekt HelloGit
    3. http://tom.preston-werner.com/2009/05/19/the-git-parable.html
    4. https://zeroturnaround.com/rebellabs/git-commands-and-best-practices-cheat-sheet/
    5. https://try.github.io/levels/1/challenges/1
    6. http://www.mikedanaher.me/2014/03/28/introduction-to-git/
  10. Lõimed
    1. gson vs serialization
    2. kordamine
    3. ül 4, 5 live
    4. lambda näited, runnable lambda
    5. deadlock näide, thread dump
      https://gist.github.com/mbakhoff/0fd51bfd653b778fcabc
    6. Executors#fixedpool näide
    7. task: ül 2, 3
    8. task: parallel echoserver
    9. task: ül 8
    10. Item 66: Synchronize access to shared mutable data
  11. Collections, generics
    1. koduste ülesannete analüüs (bugid)
      https://github.com/mbakhoff/oop-samples/tree/master/bugs
    2. ül 2, 4, 7
    3. "How does a hashmap work?"
      https://github.com/mbakhoff/hashmap-template
    4. Item 9: Always override hashCode when you override equals
  12. TODO: anon inner classes, rohkem lambda harjutusi
  13. JavaFX
    1. küsimused-vastused
    2. scene graph, layouts
    3. praks7 P3,P6,H2
    4. praks8 P1,P4,H1,H3
  14. Packaging + maven
    https://github.com/mbakhoff/maven-template
  15. Classpath, resource loading
    https://github.com/mbakhoff/classpath-tutorial
  16. Lambdas, method references, stream api
    https://github.com/sim642/oop-lambda-template
  17. JDBC: H2 embedded, prepared statement, transactions
    https://github.com/mbakhoff/jdbc-template
  18. JPA, Hibernate ORM
    https://github.com/mbakhoff/jpa-template
  19. Annotations + reflection
    https://github.com/mbakhoff/reflection-template
  20. Testing with JUnit; Mock objects, constructor injection
    https://github.com/mbakhoff/testing-template
  21. Profiling with VisualVM; Garbage collection
    https://github.com/mbakhoff/profiling-template
  22. Bitwise operators
    https://github.com/mbakhoff/bitwise-template
  23. Processes
    https://github.com/mbakhoff/process-template
  24. Visitor pattern
    https://github.com/sim642/oop-visitor-template
  25. Crypto basics
    https://github.com/mbakhoff/crypto-template
  26. Advanced synchronization
    https://github.com/mbakhoff/synchronization-template
  • Institute of Computer Science
  • Faculty of Science and Technology
  • University of Tartu
In case of technical problems or questions write to:

Contact the course organizers with the organizational and course content questions.
The proprietary copyrights of educational materials belong to the University of Tartu. The use of educational materials is permitted for the purposes and under the conditions provided for in the copyright law for the free use of a work. When using educational materials, the user is obligated to give credit to the author of the educational materials.
The use of educational materials for other purposes is allowed only with the prior written consent of the University of Tartu.
Terms of use for the Courses environment