CPSC 120: Test #1 Topics
The test covers Chapters 1, 2, and Sections 1 - 5 in Chapter 3
in the text plus all class notes,
handouts, quizzes, and lab materials.
General Concepts
- Operating Systems (Linux/Unix and Lab 0 Handouts plus class notes)
- Know what an operating system is
- Know the two main tasks of an operating system.
Know what some of the particular tasks are in the
"managing the hardware resources of the computer" category - what
specifically is the operating system in charge of? (See the Linux/Unix
Overview).
- Understand the file structure of the Unix (Linux) operating system
--- the tree-like organization, the absolute (full) and relative pathnames
for files, shorthand notation for certain files (the dot, tilde, etc.)
- Understand the idea of file permissions -- what they are, what they mean,
how you can find out the permissions in Linux
- Know what a shell is and know the basic Linux shell commands we have used
- Compilers, Interpreters and Languages
(Chapter 1 plus class notes and lab handouts)
- Know the programming language hierarchy
- Know what compilers and interpreters are and what each does (and how
they differ) - know the role of these in our use of Java (when are we
using a compiler and what does it do and when are we using an interpreter
and what does it do)
- Know the difference between the source file and the file containing
bytecode - know the role of each in the compilation process and know
the rules for the names of each type of file (i.e., what must the
source file be named, what is the name of the file created by the
compiler?)
- Know the difference between bytecode and machine code
- Computer Architecture/Hardware (On-line overview, on the course web page,
that was also handed out in class)
- Know the hardware components --
the role of each in the computer
system plus associated terminology (including the sub-components
within the CPU) and how they interact
- Understand the role of the bus
- Understand the differences between main and auxiliary memory
- Understand how the Control Unit works to control the execution of
instructions (be sure to understand the fetch-execute cycle
- its importance, the role of the Program Counter and the Instruction
register, etc - click on the detailed explanation from the on-line
overview)
Java and Programming Concepts (notes, lab, and the text)
- General Programming Concepts
- Problem solving steps
- General idea of object oriented programming - what is an object,
what is meant by the state of an object, what is meant by the attributes and
behaviors of an object,
what is a class, what are methods?
- Syntax versus semantics
- Comments/Documentation
- Use of White Space
- Levels of programming languages (hierarchy)
- Types of errors in programming (syntax or compile-time, run time, logic)
- Understand the coordinate system for Java graphics
- Basic Programming Constructs
- Identifiers -- what one is, syntax rules for identifiers in Java
- Variables - what they are, the difference between what is stored
in a variable of primitive type and one for an object
- Declaration of named constants (final) & the reason for using these
- Primitive Data types in Java
- String and numeric (int, double, char) literals -- syntax
- Data conversion - automatic widening conversions, explicit
narrowing conversions through type casting
- Output - printing using print and println (including + and
escape sequences)
- Input - setting up a Scanner object, prompting the user,
reading input using the
appropriate method (nextInt, nextDouble, nextLine)
- Escape sequences - what they are, how to use, why they are needed
- Assignment Statements - syntax and how one is executed
- Expressions (including the arithmetic operators and the precedence
and associativity rules) - be able to write expressions for computations;
be able to evaluate expressions exactly as the computer would
(including those that contain strings and + as concatentation) and show
the results.
- Print and println statements - be able to determine exactly what
will be printed by a given statement; be able to write statements
to print in the exact format given.
- Objects, Classes, and Methods
- Be able to distinguish between an object and a class
- Be able to declare a variable to be a reference to an
object
- Be able to instantiate an object with the new operator;
understand that this invokes a constructor method for the class
to initialize the object.
- Understand the use of the dot operator to invoke (call)
a method
- Be able to look at the signature of a method and from
that determine how to invoke the method
- Know how one invokes a static (class) method
- Know the basics of using the String class, the Math
class, the Scanner class, and the Random class (be able to write
an expression to generate a random number in a given range).
- In the String class know how to use the following methods:
charAt, length, replace, substring, toLowerCase, toUpperCase
- In the Random class know how to use the following methods:
nextInt, nextDouble
- In the Math class know how to use the following methods: sqrt,
pow.
- Syntax and Semantics
- Be able to find syntax errors in a Java program
- Be able to describe the semantics of statements
we have studied (for example,
what does the computer do with a variable declaration,
what is the relationship between memory and a variable
declaration, how
is an assignment statement executed, how are expressions
evaluated?)
- Be able to trace the execution of a program (show what
it would do in a step by step manner)