Skip to content

Latest commit

 

History

History
575 lines (556 loc) · 19.3 KB

File metadata and controls

575 lines (556 loc) · 19.3 KB
title Topics
navigation_order 1

Other pages: Learn Java

Topic Material [Assignment](Assignments)
[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](intro/Resources) 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) [Fundamental Java Methods](docs/Fundamental-Methods.pdf) everyone should by able to write [Java Coding Standard](docs/Java-Coding-Standard.pdf) required in this course [Coding Guidelines](docs/Coding-Guidelines) for all languages
Git Git material is on the [ISP course site](https://cpske.github.io/ISP/git/). You should study "Intro to Git" and "Git Basics" slides "Using Github" document and slides Also moved to ISP course site [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.
Java Basics [Primitive Types](java-basics/03-Primitive-Datatypes.pdf) and [Operations](java-basics/04-Primitive-Operations.pdf) [String Types](java-basics/05-Strings-and-Chars.pdf), [Math Functions](java-basics/06-Math-Functions.pdf), [Basic Input/Output](java-basics/07-Basic-Input-Output.pdf) [Conditionals](java-basics/10-Conditional.pdf), [Boolean Ops & Switch](java-basics/10-Conditional2.pdf) [Arrays](java-basics/17-Arrays.pdf), [Using Arrays](java-basics/18-Using-Arrays), [Multi-dimension Arrays](java-basics/19-Arrays-2D.pdf) [Loops](java-basics/11-Loops.pdf) Read [OODP Chapter 1](docs/OODP-Chapter1.pdf) or *Big Java* for Java language. See [Learning Java](Learning) for excellent learning sources.

Everyone should know the Java basics. Slides are posted for review, but you should learn Java more deeply than that.

Objects and Classes [Intro to Classes & Objects](intro/Intro-Classes-and-Objects.pdf) (covered in introduction) [Methods](java-basics/12-Methods.pdf), [Method Params](java-basics/12-Method-Parameters.pdf) [Static Methods](java-basics/15-Static-Methods.pdf), [Packages](java-basics/21-Packages.pdf) [Mutable and Immutable Objects](oop/Mutable-Immutable.pdf)  
Variables & References [Variables](java-basics/02-Variables.pdf) [Object References](oop/Object-References.pdf) and [Reference as a Remote Control](oop/Reference-as-Remote-Control.pdf) You should clearly understand the difference between local variables and attributes, and difference between attributes of an object and static variables.
[OO Fundamentals](oop/) [3 Fundamentals of OOP](oop/OO-Fundamentals.pdf) (and [Why OOP?](oop/3b-Why-Objects.pdf)) Also [Reference as 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 [Polymorphism](oop/Polymorphism.pdf) Read *BIGJ*, section 9.4 (Polymorphism). [Let's Remove Duplicate Code](http://bit.ly/lets-remove-duplicate-code) - rewrite Stopwatch tasks to use polymorphism.
Collections [ArrayList](collections/ArrayList.pdf) [Collections](collections/Collections.pdf) [Iterators](collections/Iterators.pdf) a common design pattern [Map](collections/Map.pdf) [Collections Practice](collections/Collections-practice) [Collections Summary](collections/Collections-Summary.pdf)
Interfaces [Interface](interface/Interfaces.pdf) [Interfaces for Sorting](interface/Lexical-Order-and-Sorting.pdf) [Design using Interfaces](interface/Design-using-Interfaces.pdf) Read *BIGJ* Chapter 10 (Interfaces). [Common Interfaces](interface/Common-Interfaces.pdf)
[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: *UML Distilled* [Chapter 3: Class Diagram](docs/UML-Distilled-Class-Diagram.pdf) Read: [https://uml-diagrams.org](https://www.uml-diagrams.org/class-diagrams-overview.html) and [Lucidchart Class Diagram Tutorial](https://www.lucidchart.com/pages/uml-class-diagram). [Lucidchart](https://lucidchart.com) offers online diagramming software.
Sequence Diagram [UML Sequence Diagram](uml/UML-Sequence-and-Interaction.pdf) Read: [UML Distilled Chapter 4: Sequence Diagram](docs/UML-Distilled-4-Sequence.pdf) [Practice](uml/Sequence-Diagram-Practice.pdf)
Exceptions [Exceptions](exceptions/Exceptions.pdf) [Throwing Exceptions](exceptions/Throwing-Exceptions.pdf) [Exceptions Practice](exceptions/Exceptions-Practice.pdf) [Exception Handling Tips](exceptions/Exceptions-Tips-Big-Java.pdf) from Big Java
Review Some basic review. [Fundamentals Practice](assignments/Fundamentals-Practice.pdf) - you should be able to do this without any errors.

Topics for Second Half of Course

Not covered in this order. We may not be able to cover all this. If you want to be a Java programmer these are all good to know.

Topic Material Assignment
Unit Testing [Unit Testing with JUnit](unittesting/UnitTesting.pdf) [Unit Testing in Python](unittesting/PythonUnitTesting.pdf) [JUnit Method Summary](unittesting/JUnitSummary.pdf) [Using Parameterized Tests](unittesting/Parameterized-Tests)
[Input-Output](io/) [Input-Output classes](io/Input-Output.pdf) [Using I-O classes](io/Using-Input-Output.pdf)
Map [Map](collections/Map.pdf) Map covered in the *Java Tutorial* and *Big Java* section 15.4.
Graphical UI in JavaFX [Intro to Java Graphics](graphics/Graphics-1-Introduction.pdf) [JavaFX Intro](javafx/Introduction.pdf) and [Getting Started](javafx/Getting-Started) [Steps to Writing a Graphical UI](graphics/GUI-Step-by-Step.pdf) [Events](javafx/Events) and [Event Listeners](javafx/Event-Handling.pdf) [Layout a UI](javafx/Layouts.pdf) [Lab12 LengthConverter](labs/Lab12-LengthConverter.pdf) How to [create a game with JavaFX](https://github.com/jbrucker/guessing-game) and MVC design. [PA3-Unit Converter](assignments/PA3-UnitConverter.pdf). [Currency Converter](docs/currency_service) how to get current exchange rates for your UnitConverter.
FXML [Using FXML in JavaFX](javafx/FXML.pdf) to define the UI without code. Also a video
Event Handling [Events and Event Handling](javafx/Event-Handling.pdf) in JavaFX [Method References](java8/Method-References) 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.
Intermediate Java [Abstract Class & Method](java-intermed/Abstract-Class-and-Inheritance.pdf) [Anonymous Classes](java-intermed/Anonymous-Class.pdf) [Enum type](java-basics/22-Enumeration.pdf) The Java Tutorial and *Big Java* both have sections on all these topics. Method References are useful for Event Handlers in JavaFX, and are used in SceneBuilder.
Generics [Generics](generics/Generics.pdf) and rules for [Generic Types](generics/Generic-Types.pdf) Read Big Java ch 18 on Generics, and [Generics](https://docs.oracle.com/javase/tutorial/java/generics/index.html) in Java Tutorial. [Lab: Generics](labs/Lab13-Generics.pdf)
Recursion [Recursion](recursion/Recursion.pdf) [Visualize Recursion](recursion/visualize-recursion) [Backtracking Example](recursion/recursion-with-backtrack) from [Codingbat.com][] Read: Big Java, Ch. 13 *Recursion* Do the assigned recursion problems on [Codingbat.com][]. Lab: Recursive withdraw strategy for Coin Purse. Requires you first rewrite withdraw to use Strategy Pattern.
[Design Patterns](patterns/) [Intro to Design Patterns](patterns/Intro-Design-Patterns.pdf) [Observer Pattern](patterns/Observer-Pattern.pdf) [Factory Methods](patterns/Factory-Methods.pdf) to create objects [Strategy Pattern](patterns/Strategy-Pattern.pdf) [Singleton](patterns/Singleton-Pattern.pdf) a class with only 1 instance All [Design Patterns](patterns/Introduction) material is in the [patterns](patterns/) directory. [Lab: Observers](labs/Lab8-Observers.pdf). Starter code: [https://goo.gl/obaqHh](https://goo.gl/obaqHh) [Lab: Purse with Withdraw Strategy](labs/Lab10-Purse-with-Strategy.pdf)
Threads & Multitasking [Threads](threads/Threads.pdf) Read: Big Java, Ch 20 [Multithreading](threads/Multithreading-BIGJ.pdf) or [Dietel&Dietal slides](threads/Threads-Dietel.pdf) [Threads Homework](threads/Homework-threadsum.pdf) (also on Google Docs)
Worker Threads [Worker Threads](javafx/WorkerThreads.md) for background tasks in interactive apps. Starter code for Worker Threads Exercise: [https://github.com/jbrucker/worker-threads.git](https://github.com/jbrucker/worker-threads)
[Frameworks](frameworks/) [Intro to Frameworks](frameworks/Frameworks.pdf) - do more with less code. [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. [PA4-Flashget URL Downloader](assignments/PA4-Threaded-Downloader.pdf) A useful app that combines what you learned recently, but not too difficult.
Lambdas & Streams [Lambda Expressions](java8/Lambda-Expressions) [Streams](java8/Streams) and [slides](java8/Streams.pdf) Read: [Java Tutorial][java-tutorial] for [Lambdas][lambda-tutorial], Method References, and Streams. Short [lambda tutorial][lambda-geek-tutorial] on Geeks site. Look at the *Functional Interfaces* in [java.util.function][java.util.function] used for Streams. Try using them! Lab: Streams
Final Project The last programming assignment is an application of your own design. 1. Submit a well-written [Project Proposal](assignments/PA4-Final-Project.pdf), in Google Docs. 2. Schedule at least one TA review of your work in progress during semester. Don't wait until the end!

Optional Topics

This material is not covered in the regular class, but is useful to know.

If some people are interested we can schedule an extra lab session to learn and practice them.

Topic Description
Checkstyle [Checkstyle](checkstyle/Checkstyle.pdf) is a program that checks coding style and potential coding errors. KU Checkstyle Rules: [ku-checkstyle.xml](checkstyle/ku-checkstyle.xml) [Checkstyle Home](https://checkstyle.sourceforge.io/) has plugins for IDEs.
Properties [Using Properties](properties/Using-Properties) for application configuration.
State Machines [State Machines](topics/State-Machine.pdf) Lab: [Syllable Counter Using State Machine](labs/Lab-Syllable-Counter.pdf) [UML State Machine Diagram](topics/State-Machine-Diagram.pdf) "[programming without if](https://www.google.co.th/search?q=programming+without+if)". [Programming a state machine](topics/Programming-a-State-Machine.pdf)
Assertions [Assertions](java-intermed/Assertions.pdf) are builtin to Java and Python. They let you specify conditions that *should* be true and catch errors during development. Microsoft found that adding assertions to code during development greatly reduced bugs.

The Java assert command lets you write assertions in code. You can selectively enable or disable them at runtime (without editing the code), so there is no runtime overhead in the final product.

Inner Classes [Inner Classes](java-intermed/Inner-Classes.pdf) and nested classes let you define one class inside another one.
Database & ORM Introduction to relational databases and how to use them in Java. For object-oriented programs, instead of directly accessing the database using an API (JDBC in Java) it is **much** better to use a framework that automatically maps objects to database elements, called Object-Relational Mapping (ORM).

ORMLite is an easy to use framework. Many OOP students have used it in their projects.

Database directory contains lots of introductory slides.
Introduction to Databases
Database Software included embedded and client-server databases
Using JDBC this is not recommended, but for background knowledge. ORM is usually much better.
Persistence and ORM intro to object-relation mapping, which lets you save and retrieve objects rather than just fields
ORMLite Example uses ORMLite and H2 to save contacts to a database. README file explains concepts.

Encrypting Password You should *never* store users' passwords as plain text, and don't send them over the Internet. Encrypt passwords! [Password Encryption](encryption/password-encryption) describes how. [Excellent explanation in Pawat's OOP2017 project docs](https://github.com/guitarpawat/course-feedback/blob/master/README.md). You should write documentation like this!