CSC297 2003F, Class 1: Introduction * Goals of the class * General structure of the class * A bit about Java Goals * To simulate 152 without requiring you to attend (note that we need to figure out exactly what Mr. Bishop expects of you). * To help you learn the Java programming language * To help you learn more about algorithms * Some new algorithms (quick sort) * Some new techniques for designing algorithms * Some new techniques for analyzing algorithms * To help you learn more about data types * What is a list? * Implementation aspect: A group of cons cells linked by cdrs * General model: A group of things that is ordered (not by any "natural" order, but by the way you put them in the list) * Recursive definition: * The empty list is a list * Cons of a value and a list is a list * Data types and algorithms are closely related: The way your organize your data affects your algorithm * E.g., binary search isn't very quick in a list (in fact, it's probably slower than linear search), while it's very fast in a vector * Object-oriented design * Functional design: Programs are built from functions (both named and anonymous); higher-order functions encapsulate common control ideas * Object-oriented design: Programs are built from objects * Objects collect data and capabilities * Comes from an attempt to build a language better for modeling the world * By grouping functions and data, we prevent clueless programmers from attempting to apply the wrong function to the wrong data * Learn about working in a group * Edit Sam's textbook ---- Java * A somewhat object-oriented programming language * Other somewhat object-oriented languages: C++, C#, Objective C, Objective Pascal * More pure object-oriented languages: Smalltalk-80 (Squeak), Oberon, Eiffel Java has an "interesting" history * Sun microsystems says "We need a language for programming embedded devices" * Robustness: If part of a program crashes, your refridgerator doesn't suddenly kill you * Peripherality: You can control a variety of devices/components * Multithreaded: Deal with multiple activities "at the same time" * Object-orientation gives you al ot of this * Designers at Sun added "sandboxing" * Designers at Sun also added "scalable for large programs" Suddenly the Web arrived. The Web changed everything. The Web needed a programming language. Enter marketing. Oak became Java. What do you need to know about Java (other than history): * Based on C (just like half of all modern languages) * Object oriented (you will build objects) * Hard to learn just a little * Insanely large library system