Other pages: Learn Java

Topic Material Assignment
Introduction
Introduction to the course
Intro to Classes & Objects
Which Programming Language to Learn?
Get the Required software and sign-up
Join Google Classroom using code umaxt4s.
We use Github Classroom for programs, Google Classroom for other assignments.
Intro to Java
Intro to Java
Java Class Structure includes packages
Coding Standard and Javadoc
Read OODP Chapter 1 Fundamental Java Methods everyone should by able to write
Java Coding Standard required in this course
Coding Guidelines for all languages
Git Git material is on the ISP course site. You should study
“Intro to Git” and “Git Basics” slides
“Using Github” document and slides
Also moved to ISP course site
Getting Started
Git Questions copy the source file git/git-questions.md and write your answers after the questions.
Java Basics
Primitive Types and Operations
String Types, Math Functions, Basic Input/Output
Conditionals, Boolean Ops & Switch
Arrays, Using Arrays, Multi-dimension Arrays
Loops
Read OODP Chapter 1 or Big Java for Java language.
See Learning Java 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 (covered in introduction)
Methods, Method Params
Static Methods, Packages
Mutable and Immutable Objects
 
Variables & References Variables
Object References and
Reference as a Remote Control
You should clearly understand the difference between local variables and attributes, and difference between attributes of an object and static variables.
OO Fundamentals
3 Fundamentals of OOP (and Why OOP?)
Also Reference as a Remote Control
 
Inheritance Inheritance
Using Inheritance & Liskov Substitution Principle
Read BIG Java, Chapter 9.
Polymorphism Polymorphism
Read BIGJ, section 9.4 (Polymorphism). Let’s Remove Duplicate Code - rewrite Stopwatch tasks to use polymorphism.
Collections ArrayList
Collections
Iterators a common design pattern
Map
Collections Practice
Collections Summary
Interfaces Interface
Interfaces for Sorting
Design using Interfaces
Read BIGJ Chapter 10 (Interfaces).
Common Interfaces
UML
UML Class Diagram
Relationships in UML
UML Practice
Read: UML Distilled Chapter 3: Class Diagram
Read: https://uml-diagrams.org and Lucidchart Class Diagram Tutorial.
Lucidchart offers online diagramming software.
Sequence Diagram UML Sequence Diagram Read: UML Distilled Chapter 4: Sequence Diagram
Practice
Exceptions
Exceptions
Throwing Exceptions
Exceptions Practice
Exception Handling Tips from Big Java
Review Some basic review. Fundamentals Practice - 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
Unit Testing in Python
JUnit Method Summary
Using Parameterized Tests
Input-Output Input-Output classes
Using I-O classes
Map Map
Map covered in the Java Tutorial and Big Java section 15.4.
Graphical UI
in JavaFX
Intro to Java Graphics
JavaFX Intro and Getting Started
Steps to Writing a Graphical UI
Events and Event Listeners
Layout a UI
Lab12 LengthConverter
How to create a game with JavaFX and MVC design.
PA3-Unit Converter.
Currency Converter how to get current exchange rates for your UnitConverter.
FXML Using FXML in JavaFX to define the UI without code. Also a video
Event Handling Events and Event Handling in JavaFX
Method References
Oracle’s Event Handling Tutorial or Ebook has most complete explanation of event handling.
Intermediate Java Abstract Class & Method
Anonymous Classes
Enum type
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 and rules for Generic Types
Read Big Java ch 18 on Generics, and Generics in Java Tutorial.
Lab: Generics
Recursion Recursion
Visualize Recursion
Backtracking Example 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 Intro to Design Patterns
Observer Pattern
Factory Methods to create objects
Strategy Pattern
Singleton a class with only 1 instance
All Design Patterns material is in the patterns directory.
Lab: Observers. Starter code: https://goo.gl/obaqHh
Lab: Purse with Withdraw Strategy
Threads & Multitasking Threads Read: Big Java, Ch 20 Multithreading or Dietel&Dietal slides
Threads Homework (also on Google Docs)
Worker Threads Worker Threads for background tasks in interactive apps. Starter code for Worker Threads Exercise: https://github.com/jbrucker/worker-threads.git
Frameworks
Intro to Frameworks - do more with less code.
Job Post with frameworks.
OCSF Client Exercise
Files: ocsf-231.jar, source code, document.
TaskServer 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 A useful app that combines what you learned recently, but not too difficult.
Lambdas & Streams Lambda Expressions
Streams and slides
Read: Java Tutorial for Lambdas, Method References, and Streams. Short lambda tutorial on Geeks site.
Look at the Functional Interfaces in 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, 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 is a program that checks coding style and potential coding errors.
KU Checkstyle Rules: ku-checkstyle.xml
Checkstyle Home has plugins for IDEs.
Properties Using Properties for application configuration.
State Machines State Machines Lab: Syllable Counter Using State Machine UML State Machine Diagram
programming without if”.
Programming a state machine
Assertions Assertions 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 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 describes how.
Excellent explanation in Pawat’s OOP2017 project docs. You should write documentation like this!