There is a more recent offering of this course. This is an archive of the
course which was offered in Winter 2017-2018.
SE1021
Outcomes
Weekly Outcomes
At the end of each week, students should be able to do the following:
## Week 1
### Java Fundamentals
* Be aware of the memory requirements and value ranges for primitive types
* Use mathematic operations to manipulate characters
* Interpret code in which automatic type conversions are present
* Use type casting to explicitly convert data types
* Explain the risks associated with explicit type casting
* Use increment and decrement operators
* Explain how pre- and post- increment/decrement operators differ in functionality
* Use short-circuit evaluation to avoid divide-by-zero and null-pointer exceptions
### Inheritance
* Use inheritance in creating classes
* If no default constructor is present in the superclass, explain why a constructor of a subclass should make an explicit call to a constructor of the superclass
* Define aggregation
* Define composition
* Use aggregation and composition within user defined classes
* Explain what is meant by "overriding a method"
* Make use of `super` reference to call a parent method from within a method that overrides it
## Week 2
### UML
* Read and understand UML class and sequence diagrams
* Implement source code that meets the design specified in a UML class and sequence diagram
## Week 3
### Inheritance and Polymorphism
* Explain the role of the `Object` class
* Explain how automatic type promotion works with object references
* Override the `equals()` and `toString()` methods for user defined classes
* Explain the relationship between a reference type and the type of the object to which the reference points
* Explain the concept of polymorphism/dynamic binding
* Read code that uses inheritance and polymorphism and determine its output on execution
* Identify legal and illegal assignments of references to objects based on the reference type and object type.
* Explain what it means for a class to implement an interface
* Use the `protected` modifier in defining an inheritance hierarchy
* Describe when to use an abstract class
* Explain the concept of the Java interface
* Create an abstract method; describe the purpose of abstract methods
* Describe the differences between an abstract class and an interface
* Explain why Java prohibits multiple inheritance
## Week 4
### GUI Components
* List at least three types of objects that can be contained in a [`Parent`](https://docs.oracle.com/javase/8/javafx/api/javafx/scene/Parent.html) object
* Design and implement a graphical user interface (GUI) programs using the [`Label`](http://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/Label.html) and [`Button`](https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/Button.html) classes from the JavaFX package
### Event-Driven Programming
* Explain the roles of event sources and event listeners in event-driven programming
* List the two types of objects required for event driven programming in Java
* Explain the role of "event source" objects and give examples of two classes whose instances are "event source" objects
* Explain the role of "event listener" objects and give examples of two classes whose instances are "event listener" objects
* Derive from the [`Application`](https://docs.oracle.com/javase/8/javafx/api/javafx/application/Application.html) class and create a simple GUI application
* Implement the [`EventHandler`](https://docs.oracle.com/javase/8/javafx/api/javafx/event/EventHandler.html) interface as an inner class
* Implement an [`EventHandler`](https://docs.oracle.com/javase/8/javafx/api/javafx/event/EventHandler.html) as a lambda expression
* Explain the purpose of the argument passed to the [`handle()`](https://docs.oracle.com/javase/8/javafx/api/javafx/event/EventHandler.html#handle-T-) method
* Determine the event source that caused the [`handle()`](https://docs.oracle.com/javase/8/javafx/api/javafx/event/EventHandler.html#handle-T-) method to be called
## Week 5
### GUI Components
* Differentiate between layout panes such as: [`GridPane`](https://docs.oracle.com/javase/8/javafx/api/javafx/scene/layout/GridPane.html), [`FlowPane`](https://docs.oracle.com/javase/8/javafx/api/javafx/scene/layout/FlowPane.html), [`HBox`](https://docs.oracle.com/javase/8/javafx/api/javafx/scene/layout/HBox.html), and [`VBox`](https://docs.oracle.com/javase/8/javafx/api/javafx/scene/layout/VBox.html)
* Use the layout panes listed above to arrange components on a scene
### FX Markup Language
* Describe the differences between creating JavaFX applications using imperative programming and using FXML with declarative style programming
* Use scene builder to create an FXML file describing a GUI layout
* Implement controller classes and make appropriate modifications to FXML files to provide functionality to UI controls such as [`Button`](https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/Button.html) and [`TextField`](https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/TextField.html) classes
* __Use [`Alert`](https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/Alert.html) and [`TextInputDialog`](https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/TextInputDialog.html) classes to interact with the user.__
### Exception Handling
* Explain how exception handling increases the robustness of software
* Define exception; explain the concepts of `catch` and `throw` as they relate to exceptions
* Explain why [`Error`](http://download.oracle.com/javase/8/docs/api/java/lang/Error.html) exceptions should not be caught in application code
* For a given program and input condition, determine the control flow of a `try`-`catch` block
* Implement a method that catches an exception thrown by a class in the Java Standard Library
* Implement a method that uses a `try`-`catch` block and a repetition statement (i.e., loop) to validate user input
* Distinguish between checked and unchecked exceptions
* Explain the concept of exception propagation; explain the outcome if an exception is thrown and not caught by the program
* Explain the consequences of not handling a checked exception within a method where the checked exception occurs
## Week 6
### Exception Handling
* Use multiple `catch` blocks to customize the way different types of exceptions are handled
* Inspect a call stack trace displayed by an unhandled exception to determine what caused the exception to be thrown
* Use the `throws` clause to postpone when a checked exception is handled
* For a given program and input condition, determine the control flow of a `try`-`catch` block with and without the `finally` clause
## Week 7
### File Input and Output (I/O)
* Create a Java [`File`](http://download.oracle.com/javase/8/docs/api/java/io/File.html) object and associate it with a file on disk
* Determine if a [`File`](http://download.oracle.com/javase/8/docs/api/java/io/File.html) object exists
* Determine if a [`File`](http://download.oracle.com/javase/8/docs/api/java/io/File.html) object is a file or a directory
* Associate a low-level input (i.e., [`FileInputStream`](http://download.oracle.com/javase/8/docs/api/java/io/FileInputStream.html)) or output (i.e., [`FileOutputStream`](http://download.oracle.com/javase/8/docs/api/java/io/FileOutputStream.html)) stream with a [`File`](http://download.oracle.com/javase/8/docs/api/java/io/File.html) object
* Describe how low-level file I/O works (i.e., reading or writing of byte data, importance of the sequence of data)
* Describe how high-level ([`DataOutputStream`](http://download.oracle.com/javase/8/docs/api/java/io/DataOutputStream.html) and [`DataInputStream`](http://download.oracle.com/javase/8/docs/api/java/io/DataInputStream.html)) file I/O works (i.e., methods for reading and writing of primitive data types, association with low-level stream, the importance of the sequence of data)
* Explain why it is important to close a stream when file operations are complete
* Explain what the [`PrintWriter`](http://download.oracle.com/javase/8/docs/api/java/io/PrintWriter.html) class is used for
* Read text data from a file using [`Scanner`](http://download.oracle.com/javase/8/docs/api/java/util/Scanner.html) objects
* Explain the difference between binary and text files
* Be familiar with how object I/O ([`ObjectOutputStream`](http://download.oracle.com/javase/8/docs/api/java/io/ObjectOutputStream.html) and [`ObjectInputStream`](http://download.oracle.com/javase/8/docs/api/java/io/ObjectInputStream.html)) works
* Describe some of the important exceptions that the java file IO classes generate.
## Week 8
### GUI Design
* Use [`FileChooser`](https://docs.oracle.com/javase/8/javafx/api/javafx/stage/FileChooser.html) to select an open files
* Give examples of visual cue techniques (proximity, highlights, grayed out, similarity, closure, visibility, constraints, mapping, flow)
* Define affordance and give an example of how it can be used in UI design
* Apply Fitts' Law to chose between alternative UI options
## Week 9
### Secure Software Development
* Describe how encapsulation can improve software security
* Describe how avoiding duplicate code can improve software security
* Demonstrate how validating input can improve software security
* Demonstrate how creating copies of mutable output values can improve software security
* Explain how `public static final` fields that are not constants can create security vulnerabilities
* Make use of `final` to guard against data corruption
## Week 10
### Functional Programming
* Explain how functional programming differs from object oriented programming
* Describe when it is appropriate to replace code with a lambda expression
* Demonstrate correct use of lambda expressions
* Describe the purpose of the [`Stream`](https://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html) interface
* Make use of the [`Iterable.forEach()`](https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html#forEach-java.util.function.Consumer-) method
* Be familiar with the following methods from the [`Stream`](https://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html) interface: `count()`, `distinct()`, `filter`, `limit()`, and `sorted()`
### Documentation and Distribution
* Generate HTML documentation using the Javadoc tool
* Generate executable JAR files