Montana Tech of The University of Montana
Computer Science & Software Engineering

CSCI 135
Fundamentals of Computer Science I
Fall 2011



FINAL EXAM INFORMATION

Exam rules: Material covered: Detailed topics:
  • Process of compiling and executing a Java program
  • Interpreting compiler and runtime errors
  • Basic data types: int, double, char, boolean, String
  • Declaring and assigning variables
  • Operators: + * - / % ++ -- ! && || < <= > >= == !=
  • Converting mathematical statement/equation into Java code
  • Text output using System.out.print and System.out.println
  • Reading input from the command line args[] array
  • Explicit and implicit type conversions (e.g. automatic type promotion, type casting)
  • Converting strings to numeric types, Integer.parseInt(), Double.parseDouble()
  • Reading input from standard input using StdIn and redirection
  • Repetitions structures: for-loops, while-loops, do-while loops, nested loops
  • Conditional structures: if-statement, if-else
  • Scoping: local variables, method parameters, instance variables
  • Relative sizes of integer types, byte, short, int, long
  • Relative sizes of floating-point types, float, double
  • Single dimensional arrays, creating and using
  • Creating and using static methods
  • Method signatures
  • Pass by value, what happens when you change parameters inside a method (for primitive types, reference types, array elements, immutable Strings)
  • Overloading of methods
  • Creating and using objects
  • Principles of data encapsulation
  • Creating and using object constructors
  • Difference between primitive types and reference types
  • When does a reference variable have a null value
  • How several reference variables can control the same object
  • Creating and using arrays of objects
  • How to test equality: floating-point types, reference types, strings
  • Style: comments, use of whitespace, naming of variables, constants, methods
  • Tracing program execution (i.e. given a program figure out what lines execute in what order, what gets output, etc)
  • Using Math methods such as: Math.random(), Math.sqrt(), Math.abs(), Math.min(), Math.max(), Math.pow()
  • Given a class API, use it in a program
  • Drawing using StdDraw
  • Playing audio using StdAudio
  • Enhanced for-loop
  • Overloaded methods
  • Using break statement in a loop
  • Use of multiple main() methods in a project
  • Given a Application Programming Interface (API), use the methods in a program
  • Creating and using ArrayList objects
  • Purpose of the Java import statement
  • Wrapper classes for primitive types (e.g. Double and Integer)
  • Default no-arg constructors, overloading constructors, calling constructors
  • Object inheritance, access modifiers
  • Polymorphism, objects related by inheritance in same container, overridden methods
  • Multidimensional arrays
  • Concrete versus abstract classes
  • Enumerations
  • The switch-case statement
  • Handling exceptions using try-catch blocks, ducking an exceptions
  • Difference between a checked and unchecked exception
  • Writing text to a file using PrintWriter class
  • Reading and parsing text from a file using the File and Scanner classes
  • Java memory management: the stack, the heap, and garbage collection
  • Difference between a static and instance method, difference in how you call them
  • Difference between a normal instance variable and one marked static

  • Suggested practice problems/programs:

    TopicExercisesCreative ExercisesWeb exercises
    Basics 1, 5 5
    Primitive data types 20, 23 25, 28, 30, 32 1, 30
    Conditionals and loops 1, 8, 28 1, 2, 10, 50, 78
    Arrays 35 1, 13, 38
    Input and output 1, 3, 5, 11, 26 18, 45
    Static methods 2, 4, 18 35
    Using objects 1 (use the Charge class), 37 1, 59, 62 (use the Picture class)
    Creating objects 25, 27, 38



    Page last updated: August 16, 2012