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 and lab materials.
Study your quizzes to get a sense of the type of questions that I like
to ask. Chances are high that you will see some of these questions again
General Concepts
- Operating Systems (Lab 0 Handouts plus class notes)
- Know what an operating system is
- Know the two main tasks of an operating system (as defined in the
textbook p. 4). 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?
- 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 the basic Linux shell commands we have used
- Compilers, Interpreters and Languages
(Chapter 1 plus class notes and lab handouts)
- 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 (and the role of each in the compilation process); know the
difference between bytecode and machine code
- Hardware
- 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 differences between main and secondary memory
- Know the various units of storage (bit, byte, KB, etc.) and how
much data each would hold.
- Know how many unique items an n bit code can represent.
- Understand how the Control Unit works to control the execution of
instructions (be sure to understand the fetch-decode-execute cycle)
Java and Programming Concepts (notes, lab, and the text)
- General Programming Concepts
- General idea of object oriented programming - what is an object,
what is a class, what are methods?
- Syntax versus semantics
- Comments/Documentation
- Use of White Space
- Differences between machine language, assembly language and high-level
languages
- 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, float, char) literals -- syntax
- Data conversion - automatic widening conversions, explicit
narrowing conversions through type casting
- Printing
- 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 and show
the results.
- 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
- 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).
- 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)
- Know the difference between...
- an applet and an application
- an expression and a statement
- a filename and a shell command