COMP1202 Topics Checklist
Thai Son Hoang
ECS, University of Southampton, U.K.
COMP1202
10th December 2019
Lecture 00 - Starting Out
I Object-Oriented Programming:
I Classes and Objects
I Logic operators:
I ==, !=, &&, ||
I >, >=, <, <=
,
T.S. Hoang 2/17
Lecture 01 - Introduction to Java
I From Java code to Program
I Compile
I Execute
I Java Virtual Machine
I How can Java work on all different platforms
I Writing a Class in Java
I File name convention
I Declaration of classes, variables, methods
I main method
I Conditional if .. else ... statement
I Using brackets to group statements
,
T.S. Hoang 3/17
Lecture 02 - Variables
I Primitive (int, boolean, char, float, ...) vs Object types
I Defined?
I Stored?
I Passed?
I Variable Scope
I Member variables
I Local variables
,
T.S. Hoang 4/17
Lecture 03 - Methods
I Method parameters and arguments
I Passing arguments: Primitive vs. Object types
I Return type
I Using collections to return many things
I Overloading
I Method signature (its name, parameters and order of parameters)
I Overloading requires unique signature for each method.
,
T.S. Hoang 5/17
Lecture 04 - Computational Thinking
I Algorithm and characteristics: performanace, efficiency,
understandability, scalability, reusability, reliability, elegance.
I Coding style
,
T.S. Hoang 6/17
Lecture 05 - Encapsulation
I Accessor and Mutator Methods (aka. Getters and Setters)
I Principle of encapsulation
I private vs public keywords
I Constructors
I Naming convention
I Does not have a return type
I Can be overloaded
I Default contructor: No parameter and no behaviour
,
T.S. Hoang 7/17
Lecture 06 - Loops and Arrays
I Loops: Syntax, condition, loop body, termination
I while loop
I do ... while loop
I for loop
I Arrays: Syntax
I Declaration
I Initialisation
I Assignment
I Retrieval
I ArrayIndexOutOfBoundsException
I for each loop: Syntax
,
T.S. Hoang 8/17
Lecture 07 - Collections and Iterators
I Arrays vs ArrayLists
I Declaration
I Insertion
I Access
I Removal
I Genericity: Syntax
I Autoboxing vs unboxing
I instanceof keyword, typecasting
I Iterators:
I hasNext() method
I next() method
I Benefit of iterators
,
T.S. Hoang 9/17
Lecture 08 - Java Library
I Implementation vs Interface.
I Importing: classes, packages, etc.
I String Objects
I Identity vs. equality (i.e., == vs .equals() method
I HashMap: collection that maps a key to a value
I put method
I get method
,
T.S. Hoang 10/17
Lecture 09 - IDEs
I Source code editor
I Build automation
I Debugger
I Breakpoints
,
T.S. Hoang 11/17
Lecture 10 - Super- and Sub-classes
I Inheritance to avoid code duplication
I Inheritance and Encapsulation
I public vs protected vs default (no keyword) vs private
I super keyword for calling super-class’ contructor.
I Superclass contructor rules
I References and Inheritance
I Subtitution
I The Object class
,
T.S. Hoang 12/17
Lecture 11 - Polymorphism
I Overriding methods
I Which method gets called?
I The first method found from the bottom of the inheritance tree is
called
I Dynamic binding: is calling the most specific version of the
method, even when the reference has the type of the superclass
I Polymorphism: Substitution + Overriding + Dynamic binding
I super keyword to access methods in the superclass.
,
T.S. Hoang 13/17
Lecture 12 - Software Design
I Concepts for Code quality:
I Duplication: Use methods to write code once and call many times
I Coupling: Aims for loose coupling
I Cohesion: Aims for high cohesion, i.e. each unit responsible for
one single logical task.
I Responsibility-driven design (RDD): leads to low coupling
I Thinking ahead and refactoring
,
T.S. Hoang 14/17
Lecture 13 - Testing and Debugging
I Error Handling: Advantage and Disadvantage of each approach.
I Print and default
I Error codes
I Exceptions: try ... catch
I Debugging:
I Syntax errors
I Logical errors
I Testing Strategies
I Unit testing: Equivalence Class vs Boundary Value
I Manual walkthroughs: Tabulating object state
I Verbal walkthroughs: Pair programming
I Print statements:
I Debuggers
,
T.S. Hoang 15/17
Lecture 14 - Designing Applications
I Analysis and Design
I Noun Verb Analysis
I Stepwise Refinement
I Software Engineering
I Documentation
I Cooperation
I Prototyping
I Growth model for iterative development
I Design Patterns
I Pattern structure
I Decorator pattern
I Singleton pattern
I Factory pattern
I Observer pattern
,
T.S. Hoang 16/17
Lecture 15 - Abstract Classes and Interfaces
I abstract keyword
I abstract class
I abstract method
I Multiple inheritance vs interfaces
I extends vs implements keyword
,
T.S. Hoang 17/17