Exam 1 Topics
CS141: Introduction to Programming, Fall 2017


General Comments and Recommendations

Chapter 1: Introduction

Vocabulary

  • CPU
  • Memory
  • Secondary storage
  • Java compiler
  • Java Virtual Machine
  • (Java) library package, e.g. see Java API
  • source file
  • byte code
  • class file
  • IDE - Integrated Development Enviroment (e.g Netbeans)
  • backing up
  • syntax
  • case sensitive
  • block of code
  • main method
  • statement
  • string
  • compile time error
  • run-time error
  • algorithm
  • pseudocode

Misc Topics

Chapter 2 & 4: Fundamental Data Types

Vocabulary

Variables:
  ... variable declaration
  ... primitive data types (int, float, double, boolean, char)
  ... identifier, naming, camel case (see p. 37)
  ... reserved words
  ... variable initialization
  ... case sensitive
  ... literal, String literal
  ... scope, code block (brackets {...} )
  ... constants
  ... magic numbers

Variable Operations:
  ... variable assignment, assignment statement
  ... operator
  ... assignment statement
  ... binary arithmetic operators: +, -, *, /, %
  ... unary arithmetic operators: -, ++, --
  ... Mod function (%)
  ... integer division
  ... Math class, Math.PI, Math.random()
  ... operator precedence
  ... type conversion, cast operator

Other:
  ... stepwise refinement
  ... sytax rules vs convention
  ... statement vs expression
  ... programming style, indentation, Netbeans formatting tool
  ... comments, single line, multi-line, Javadoc

String Variables and Operations:
  ... String Class
  ... String operations
  ... escape sequence and control characters
  ... String concatenation and the + operator
  ... dot notation

Keyboard I/O, input/output:
  ... Scanner class
  ... Dialog Boxes
  ... System.out.print, System.out.println
  ... System.out.printf, format specifier
  ... console
  ... standard output/input

Misc Topics

Chapter 2 & 3: Classes and Objects

Vocabulary

Object-oriented programming & Class Structure
  ... Class (user defined type)
  ... Object (instance of class)
  ... primitive type vs class type
  ... Attributes, Fields, or Member variables (data)
  ... Methods (actions)

Method Structure:
  ... access specifier or modifier (e.g. public, private)
  ... method name
  ... method parameters
  ... pass by value vs pass by reference
  ... return type, return value
  ... variable scope: local vs global, shadowing

Class Structure (more detail):
  ... Constructors, default constructor
  ... Public interface
  ... Private implementation, data hiding
  ... Mutator methods (setter)
  ... Accessor methods (getter)
  ... toString method

Object Creation and Use
  ... The keyword: new
  ... Sending a message, calling a method
  ... dot notation
  ... (formal) parameter vs argument (actual parameter)
  ... parameter passing
  ... Null pointer and the Null Pointer Exceptions
  ... Self reference keyword this

Code Design and Development
  ... UML Diagram
  ... Javadoc
  ... API (Application Programmer Interface)
  ... Encapsulation, modularization
  ... stepwise refinement
  ... reusability

Testing and Debugging
  ... debugging & testing
  ... tracing code
  ... unit testing

Topics

Chapter 5: Decisions

Vocabulary

Types of Decision Structures:
  ... if statement
  ... if-else statement
  ... multi-way if-else
  ... nested if-else
  ... switch statements
  ... indentation conventions
Code blocks & variable scope


Decision Structure Syntax:
  ... decision logic and flow charts
  ... condition and body
  ... boolean value, expression

Random numbers


Building Boolean Expressions:
  ... relational operator (<, >, <=, >=, ==, !=)
  ... boolean (logical) operators (!, &&, ||). Examples
  ... boolean operators precedence (See table)
  ... truth tables (p. 209)
  ... De Morgan's Laws (p. 212)

String Comparison
  ... Lexicographic ordering (of Strings)
  ... compareTo() and .equals operators

Other (optional)
  ... The Conditional Operator bool ? val1 : val2 (p. 182)
  ... Switch statement (p. 195)

Misc Topics