SE1011 Outcomes:
- 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
- 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
Primitive datatypes, Variables, Identifiers
- List the primitive types supported in Java:
int, long,
float, double, and
char
- Select the most appropriate primitive type to store a given piece of
data
- Use the assignment and compound assignment statements
- 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)
- Demonstrate how an instance of a class is created (new operator)
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
Standard Java Classes
- Demonstrate the use of
JOptionPane.showMessageDialog
- Demonstrate the use of
JOptionPane.showInputDialog
- Demonstrate the use of String.substring
- Demonstrate the use of String.length
- Use Sun's Java
documentation to ascertain if a method is part of a given class
Standard input/output
- 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
- Design and write code that implements an arithmetic formula,
using methods from the Java Math class.
- Explain the order of precedence in which arithmetic
operations (+,/,-,*, %) in an expression are evaluated.
- Use parentheses to affect the order in which arithmetic
expressions are evaluated.
- Use the typecast operation (for example: (int) ) to assign a
floating-point value to an integer variable.
- Explain the consequences of typecasting a floating-point
value to an integer (ie: truncation)
- Explain integer division (e.g. why 1/3 results in 0, or 5/2
results in 2)
- Use the increment (++) and decrement (--) operators.
- Use the Scanner class methods such as nextDouble() and
nextInt() to convert string input to numeric values.
- Use the Double.parseDouble() and Integer.parseInt()
methods to convert Strings to numeric values.
- Explain the boolean datatype and what values a boolean
variable may represent.
- Design and write boolean conditional expressions using the relational operators (<, <=, >, >=, !=, ==)
- Design and write compound conditional expressions using the
boolean operators (&& and ||)
- Evaluate complex boolean expressions, such as !( ((x>0) &&
(x<2)) || (y<0) )
- Design and write code that uses if,
else-if and else statements to alter a program's
sequence of execution.
- Design and write code that uses the switch statement to alter
program flow.
- Rewrite an if/else-if/else as a switch statement, and
vice versa.
-
Diagram (e.g.,
flowchart style) how a if/else-if/else changes program flow.
- Design and write code that makes use of the
while or
do-while loop construct.
- Use boolean variables and conditional expressions in a
while or do-while loop to repeat prompts for user input until valid
input is entered.
- Design and write code that makes use of the
for-loop construct.
- Rewrite a given while loop as a
for loop, and vice versa.
-
Diagram (e.g.,
flowchart style) how a while loop changes program flow,
introducing a "loop" in the sequence of statements.
-
Use break to
terminate a loop early
-
Use continue
to repeat a loop early
-
Write loops that
repeat certain operations (summing, evaluating, printing) during each
iteration of the loop.
-
Explain the scope of a variable declared within a
loop construct.
-
Explain the scope
of a variable declared within braces.
Using other classes; calling methods
- Design and write code that makes use of the methods of classes from
tha Java API library (or external libraries), such as JOptionPane,
Math and String, based on reading and interpreting available
documentation for such methods.
- Pass values or variables of the appropriate datatype as arguments
to library methods that have parameters.
- Use a variable of the correct datatype to receive the return
value of library methods that return values.
- Explain the concept of the void keyword with respect to a
method whose return type is void.
- Explain the difference between calling a static method of a
class (ie class method) and a non-static (ie instance method) of
a class.
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
- Interpret UML sequence diagrams
- Use visibility modifiers to denote the visibility of a field or method
- Read and understand UML class diagrams.
- Write the method signatures for methods specified in a UML class
diagram
Object-oriented programming
- Explain what an object is and how it relates to a class.
- Explain the concept of static (ie class) attributes vs. non-static (ie instance) attributes.
- Explain what happens to an object in memory when a variable used to
reference that object is reassigned or set to null.
- Explain the concept of a class constructor.
- Explain the concept of a default constructor and how & when
it is automatically created.
Class creation basics
- Explain what is represented by a variable used to refer to an
object (e.g. Account a = new Account() - what does a actually contain?)
- Explain the difference between an object's attributes (data) and
data (variables) that are local to a method, and explain how to
distinguish between those pieces of data when both have the same name.
- Explain the concept of this.
- 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
- Explain what makes a predicate/boolean method unique
- Define and use class 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
Arrays
- Use an array to store privitive and object types
- Create an array of a given size
- Loop through an array
- Pass an array as an argument