CS 141: Software Engineering I


Note: as of Fall 2003, CS 141 will no longer be offered. Because this page serves as a reference for many 141 students, I will leave the page as is. However, you may want to use the new CS 143 homepage instead.


Navigation shortcuts: (Modules: 1, 2, 3, 4, 5, 6, 7, 8, 9, 9B, 10, 11, 12, 13, 14, A ) (Exercises: 1, 2, 3, 4 ) (Assignments: 1, 2, 3, 4 ) ( Important dates: ) ( IAQ) ( API)

Announcements:


Spring 2003 information:


Resources:
Coursework and Course Policies

NOTE: The contents of this page may change slightly over the semester, and additions may be made to the page. In particular, the point-weightage and due-dates are approximate at this time, and may change.


Course Syllabus:

The course will seek to cover as many of the following modules as possible (modules do not correspond to lectures):

NOTE: If you haven't seen C/C++/Java-type syntax before, you might want to do the exercises in the Syntax Review Module after reading through modules 1 and 2.

  • Introduction: course goals and overview . (This document).
  • Module 1: an introduction to Java
    • Language features: an overview.
    • The hype: what it is and what it is not.
    • Getting started: writing, compiling and executing helloworld.
    • Scanning a more complex example.

  • Module 2: Elementary Java, part I
    • Comments.
    • Datatypes, variables, constants, initialization.
    • Unicode, void, strings.
    • Assignment, expressions, operators.
    • Control flow.
    • Arrays.
    • Also see syntax review in the Appendix.

  • Module 3: Elementary Java, part II
    • Functions, return types, parameters.
    • Function overloading, signatures.
    • I/O, files.
    • program modules, naming conventions, import statement.

  • Module 4: Java objects, part I: static objects and encapsulation
    • Class definition, static data and functions, encapsulation, constants.
    • Source files, visibility.
    • Inheritance, function overriding.

  • Module 5: Java objects, part II: dynamism
    • Class instances, instance variables and methods.
    • Inheritance, function overriding, polymorphism, casting.
    • Objects as return values, references, this
    • Constructors.
    • Constructor chaining.

  • Module 6: Data structures in Java
    • Linked lists without pointers.
    • Enumeration objects.
    • Dynamic multidimensional arrays.
    • Pre-packaged structures: vectors, hashtables, bitsets.
    • Additional data structures, time-permitting.

  • Module 7: Java objects, part III: advanced topics
    • Interfaces, abstract classes, multiple interfaces.
    • static initializers.
    • Finalizers, shadowed variables and methods, visibility.

  • Module 8: The Java library: a quick peek
    • Overview, examples of static and dynamic objects.
    • Math, BigInteger, Date, formatting, I/O.
    • How not to get confused by the library documentation.

  • Module 9: AWT, part I
    • Elementary drawing.
    • Frames, canvases and panels.
    • The Java 1.1 event model.
    • A simple button.
    • Handling mouse clicks.
    • A simple applet.

  • Module 9B: Swing, part I
    • Elementary drawing in Swing.
    • Swing versions of Module 9 examples.

  • Module 10: Java objects, part IV: inner classes
    • Inner classes, member classes, anonymous classes.
    • How to implement event listener callbacks.

  • Module 11: Swing, part II
    • Components and containers.
    • Creating user interfaces: buttons, menus, checkboxes etc.
    • Layout managers.
    • File dialogs, focus, pop-up menus.
    • Building an application.

  • Module 12: Threads
    • Running multiple threads.
    • Synchronization, monitors.
    • Communication.

  • Module 13: IO and Networking
    • IO overview, TCP/IP.
    • Learning to use IO streams.
    • Pipes, Object serialization
    • Networking overview, TCP/IP.
    • Client/server programming via sockets.
    • URL's and http.
    • Applets and communication.

  • Module 14: Native methods and JDBC
    • How to call a C function from Java.
    • JDBC.
    • JDBC and Oracle

  • Module 15: Exceptions
  • (Not available at this time)
    • Handling exceptions: the try statement.
    • Declaring exceptions, passing the buck.
    • Creating exception objects.

    Everything up to this point completes a basic course on Java. Advanced features follow.

  • Appendix: Various topics
    • Java Syntax Review and Exercises
    • Random Number Generation
    • Stepwise Refinement
    • Additional Practice Exercises

  • Advanced Java topics (time-permitting)
    • Remote methods: RMI and CORBA.
    • Security.
    • Java Beans.
    • Servlets.

Getting started

  • First, make sure you have an account on BOTH the NT machines in Room 405 and the SEAS Unix system.
  • Want to work at home?
  • Java runs on the following platforms: Solaris, Win-95/NT, Linux. The Java Development Kit (JDK) is free - you can download it directly from the Sun website. Download JDK 1.2

  • On our system, you need to make the following changes:
    • If you are using ksh :
      • Add the following lines to your .profile
      •   export PATH=$PATH:/usr/java/bin
          export CLASSPATH=/usr/java/lib:.
                      
    • If you are using tcsh :
      • Add the following lines to your .cshrc
      •   
          setenv PATH = ($PATH /usr/java/bin)
          setenv CLASSPATH /usr/java/lib:.
                      
    • Add the following URL's to your netscape bookmarks:
    • Test that it's all working:
      • Copy the files testjava.java and testjava2.java over to your directory:
      • Note: you can use the Unix utility wget to download a file specified by a URL, as in:
          
        % wget http://www.seas.gwu.edu/~simhaweb/cs141/examples/testjava.java
                  
      • Compile the file (Unix):
      •   
        % javac testjava.java
                  
        (Don't type the percentage prompt).
      • Execute:
      •   % java testjava
                  
  • Getting help:

    The best place to get help is in the labs, from the TA's.

    To get help from me, it's best to stop by during my office hours with a printout of your program (if applicable).

    Sending me your code by email and expecting me to debug it is NOT acceptable. (See email policy above).

    Note: Java's debugger is not very friendly, so you have to print out a lot of information when debugging. For questions regarding the Java library, refer to the on-line documentation.

  • Important dates: lectures, due dates etc (subject to change)
    • Wed, Jan 15: Module 1, Java Syntax Review Module
    • Exercise 1 due 9pm Tue Jan 21
    • Wed, Jan 22: Module 2, Module 3
    • Exercise 2 due 9pm Tue Jan 28
    • Wed, Jan 29: Module 3, Module 4
    • Wed, Feb 5: Module 5
    • Assignment 1 due 9pm Tue Feb 11
    • Wed, Feb 12: Module 5
    • Wed, Feb 19: Module 6
    • Assignment 2 due 9pm Tue Feb 25
    • Wed, Feb 26: Modules 6 and 7
    • Exercise 3 due 9pm Tue Mar 4
    • Wed, Mar 5: Modules 6 and 7
    • Wed, Mar 12: Modules 7 and 8
    • Exercise 4 due 5pm Fri Mar 14
    • Wed, Mar 19: No class - Spring Break
    • Wed, Mar 26: Module 9 Exam 1 (Material: modules 1-7)
    • Wed, Apr 2: Modules 9, 9B
    • Assignment 3 due Tue Apr 8
    • Wed, Apr 9: Modules 10, 11
    • Wed, Apr 16: Modules 11, 12
    • Assignment 4 due 9pm Tue Apr 22
    • Wed, Apr 23: Module 13 Exam 2 (Material: TBA)