layout | title |
---|---|
page |
Topics and Assignments |
Other pages: About the Course, Google Classroom code umax14s, Learn Java, Scores, Contact
Topic | Material | Assignment |
---|---|---|
[Introduction](intro/) | [Introduction to the course](intro/Introduction-to-Course.pdf) [Intro to Classes & Objects](intro/Intro-Classes-and-Objects.pdf) [Which Programming Language to Learn?](intro/Language-Comparison) | Get the [Required software and sign-up](Software1) Join [Google Classroom](https://classroom.google.com) using code **umaxt4s**. We use Github Classroom for programs, Google Classroom for other assignments. |
[Intro to Java](java-basics/) | [Intro to Java](java-basics/00-Intro-to-Java.pdf) [Java Class Structure](java-basics/01-Program-Structure.pdf) includes packages [Coding Standard and Javadoc](intro/Coding-Standard-and-Javadoc.pdf) | Read [OODP Chapter 1](docs/OODP-Chapter1.pdf) or [these good sources](Learning) [Fundamental Java Methods](docs/Fundamental-Methods.pdf) everyone should by able to write. [Java Coding Standard](docs/Java-Coding-Standard.pdf) required for all code and general [Coding Guidelines](docs/Coding-Guidelines). |
Java Basics | [Arrays](java-basics/17-Arrays.pdf), [Using Arrays](java-basics/18-Using-Arrays) [ArrayList](java-basics/20-ArrayList.pdf) [Packages](java-basics/21-Packages.pdf) [Static Methods](java-basics/15-Static-Methods.pdf) [Conditionals](java-basics/10-Conditional.pdf), [Boolean Ops & Switch](java-basics/10-Conditional2.pdf) | Read [OODP Chapter 1](docs/OODP-Chapter1.pdf) or *Big Java* for Java language. See [Learning Java](Learning) for more good sources. |
[OO Fundamentals](oop/) | [3 Fundamentals of OOP](oop/OO-Fundamentals.pdf) (and [Why OOP?](oop/3b-Why-Objects.pdf)) [Object References](oop/Object-References.pdf) and [Reference is like a Remote Control](oop/Reference-as-Remote-Control.pdf) | |
Inheritance | [Inheritance](oop/Inheritance-Basics.pdf) [Using Inheritance](oop/Using-Inheritance.pdf) & Liskov Substitution Principle | Read *BIG Java*, Chapter 9. |
Polymorphism & Interfaces | [Polymorphism](oop/Polymorphism.pdf) [Interfaces](oop/Interfaces.pdf) | Read *BIGJ*, section 9.4 (Polymorphism) and Chapter 10 (Interfaces). [Let's Remove Duplicate Code](http://bit.ly/lets-remove-duplicate-code) how to rewrite Stopwatch tasks. |
[Git](git/) | [Intro to Git](git/Intro-git) and [slides](git/Git-Basics.pdf). [Intro to Github](git/Intro-Github) and [slides](git/Using-Github.pdf) | [Getting Started](git/Git-get-started) [Git Questions](git/git-questions) copy the source file [git/git-questions.md](git/git-questions.md) and write your answers after the questions. |
Checkstyle | Checkstyle is a program to help spot problems in code. Works in any IDE, including BlueJ. | KU Checkstyle Rules: [ku-checkstyle.xml](docs/ku-checkstyle.xml) |
[UML](uml/) | [UML Class Diagram](uml/UML-Class-Diagram.pdf) [Relationships in UML](uml/UML-Class-Diagram-2.pdf) | [UML Practice](uml/UML_practice) Read: [https://uml-diagrams.org](https://www.uml-diagrams.org/class-diagrams-overview.html) and [Lucidchart.com](https://www.lucidchart.com/pages/uml-class-diagram) |
Topic | Material | Assignment |
---|---|---|
More [Git](git/) | Using [branches][git-branching] (online Git book). [Aliases](git/aliases) how to create aliases for git commands. [Branching and Merging][git-book-branching-and-merging] in online Git Book. Using [Github Flow](git/index#github-flow). [Pull Request Tutorial](https://yangsu.github.io/pull-request-tutorial/) why and how to use pull requests. [Pull Request slides](git/Pull-Requests.pdf) [Commenting on Pull Requests](https://help.github.com/en/articles/commenting-on-a-pull-request)- examples. [Using SSH Keys with Git](https://help.github.com/articles/connecting-to-github-with-ssh/) so you don't need to enter your userid/password (optional). | [Assignment for Github Flow & Pull Requests](assignment/week2/github-flow) A real [pull request in jQuery repo](jquery/jquery#1051) |
Topic | Material | Assignment |
---|---|---|
Week 3 | [Review](week3/Overview) of last week & evolution of Coin Purse [Abstract Class & Method](java-intermed/Abstract-Class-and-Inheritance.pdf) [Interfaces for Sorting](java-intermed/Lexical-Order-and-Sorting.pdf) [Review OO Concepts and UML](week3/R3-Review-OO-Concepts.pdf) for self-study | [Lab 3: Polymorphic Purse](week3/Lab3-PolymorphicPurse.pdf) to this at home. **Due:** Sat, Feb 3. No Lab meeting due to Kaset Fair. Please work on Lab3 individually. **PA1**: [PA1-Fraction](week2/PA1-Fraction.pdf) create repo here: [https://classroom.github.com/a/TsvUlc6K](https://classroom.github.com/a/TsvUlc6K). Add your own `README.md`, `.gitignore`, and code. For help, see [Intro to Github](git/intro-github) [PPT](git/Using-Github.pdf). |
KU Fair | Kaset Fair 31 Jan - 08 Feb. No class. | No Lab, but you still have assignment. |
[Week 4](week4/) | [Modeling with Inheritance](week4/Inheritance-in-Modeling.pdf) [Collections](week4/Collections.pdf) [Collections Practice](week4/Collections-practice) with starter code: [https://classroom.github.com/a/0F28sTB7](https://classroom.github.com/a/0F28sTB7). [Iterators](week4/Iterators.pdf) a common design pattern | **Quiz**: programming quiz. Please bring computer to class. [Lab 4: Purse with Inheritance](week4/Lab4-CoinPurse-Inheritance.pdf) Due: 10 Feb (Saturday) [Homework1](week4/Homework1.pdf) - submit file or link to [Google Classroom](https://classroom.google.com/u/1/c/NDE0NjQ0OTha/a/MTE0OTI4NTEwMzha/details) **PA2**: Due Sunday, 25 Feb by 22:00. **1st-year Student:** [PA2-ArrayIterator](week4/PA2-ArrayIterator.pdf) Github Link: [https://classroom.github.com/a/g0EhuapO](https://classroom.github.com/a/g0EhuapO) **2nd-4th year Student:** [PA2-Stack](week4/PA2-Stack.pdf) Github Link: [https://classroom.github.com/a/16iWXFAP](https://classroom.github.com/a/16iWXFAP) |
[Week 5](week5/) Feb 15 | Review Homework [Exceptions](week5/Exceptions.pdf). What causes NullPointerException? [Factory Methods](patterns/Factory-Methods.pdf) to Create Objects [Singleton](patterns/Singleton-Pattern.pdf) a class with only 1 instance [Properties and Properties file](week5/Runtime-Application-Properties.pdf) (for lab) | [Lab 5: Factory Method, Singleton, and Properties](week5/Lab5-Money-Factory-and-Singleton.pdf) [Answers to Exceptions Practice](week5/Exceptions-Practice-Answers.pdf) |
[Week 6](week6/) Feb 22 | [Input-Output classes](week6/Input-Output.pdf) [Mutable and Immutable Objects](week6/Mutable-Immutable.pdf) [Practice](week6/Practice-week6.pdf) Solution: [https://goo.gl/b44PJe](https://goo.gl/b44PJe) | **Quiz** on week 5, esp. exceptions. [Lab6-File reader and timer](week6/Lab6-TaskTimer.pdf) Strike Back! Critique the course at [https://eassess.ku.ac.th/](https://eassess.ku.ac.th/). Ratings are anonymized, so its safe to criticize and make suggestions. |
Midterm Tues 27 Feb | Written and Programming: 8:00-12:00 Room 203. | *Dress like a programmer* (wear whatever you like) |
Topics for 2nd Half |
**Done** Enum types Event Listeners and Observer Pattern Frameworks. The OCSF Framework Generics (type parameters) Graphical UI using JavaFX Lambda Expressions and Anonymous Classes Recursion Strategy Pattern and Resursive Withdraw for Purse Threads UML Sequence Diagram Unit Testing with JUnit Using Threads in JavaFX | **Todo** Model-View-Controller Design Streams Programming Using a Database with ORM Checkstyle for Coding style |
[Week 7](week7/) Mar 08 | Graphical UI [JavaFX Intro](javafx/Introduction) [Steps to Writing a Graphical UI](week7/GUI-Step-by-Step.pdf) Events and Event Listeners [Enum Type](week7/Enum.pdf) | [Lab7-LengthConverter](week7/Lab7-LengthConverter.pdf) Lab7 Github Assignment: [https://goo.gl/snYfDC](https://goo.gl/snYfDC) this is a empty repo. To use it, just "git add remote ...". How to [create a game with JavaFX](https://github.com/jbrucker/guessing-game) and MVC design. |
[Week 8](week8/) Mar 15 | Review some points from Labexam [Recursion](week8/Recursion.pdf) [Intro to Design Patterns](patterns/Design-Patterns-Introduction.pdf) [Observer Pattern](patterns/Observer-Pattern.pdf) | [Lab 8: Observers](week8/Lab8-1-Observers.pdf). Starter code: [https://goo.gl/obaqHh](https://goo.gl/obaqHh) [Homework2](week8/Homework2.pdf) due next week (22 Mar) and needed for lab. [Design Patterns](patterns/README) material is in the [patterns](patterns/) directory. **Read**: Big Java, Ch. 13 *Recursion* [PA3-Unit Converter](week8/PA3-UnitConverter.pdf) due 25 Mar (Sunday). **PA3 Assignmnet URL:** [https://goo.gl/U5wbau](https://goo.gl/U5wbau). [Currency Converter](docs/currency_service) how to get currency exchange rates for your UnitConverter. |
[Week 9](week9/) Mar 22 | Remarks on PA3 - use polymorphism [UML Sequence Diagram](week9/UML-Sequence-and-Interaction.pdf) and [Practice](week9/Sequence-Diagram-Practice.pdf) [Anonymous Classes](week7/Anonymous-Class.pdf) [Strategy Pattern](patterns/Strategy-Pattern.pdf) [Unit Testing](week9/UnitTesting.pdf) with JUnit. Test Driven Development [Events and Event Handling](javafx/Event-Handling.pdf) in JavaFX | **Quiz** on JavaFX components, Event handling, and recursion. [Lab9 Purse with Withdraw Strategy](week9/Lab9-Purse-with-Strategy-Pattern.pdf), Due: Sunday [JUnit Method Summary](week9/JUnitSummary.pdf) **Read** [UML Distilled Chapter 4](docs/UML-Distilled-4-Sequence.pdf) on Sequence Diagrams. **Assignment** Develop idea and proposal for final programming project. |
[Week 10](week10/) Mar 29 | [Event Handling](javafx/Event-Handling.pdf) - how to handle events [Threads](week10/Threads.pdf) and Multi-threading | [Lab10: Threads](week10/Lab10-Threads.pdf) Github URL: [https://goo.gl/PCfJ41](https://goo.gl/PCfJ41) **Read**: Big Java, ch. 20 [Multithreading](week10/Multithreading-BIGJ.pdf), [Dietel&Dietal slides](week10/Threads-Dietel.pdf) **Read**: Oracle's [Event Handling Tutorial](https://docs.oracle.com/javase/8/javafx/events-tutorial/events.htm) or [Ebook](javafx/Event_Handling_Tutorial.pdf), has most complete explanation of event handling. **Homework**: (TBA) Submit a project proposal online. |
[Week 11](week11/) Apr 05 | [Worker Threads](javafx/WorkerThreads.md) for running background tasks. Starter code: [https://github.com/jbrucker/worker-threads.git](https://github.com/jbrucker/worker-threads) [Intro to Frameworks](frameworks/Frameworks.pdf) and [Job Post](https://www.blognone.com/node/77171) with frameworks [OCSF Client Exercise](frameworks/Lab-OCSF-Framework.pdf) Files: [ocsf-231.jar](frameworks/ocsf-231.jar), [source code](frameworks/ocsf-231-src.zip), [document](frameworks/OCSF-Framework.pdf). [TaskServer](frameworks/TaskServer.jar) for OCSF exercise. Its a runnable jar file. Type `java -jar TaskServer.jar port` where `port` is the port number the server should listen on. | No lab due to Chakri Day holiday. [PA4-Flashget URL Downloader](week11/PA4-Threaded-Downloader.pdf) due April 22. Github Assignment URL: [https://goo.gl/TtMveL](https://goo.gl/TtMveL) A useful app that combines a lot of what you learned recently, but not too difficult. [PA5 Project Proposal](week11/PA5-Final-Project.pdf) due next week, both on paper and online (Google Docs). |
Week 12 Apr 12 | *Class cancelled due to university holiday.* Please work on [PA4](week11/PA4-Threaded-Downloader.pdf) and your final project. | *Songkran*. No lab. |
[Week 13](week13/) Apr 19 |
Discuss PA4. Any problems?
[Generics](week13/Generics.pdf) and [Generic Types](week13/Generic-Types.pdf)
Intro to Database and Object-Relational Mapping using ORMLite. |
**Exercise**: [OOP2018/contacts-orm](https://github.com/OOP2018/contacts-orm.git) Github project using ORMLite. [Lab 13: Generics](week13/Lab13-Generics.pdf) and improve code in MoneyUtil.java. **Read**: Big Java ch 18 on Generics, and [Generics](https://docs.oracle.com/javase/tutorial/java/generics/index.html) in Java Tutorial. **Read** (for next week): Java Tutorial on Lambdas, Method References, and Streams. Learn the basic *Functional Interfaces* used in Streams (java.util.function package). |
[Week 14](week14/) Apr 26 | [Lambda Expressions](java8/Lambda-Expressions), one of [Java 8 New Features](java8/Java-8-Features.pdf) [Method References](java8/Method-References) - see Java Tutorial for details [Streams](java8/Streams) and [slides](java8/Streams.pdf) | |
[Week 15](week15/) May 03 | [Project Github URL](https://goo.gl/K3E2BE) add your Github URL. **Demo** demonstrate working code to TAs in Lab. | |
Final Exam May 14 CPE Room 202 | 9:00 - 12:00 Programming Exam 13:00 - 14:20 Written Exam 14:30 - done Project Presentations *Dress like a programmer* (wear whatever you like) |
[Sample Programming Problems](week15/Sample-Problems.pdf)
In project demo, please prepare presentation of design and interesting technology. Don't just show code in Eclipse (unreadable and not very educational).
JavaFX Tasks and Recursion will be on the exam. Closed Internet the exam is closed Internet. You can use the Java and JavaFX API docs on your own computer but not from the Internet. Since beginning of the course, students were instructed to install Java API locally. Note that the JavaFX API docs are separate from the Java SE API. |
Topics Not Covered in Class These won't be on exam, but are useful to know. |
---|
[State Machines](topics/Programming a State Machine.pdf) and "*[programming without if](https://www.google.co.th/search?q=programming+without+if)*". [slides](topics/State-Machine.pdf) [UML State Machine Diagram](topics/State-Machine-Diagram.pdf) |
[Assertions](java-intermed/Assertions.pdf) a method should document its precondtions (requirements) and postconditions. The Java [assert](https://docs.oracle.com/javase/8/docs/technotes/guides/language/assert.html) command lets you test preconditioins in code, with no runtime overhead in the final product. Microsoft found that adding assertions during development greatly reduced bugs. |
[Inner Classes](java-intermed/Inner-Classes.pdf) rules for inner and nested classes. |
[Database](database/) directory contains some introductory slides.
[Introduction to Databases](database/1-Database-Introduction.pdf)
[Database Software](database/2-Database-Software.pdf) included embedded and client-server databases
[Using JDBC](database/3-Using-JDBC.pdf) this is **not** recommended, but for background knowledge. ORM is usually much better.
[Persistence and ORM](database/4-Persistence-OR-Mapping.pdf) intro to object-relation mapping, which lets you save and retrieve *objects* rather than just fields
ORMLite Example using ORMLite and H2 to save contacts to a database. README file explains concepts. |
**Password Encrypting** you should *never* store passwords as plain text, for security. Encrypt passwords!
|