Week 1
Writing Computer Software
- Describe the steps involved in creating and running a Java program
- Describe the contents of source (
.java
) and class (.class
) files
- Explain what happens (at a high level) when a Java program is compiled
- Explain what happens (at a high level) when a Java program is run
- Describe the difference between compilation and execution errors
- Explain why a Java Virtual Machine (JVM) is required in order to run a Java program
- Describe how bytecode makes Java programs portable
- List the basic steps involved in software development
Primitive datatypes, Variables, Identifiers
- List the primitive types supported in Java:
int
, long
, float
, double
, char
, and boolean
(tutorial)
- Define numeric literal and provide an example of one
- Define character literal and provide an example of one
- Select the most appropriate primitive type to store a given piece of data
- Use the assignment statement
- Describe what happens in memory when a primitive variable is declared
- Describe what happens in memory when an object identifier (reference) is declared
- Describe the differences between primitives and objects (reference variables)
- Define string literal and provide an example of one
- Graphically illustrate the difference between primitives and reference types with memory diagrams
- Demonstrate how an instance of a class is created (new operator)
- Use valid and meaningful identifiers that are consistent with Java naming conventions
Java Programming Basics
- Recognize code documentation in source code
- Demonstrate at least two forms of syntax for adding comments to source code
- Replace hard coded constants with named constants
Week 2
Standard Java Classes
- Demonstrate the use of
String.substring
- Demonstrate the use of
String.length
- Demonstrate the use of
String.charAt
- Use Oracle's Java documentation to ascertain if a method is part of a given class
Arithmetic expressions
- Demonstrate proper use of the following arithmetic operators:
+
, -
, *
, /
, %
- Identify and avoid unintended integer division errors
- Distinguish between binary and unary operations
- Define operator precedence
- Interpret arithmetic expressions following operator precedence rules
- Define and apply typecasting
- Interpret code that makes use of compound assignment operations:
*=
, /=
, +=
, -=
, and %=
- Use wrapper classes to perform type conversion, e.g.,
int num = Integer.parseInt("14");
- Explain the source of data associated with the system input buffer:
System.in
- Perform standard/console input using the
Scanner
class
- Explain the destination for data sent to the system output buffer:
System.out
- Perform standard/console output using the
System.out.println
method
Algorithms and Design
- Define the term algorithm
- Explain the motivation for doing design before coding
- Make use of variables and operations to perform calculations
- Construct and interpret flowcharts representing sequential, conditional, and looping structures
- Construct and interpret pseudocode representing sequential, conditional, and looping structures
- Use flowcharts and pseudocode to describe algorithmic solutions to simple problems
- Trace a program to debug it without running it
Week 3
Selection statements
- Define the functionality of the following relational operators:
<
, <=
, !=
, ==
, >=
, >
- Use relational operators to control program flow
- Define the functionality of the following boolean operators:
&&
, ||
, and !
- Use boolean and relational operators to construct meaningful boolean expressions
- Use boolean expressions to control program flow
- Describe the behavior of an
if
statement
- Describe the program flow through a series of nested
if
statements
- Use nested
if
statements to control program flow
- Use a
switch
statement to control program flow
- Rewrite a
switch
statement with one or more (potentially nested) if
statements
- Explain the purpose of the
case
, break
and default
reserved words
- Define identifier scope and describe the implication to identifiers declared within an
if
block
Iteration statements
- Interpret code that makes use of the following looping constructs:
while
, do-while
, and for
- Design and write code that makes use of the following looping constructs:
while
, do-while
, and for
- Describe how the following constructs differ:
while
, do-while
, and for
- Rewrite a given
while
loop into an equivalent for
loop, and vice versa
- Select the most appropriate type of loop for a given problem
Week 4
More Standard Java Classes
- Define an Application Programming Interface (API)
- Use Oracle's Java documentation to ascertain the capabilities of a given standard java class
- Use the Javadoc page for the
Math
class to perform calculations involving the following mathematic operations:
- Absolute value
- Trigonometric functions (in degrees and radians)
- pi - ratio of the circumference of a circle to its diameter
- xy
- logarithmic functions
- maximum/minimum of two numbers
- Square root
- Use parsing methods in wrapper classes to convert text representations of numbers into numeric format
- Use the
toString
method in wrapper classes to convert from numeric format into text representations
- Be familiar with methods from the
Character
class such as isDigit
and toLowerCase
- Use methods from the
String
class such as isEmpty
, substring
, indexOf
, etc...
- Format standard/console output using the
System.out.printf
method
- Generate random numbers
Java Packages
- Explain the purpose of a Java package
- List at least two packages that are part of the Java standard library
- Define the term fully qualified name
- Explain the purpose of the
import
statement
Coding Standards
Week 5
Object Oriented Design / Object Oriented Programming
- Define the following object oriented concepts:
- Object types (Classes)
- Class instances (Objects)
- Instance variables (Attributes/Fields)
- Instance behaviors/actions (Methods)
- Define the concept of a driver class
- Distinguish between classes and objects
- Describe how objects interact with one another by sending messages
Week 6
UML
- Correctly annotate and interpret fields (name and type) on a class diagram
- Correctly annotate and interpret methods (with arguments and return type) on a class diagram
- Generating class diagram from a verbal description of a class
- Use visibility modifiers to denote the visibility of a field or method
Class creation basics
- Describe how an object differs from a primitive
- Describe how a class differs from a primitive type
- Define and use classes with multiple methods and data members (fields)
- Define and use value-returning and void methods
- Properly use visibility modifiers in defining methods and fields
- Define and use class constants
- Understand and apply accessor and mutator methods
- Distinguish between instance variables and local variables
- Define and use instance methods and instance variables (attributes/fields)
- Define and use methods that have primitive data types as arguments
- Understand the importance of information hiding and encapsulation
- Declare and use local variables
- Describe the role of the reserved word
this
- Demonstrate use of
this
to disambiguate object fields from local variables
- Trace a program including calls to class methods in multiple classes
- Use the debugger to trace the execution of a multi-class program
- Create and use constructor methods
Week 7
Defining your own classes
- Define and use methods that have reference data types as arguments
- Define and use overloaded methods
- Call methods of the same class
- Draw and explain memory diagrams that illustrate the instantiation of objects
- Describe the role of the garbage collector
- Compare the equality of two different objects
- Swap the data in two different objects
- Avoid redundant code by calling one constructor from a different constructor
- Understand the implications of acting on an object to which there are multiple references
Week 8
Design Techniques
- Use helper methods to avoid redundant code
- Adhere to the CS1110 coding standard
- Simplify complicated algorithms by encapsulating subordinate tasks
- Be familiar with various design approaches such as top-down, bottom-up, and case-based
- Use mechanisms in IntelliJ to refactor software
- Document each method using the Javadoc convention
Class Members
- Use class variables/attributes appropriately
- Use class methods appropriately
Arrays
- Use an array to store primitive and object types
- Create an array of a given size
- Loop through an array
- Pass an array as an argument
Week 9
2D Arrays
- Create a two-dimensional array of primitive values
- Loop through a two-dimensional array using a nested loop
Object Arrays
- Create an array of Objects
- Understand the implications of accessing an Object inside an array
ArrayLists
- Use an
ArrayList<E>
to store objects type E
- Use methods from the
ArrayList<E>
class such as
isEmpty()
get()
set()
add()
remove()
size()
indexOf()
lastIndexOf()
- Design and write code that makes use of the enhanced for loop, a.k.a., the for-each loop
- Describe the advantages of an
ArrayList<E>
over an Array
Week 10
- 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
Week 11
- Use short-circuit evaluation to avoid divide-by-zero and null-pointer exceptions
- Understand the implications of non-standard uses of language features
- Use a ternary conditional operator to control program flow
- Explain the concept of the Java interface
- Explain what it mean for a class to implement an interface
- Make use of an interface reference to refer to objects that implement the interface
- 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
- Understand the implications of a method or class having a
final
access modifier
- Read and understand UML class diagrams
- Implement source code that meets the design specified in a UML class diagram
- 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
- 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
- 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
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
- 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
- Create a Java
Path
object and associate it with a file on disk
- Determine if a file exists on disk
- Determine if a Java
Path
object is associated with a file or a directory
- Convert between
Path
and File
objects
- Understand the difference between a relative path and an absolute path
- Use the
Files
class to obtain input and output streams
- Associate a low-level input (i.e.,
FileInputStream
) or output (i.e., FileOutputStream
) stream with a File
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
and DataInputStream
) 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
- Use the try-with-resources construct to ensure resources are closed appropriately
- Explain what the
PrintWriter
class is used for
- Read text data from a file using
Scanner
objects
- Use the
Files
class to read/write text files
- Explain the difference between binary and text files
- Describe some of the important exceptions that the java file IO classes generate.
- Generate HTML documentation using the Javadoc tool
- Generate executable JAR files
- 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
Relevant ACM Curricular Guide Outcomes
Introduction to Modeling and Simulation
- Explain the concept of modeling and the use of abstraction that allows the use of a machine to solve a problem. [CN|Introduction to Modeling and Simulation|1]
Fundamental Concepts
- Identify common uses of digital presentation to humans (eg, computer graphics, sound). [GV|Fundamental Concepts|1]
- Explain in general terms how analog signals can be reasonably represented by discrete samples, for example, how images can be represented by pixels. [GV|Fundamental Concepts|2]
Defensive Programming
- Explain why input validation and data sanitization is necessary in the face of adversarial control of the input channel. [IAS|Defensive Programming|1]
- Explain why you might choose to develop a program in a type-safe language like Java, in contrast to an unsafe programming language like C/C++. [IAS|Defensive Programming|2]
- Classify common input validation errors, and write correct input validation code. [IAS|Defensive Programming|3]
- Demonstrate using a high-level programming language
how to prevent a race condition from occurring and how to handle an exception. [IAS|Defensive Programming|4]
- Demonstrate the identification and graceful handling of error conditions. [IAS|Defensive Programming|5]
Object-Oriented Programming
- Design and implement a class. [PL|Object-Oriented Programming|1]
- Use subclassing to design simple class hierarchies that allow code to be reused for distinct subclasses. [PL|Object-Oriented Programming|2]
- Compare and contrast (1) the procedural
/functional approach–defining a function for each operation with the function body providing a case for each data variant–and (2) the object-oriented approach–defining a class for each data variant with the class definition providing a method for each operation Understand both as defining a matrix of operations and variants. [PL|Object-Oriented Programming|4]
- Explain the relationship between object-oriented inheritance (code-sharing and overriding) and subtyping (the idea of a subtype being usable in a context that expects the supertype). [PL|Object-Oriented Programming|5]
- Use object-oriented encapsulation mechanisms such as interfaces and private members. [PL|Object-Oriented Programming|6]
- Define and use iterators and other operations on aggregates, including operations that take functions as arguments, in multiple programming languages, selecting the most natural idioms for each language. [PL|Object-Oriented Programming|7]
Basic Type Systems
- For both a primitive and a compound type, informally describe the values that have that type. [PL|Basic Type Systems|1]
- For a language with a static type system, describe the operations that are forbidden statically, such as passing the wrong type of value to a function or method. [PL|Basic Type Systems|2]
- Describe examples of program errors detected by a type system. [PL|Basic Type Systems|3]
For multiple programming languages, identify program properties checked statically and program properties checked dynamically. [PL|Basic Type Systems|4]
- Use types and type-error messages to write and debug programs. [PL|Basic Type Systems|6]
- Explain how typing rules define the set of operations that are legal for a type. [PL|Basic Type Systems|7]
- Write down the type rules governing the use of a particular compound type. [PL|Basic Type Systems|8]
- Explain why undecidability requires type systems to conservatively approximate program behavior. [PL|Basic Type Systems|9]
- Define and use program pieces (such as functions, classes, methods) that use generic types, including for collections. [PL|Basic Type Systems|10]
- Discuss the differences among generics, subtyping, and overloading. [PL|Basic Type Systems|11]
- Explain multiple benefits and limitations of static typing in writing, maintaining, and debugging software. [PL|Basic Type Systems|12]
Algorithms and Design
- Discuss the importance of algorithms in the problem-solving process. [SDF|Algorithms and Design|1]
- Discuss how a problem may be solved by multiple algorithms, each with different properties. [SDF|Algorithms and Design|2]
- Create algorithms for solving simple problems. [SDF|Algorithms and Design|3]
- Use a programming language to implement, test, and debug algorithms for solving simple problems. [SDF|Algorithms and Design|4]
- Apply the techniques of decomposition to break a program into smaller pieces. [SDF|Algorithms and Design|8]
- Identify the data components and behaviors of multiple abstract data types. [SDF|Algorithms and Design|9]
Fundamental Programming Concepts
- Analyze and explain the behavior of simple programs involving the fundamental programming constructs variables, expressions, assignments, I/O, control constructs, functions, parameter passing, and recursion. [SDF|Fundamental Programming Concepts|1]
- Identify and describe uses of primitive data types. [SDF|Fundamental Programming Concepts|2]
- Write programs that use primitive data types. [SDF|Fundamental Programming Concepts|3]
- Modify and expand short programs that use standard conditional and iterative control structures and functions. [SDF|Fundamental Programming Concepts|4]
- Design, implement, test, and debug a program that uses each of the following fundamental programming constructs: basic computation, simple I/O, standard conditional and iterative structures, the definition of functions, and parameter passing. [SDF|Fundamental Programming Concepts|5]
- Choose appropriate conditional and iteration constructs for a given programming task. [SDF|Fundamental Programming Concepts|7]
Development Methods
- Trace the execution of a variety of code segments and write summaries of their computations. [SDF|Development Methods|1]
- Explain why the creation of correct program components is important in the production of high-quality software. [SDF|Development Methods|2]
- Identify common coding errors that lead to insecure programs (eg, buffer overflows, memory leaks, malicious code) and apply strategies for avoiding such errors. [SDF|Development Methods|3]
- Conduct a personal code review (focused on common coding errors) on a program component using a provided checklist. [SDF|Development Methods|4]
- Describe how a contract can be used to specify the behavior of a program component. [SDF|Development Methods|6]
- Refactor a program by identifying opportunities to apply procedural abstraction. [SDF|Development Methods|7]
- Apply a variety of strategies to the testing and debugging of simple programs. [SDF|Development Methods|8]
- Construct, execute and debug programs using a modern IDE and associated tools such as unit testing tools and visual debuggers. [SDF|Development Methods|9]
- Construct and debug programs using the standard libraries available with a chosen programming language. [SDF|Development Methods|10]
- Apply consistent documentation and program style standards that contribute to the readability and maintainability of software. [SDF|Development Methods|12]
Software Construction
- Describe techniques, coding idioms and mechanisms for implementing designs to achieve desired properties such as reliability, efficiency, and robustness. [SE|Software Construction|1]
- Build robust code using exception handling mechanisms. [SE|Software Construction|2]
- Describe secure coding and defensive coding practices. [SE|Software Construction|3]
- Write a software component that performs some non-trivial task and is resilient to input and run-time errors. [SE|Software Construction|9]