Week 01: Class and Compilation
-
After this unit, students should
- understand the aims of CS2030/S.
- understand how the key concepts covered in CS2030/S are related to each other.
-
After this unit, students should
- recap some fundamental programming concepts, including the concept of a program, a programming language, a compiler, and an interpreter.
- be aware of two modes of running a Java program (compiled vs. interpreted).
- be aware that compile-time errors are better than run-time errors, but the compiler cannot always detect errors during compile time.
-
After this unit, students should
- appreciate the concept of variables as an abstraction.
- understand the concept of types and subtypes.
- contrast between statically typed language vs. dynamically typed language.
- contrast between strongly typed language vs. weakly typed language.
- be familiar with Java variables and primitive types.
- understand widening type conversion in the context of variable assignments and how subtyping dictates whether the type conversion is allowed.
-
After this unit, students should
- understand the importance of function as a programming construct and how it helps to reduce complexity and mitigate bugs.
- be aware of two different roles a programmer can play: the implementer and the client.
- understand the concept of abstraction barrier as a wall between the client and the implementer, including in the context of a function.
-
After this unit, students should
- understand composite data type as an even higher level abstraction over variables.
- understand encapsulation as an object-oriented (OO) principle.
- understand the meaning of class, object, fields, and methods, in the context of OO programming.
- be able to define a class and instantiate one as an object in Java.
- appreciate OO as a natural way to model the real world in programs.
- understand reference types in Java and their differences from the primitive types.