CSC 2010 Syllabus

CSC 2010 - Introduction to Computer Science

MWF 9:05 - 10:00 and 12:20 - 1:15

Instructor: Martha Kosa

My Spring 2007 Schedule for office hours, classes, etc. My office is in room 214 in Bruner Hall.

Prerequisite: CSC 2001 with a grade of C or better
Corequisite: CSC 2011

Course Objectives

Textbook

Required

Java Software Solutions by John Lewis and William Loftus
ISBN: 0321245830

Approximate weekly topics

1) Introduction to Java

  • What is a program?
  • Programming language and programming statements
  • Sample Java program
    • Inline documentation
    • Class definition
    • Method definition
    • Sequential Program Execution
    • Identifiers and reserved words
  • White space and program formatting
  • Editors, compilers, and interpreters
  • Syntax and semantics
  • Errors
    • Compile
    • Runtime
    • Logical

2) Primitive Data

  • Literals
    • String concatenation
  • Variables
  • Assignment Statement
  • Constants
  • Primitive Data Types
    • Integers (byte, short, int, long)
    • Floating Point (float, double)
    • Character
    • Boolean
  • Arithmetic Expressions
  • More Operators
  • Operator Precedence
  • Data Conversion
    • Assignment Conversion
    • Arithmetic Conversion
    • Narrowing Conversions and Casting

3) Using Objects

  • Classes: Specify Attributes
  • Objects: Assign Values to Attributes
  • Methods/Services
    • Basic (Static) Method Construction
    • Primitive Parameters and Return Types
  • Object Variables
    • Declaration and Initialization
      • null
    • New and Instantiation
    • Constructor
    • References
      • Aliases
        • ==
        • .equals
      • Garbage Collection
  • String Class
    • Immutability
    • Miscellaneous Methods
    • StringBuffer (time permitting)
  • Class Libraries
    • Packages
    • Import
  • Sample Classes
    • Keyboard
    • Random
    • Math
    • DecimalFormat
  • Abstraction
    • RandomNumbers
    • Round

4) Conditional Statements

  • Boolean Expressions
  • Relational Operators
    • Equality
    • Inequality
  • Logical Operators
    • And, Or, Not
    • Short Circuit
  • Operator Precedence
  • Conditional Statements
    • If
    • If-Else
    • Block Statements
    • If-Elseif-Else
    • Switch
  • Tricky Comparisons
    • Comparing Chars
    • Comparing Strings
    • Float Tolerance

5) Repetition

  • While Statement
    • Loop Body
    • Unknown Amount of Repetition
    • Validating Input
    • Sentinel Value
    • Infinite Loops
  • Break and Continue
  • For Statement
    • Known Amount of Repetition
    • Initialization
    • Test
    • Increment

6) Class Basics

  • Classes
    • Define Attributes
    • Define Services
    • Instantiation of Objects
  • Variables
    • Scope
    • Instance
    • Local
  • Encapsulation
    • Private Data
    • Public Methods
    • Accessor and Mutator
  • Identifying Classes and Objects
  • UML

7) Methods

  • Return Statement
    • Void
  • Parameters
    • Formal
    • Actual
    • Pass by Value/Copy
      • Implications for Primitives
      • Implications for Objects
  • Constructors
    • Default
  • Method Decomposition
    • Private Methods
  • Method Overloading
    • Method Signature
    • Overloading Constructors

8) Enhancing Classes

  • Static Modifier
    • Class Level Methods/Variables
    • Instance Level Methods/Variables
  • Object Relationships
    • Dependency/Uses
    • Aggregation/Has-A
    • this
  • Interfaces
    • CompareTo
    • Implementing Multiple Interfaces
  • Interface Polymorphism
    • Interface Hierarchies
    • Object Casting
      • Widening Conversions
      • Narrowing Conversions
    • Interface Variable Type
      • Allowed Method Calls
    • Interface Formal Parameters
  • UML

9) Arrays

  • Random Access
  • Using Arrays
    • Bounds
    • For Loops
      • For Each
    • length constant
  • Declaring
    • Size Can Be Determined at Runtime
    • Initializer Lists
  • Arrays as Parameters
    • Pass by Reference
  • Arrays of Objects
  • Command Line Arguments
  • Sorting
    • Selection Sort
    • Insertion Sort
    • Bubble Sort
  • Two-Dimensional Arrays
    • Ragged Arrays
    • Row Major
  • Variable Number of Parameters
  • ArrayList
    • Always close to the correct size
    • Sample Use
    • Wrapper Classes and Autoboxing
  • UML

10) Inheritance and Polymorphism

  • Creating Subclasses
    • extends
    • protected
    • super
  • Overriding Methods
  • Class Hierarchies
    • Is-A Relationship
    • Object Class
    • Abstract Classes
      • With Abstract Methods
      • Without Abstract Methods
    • Indirect Member Access
    • Demonstrating Inheritance Graphically
      • Abstract Shape
      • Rectangle/Square
      • Oval/Circle
  • Hierarchy/Inheritance Polymorphism
    • Late Binding
      • Object Casting Revisited
        • Widening Conversions
        • Narrowing Conversions
    • Variable Type as Part of a Hierarchy
      • Allowed Method Calls
      • Calling Overriden Methods
    • Polymorphic Formal Parameters
  • UML

    11) Exceptions

    • Try
    • Catch
    • Finally
    • Throw and Throws Clause
    • Exception Propagation
    • Throwable Class
      • Exception Class
        • Checked Exceptions
        • Unchecked Exceptions
        • Philosophy

      12) I/O Streams

      • I/O Streams
        • Input Streams vs. Output Streams
        • Character Streams vs. Byte Streams
        • Data Streams vs. Processing Streams
      • File I/O
        • Readers
        • Writers
        • StringTokenizer
      • I/O Exceptions
      • Abstraction
        • Keyboard Input
        • File I/O
        • StringTokenizer
      • Object Serialization

      13) Graphical User Interface

      • AWT and Swing
      • Java Event Model
      • Listener Interfaces
        • ActionListener
      • Containers
        • Frames
        • Panels
      • Components
        • Labels
        • Buttons
        • Text Fields
        • List Boxes
        • Combo Boxes
      • Layout Managers
        • Flow
        • Grid
        • Border
      • Abstraction
        • SimpleDialogs

      14) Graphics (time permitting)

      • Graphics in Applications
      • Drawing Shapes
      • Color

      Important Dates and Tentative Test/Program Schedule
      All tests are cumulative

      90-100   A
      80-89.99 B
      70-79.99 C
      60-69.99 D
      below 60 F

      I reserve the right to alter the sequence of the weekly topics.

      I do not know everything, but will try to find the answer to your questions.

      Grading Policy

      You must make at least a 60 on the final to obtain a C or better in the class.
      Of course, your average for the entire course must still be 70 or better to obtain a C or better.

      Your grade will be based on programs, tests, and weekly announced quizzes (45% programs and 55% tests/quizzes). Your quiz average will count for 10% of your final average (the same as a test). Quizzes and regular exams can be made up with appropriate documentation (i.e., doctor's note).

      You can receive help from me or the TAs if you request help the day before the program is due (or earlier).

      Programs are due at 4:30 pm on the date specified on the assignment. For each weekday that a program is late (weekends/holidays are not counted as late days), 5 points will be deducted (maximum penalty 10 points). Programs later than two days will not be accepted without documentation of exceptional circumstances.

      Note that your program has not been turned in until I receive the electronic version AND a printout of any files which you have modified and/or commented (not all of the files required to run your program must be printed out).

      There are two ways that you can submit your program.

      1) You can email your program to me. Again, zip up all of your files into a single zip file. Include all of the files that I will need to run your program in the zip file. Label your zip file with your name and the program number.

      2) You can bring me a disk with your work. Make sure that you have all of the files that I need to run your program on your disk.

      Programs will be graded by the criteria described below. Explain what the class is for, what instance variables are for, and what duties methods are meant to perform. Important lines of code should be pointed out and explained, variables should have meaningful names, and the code should be well-formatted. Refer to the text and class examples.

      Approximate Program Grading Criteria

      Criterion

      Ratings / Description

      A. Program Execution - 60%

      60

      Executes correctly

      45

      Executes but doesn’t produce expected output on some occasions

      30

      Executes incorrectly (for the given problem)

      0

      Does not even compile

      B. Program Specification - 20%

      20

      Satisfies requirements completely

      15

      Contains parts that are not implemented completely

      10

      Meets few specifications

        0 Meets no specifications

      C. Program Documentation- 20%

      20

      Well formatted code, well documented methods, good program design

      15

      Hard to follow code, sparse or poor comments, adequate program design

      10

      Incomprehensible code, poor program design

      0

      Incomprehensible code, no comments, bad identifier names, no program design


      Honesty
      Students are encouraged to obtain limited help and/or ideas from one another.  However, copying assignments or allowing assignments to be copied will not be tolerated.  The penalty for cheating in the class is an "F" for a final course grade.

      Attendance Policy
      You are expected to attend every class. You are responsible for all assignments and material covered during all class meetings whether you are present or not.

      Disabilities
      Students with a disability requiring accommodations should contact the Office of Disability Services (ODS). An Accommodation Request (AR) should be completed as soon as possible, preferably by the end of the first week of the course. The ODS is located in the Roaden University Center, Room 112; phone 372-6119.

      Contact
      Email: mjkosa@tntech.edu