Notes
Slide Show
Outline
1
CS110 Wrapup
Tuesday, May 11, 2004
  • Announcements
    • final exam Thursday, May 20, 8:00 AM               McCormack, Floor 01, Room 0608                                   (easier than last exam?!)
    • wise1  due next tonight
    • wise due Thursday
  • Wrapup
    • Course goals
    • How we met them
    • Final exam
    • Where you can go next
      • at UMass
      • in the profession

2
WISE
  • wise1 due tonight must compile and run
  • minimal functionality acceptable


  •   if (whatever)
  •       (
  •            if (somethingElse)
  •                  {
  •                       // many lines of code that run                                                      // off the edge of the pap er
  •                  }
  •        }
3
Learning to program
  • Lots of fun
  • Practical
  • Hard, time consuming
  • Unusual mixture:
    • sophisticated intellectual content
    • picky details that must be right
  • Exercise in reading, writing, thinking
  • CS110 is for CS majors, future professionals
4
Teaching/learning style
  • To learn a language well,  live in a land where it’s spoken – anxiety producing, but efficient!
  • Learn to write by to reading and writing and writing about what you learn
  • 60% of a lot is more than 100% of a little
  • Ask questions (to slow me down)



5
CS110 goals
  • Learn to think like a programmer by reading and writing programs
  • Learn Java
  • Prepare for life as a CS major
  • Work hard / work productively
  • Have fun
  • Amaze yourself by how much you’ve learned


6
Teaching philosophy
  • Programming is much more than the details
    • think about the important ideas
    • but the details matter: learn syntax too
  • Read more code than you write,            write about the code you read and write
  • Work on significant applications:         Bank, shapes, Juno, WISE
  • Learn from lots of sources
    • class, books, net, API, friends
  • Pay as little attention to grades as possible
7
OOP
  • Think of the (software) world as a bunch of objects communicating with one another
  • Choose a language that supports that view
  • Java
    • object oriented
    • portable
    • fashionable
    • well designed
    • right for CS110 and for practical programming
8
Development Environment: xemacs
  • Arguments for
    • basis for future work in major and career
    • easy to set up on a PC
    • java and javac are visible commands
    • command line interface (no GUI)
  • Arguments against                                         (for a modern graphical environment instead)
    • command line interface (no GUI, unintuitive)
    • old fashioned
    • no sparkle
9
Official Java
  • Keywords
    • http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html                            abstract, boolean, break, byte, case, catch, char, class, const, continue, default, do, double, else, extends, final, finally, float, for, goto, if, implements, import, instanceof, int, interface, long, native, new, package, private, protected, public, return, short, strictfp, static, super, switch, synchronized, this, throw, throws,                                                                             transient, try, void, volatile, while
  • Other syntactic elements
    • = + - * / \ “” ‘’ ( ) { } [ ] || && . , ; < > >= <= == % // /* */ /** ? : ! != ; += ++
10
Vocabulary
  • Java API classes
    •  String, TreeMap, Iterator, ArrayList, Integer, Object,
    •   Character, File, System, *Reader, *Writer,
    •   Math, StringTokenizer, StringBuffer, Date, Exception, ...
  • From our applications
    • Bank, *Account, Shape, Screen, Box, *Line,
    •    LinearEquation, Juno, Shell, ShellCommand, JFile,
    •    Directory, TextFile, User, *Exception, Terminal,  WISE*,   …
11
Vocabulary

  • For talking about programs
    • comment, api, message, method, object, class,
    • convention, polymorphism, token, identifier, parse,
    • javadoc, cast, unit test, implementation, inheritance,
    • JVM, getter, overrides, documentation, declaration,
    • scope, parameter, argument, signature, field, variable,
    • error, instance, block, call stack, syntax, semantics,
    • delegate, design, model, compile time, run time, ...

  • Study from JOI glossary
12
Final Exam
  • Structure like the hour exams
  • Mix of easy and hard questions
  • Exam is three hours long but I will try to write one that takes just two
  • Chapters 1-9 of JOI, examples
  • Based on Bank 9, Juno 7
  • Closed book/notes
13
Final Exam
  • Some questions will refer to WISE system solution (to be posted) – bring code to class
  • Some perfectly predictable questions
    • what are the tokens, classes, objects, messages, …?
    • in which class will you find …?
    • what does this program/line/method do …?
  • Improve WISE by adding …
14
Final Exam
  • Write HelloWorld.java or some similarly simple program, from scratch
  • Boxes and arrows
  • Call stack
  • Questions with the answer “It depends … ”
  • Questions that require you to write sensibly about programs and programming
15
What next?
  • CS210: Data Structures and Algorithms
    • interfaces (more abstract than abstract classes)
    • lists, trees, stacks, queues
    • dynamic data, references, equality, cloning
    • searching, sorting, parsing, evaluating expressions
    • efficiency considerations
    • GUI programming
    • more Java
  • CS240: Programming in C
    • procedural programming (not OOP)
    • memory layout: bits and bytes, pointers,                   the stack and the heap,  debugging
    • introduction to Unix, particularly tools



16
What next?
  • CS major
    • CS210 & CS240, calculus & linear algebra, CS310, CS320, upper level work ...
  • Real world
    • Software development
    • QA (Quality Assurance = software testing)
    • IT (Information Technology                                           = business computing infrastructure)
    • System administration
    • Technical writing
    • Web development/maintenance
    • Customer support
    • Your own internet startup company


17
Heaven and Earth
  • There are more things in heaven and earth than are dreamt of in your philosophy.            (Shakespeare’s Hamlet)
  • There are more things dreamt of in your philosophy than are in heaven and earth. (Programmers can invent worlds that never were, nor ever could be.)


18
Thank you
  • I enjoyed this semester