CS 9G, "Java for Programmers" 1 unit, self-paced, P/NP; offered fall and spring semesters. Restrictions on enrollment: CS 9G should be counted as a "computer science service course", with restrictions on credit toward graduation as specified in the rules for such courses. ABBREVIATED COURSE TITLE JAVA FOR PROGRMMERS INSTRUCTOR IN CHARGE M. Clancy, Senior Lecturer CATALOG DESCRIPTION Self-paced course in Java for students who already know how to program. Applets; variables and computation; events and flow of control; classes and objects; inheritance; GUI elements; applications; arrays, strings, files, and linked structures; exceptions; threads. PREREQUISITE CS 9C or 9F or 61A (experience with object-oriented programming or with a C-based language) EXTENDED DESCRIPTION This course is organized similarly to other courses in the CS 9 series. Course activities include quizzes that test language details and programming assignments that provide practice with the language and associated programming techniques. Topic coverage is approximately as follows: Segment 1: applets; variables and computation; events and flow of control (chapters 1 through 8 of the Bell and Parr textbook). Quiz coverage: Details about Java looping and testing constructs; the paint, repaint, init, and handleEvent methods of applets. Programming assignment: Write a simple applet that accumulates input values. Segment 2: classes and objects; inheritance; interfaces (chapters 9 through 11, 21, and part of chapter 28 in Bell and Parr). Quiz coverage: Details of defining classes and interfaces and using objects; public vs. private methods; static methods and data; inheritance. Programming assignment: Write a simulation program that displays coordinated movement of a variety of graphical objects. Segment 3: arrays, strings, and linked structures. (chapters 12 through 15, 22, and 24 in Bell and Parr). Quiz coverage: Details about the use of built-in data structures and those supplied in Java libraries. Programming assignment: Design two versions, one using a linked representation and one using an array or vector, of a class that represents a collection of graphic objects, and write a program that uses the class. Segment 4: files; exceptions; applications (chapters 16 through 19 and 23 in Bell and Parr). Quiz coverage: Details of exception handling, particularly those that involve use of files and interaction with the user. Programming assignment: Write an application whose flow of control mostly involves exception handling. Segment 5: threads (chapter 25 in Bell and Parr). Programming assignment: Program the simulation of segment 2 using threads. (There is no quiz for this segment.) We hope, by incorporating early coverage of applets, to make this course suitable for students with widely varying previous programming experience. A student familiar with C but not with object-oriented programming, for example, will have an easy time with Java's syntax but be forced to learn about objects and methods immediately to program an applet. On the other hand, a student familiar with OOP in languages such as Scheme, though challenged by the syntax of Java, should find no problems conceptually with supplying the methods for an applet REQUIRED TEXTBOOK *Java for Students* (second edition), Douglas Bell and Mike Parr, Prentice Hall Europe, 1999. RECOMMENDED TEXTBOOK *Java in a Nutshell* (second edition), David Flanagan, O'Reilly, 1997.