CSC152 2006S, Class 1: About the Class Admin: * URL: http://www.cs.grinnell.edu/~rebelsky/Courses/CS152/2006S/ * No office hours today * Homework! * Meet Eryn, "Ms. O'Neil, Sir/Ma'am" Overview: * Subject matter(s) of the course * Administrative issues CSC152, Fundamentals of Computer Science II * Course in Computer Science (what is "Computer Science"?) * Science of information processing (taking something you already know and finding out something you don't know) * Problem solving for programming * Terms * Science: Scientific Method * A method of study in which you start with observation form a hypothesis, design an experiment that lets you test the hypothesis, conduct the experiment, interpret the results ("prove" or "disprove") back to the beginning ('refine hypothesis') * Unfortunately, computer scientists rarely use the scientific method * Programming: Explaining problems to a computer * Hypothesis: Educated guess (went to a good school) * Study computation (algorithms and data) CS152: Algorithms and Abstract Data Types * Algorithm: Formal instructions for solving a problem * Abstract Data Type (ADT): description of the abilities of data Lists in Scheme: Lists are collections of data which provide N key operations: nil: make empty list cons: add something to the front of a list car: grabs front of list cdr: grabs all but front of list null?: determine if a list is empty * Data Structures: How to implement ADTs * Lists in Scheme are implemented with "pairs" of pointers Also: Object-Oriented Programming * Perspective for representing algorithms and data * Represent programs in terms of communicating objects * "Object": Data plus capabilities (functions) * Also ... * Encapsulation - Data in an object are protected; access only through methods * Inheritance - Can define new objects in terms of old * Polymorphism - Can use a variety of objects for the same task Also: Java - provides a context * Very popular programming language * Object-oriented * Does not look like Scheme * Trusts you less than Scheme Homework (to help you think about ADTS and OOPS): * What are the key operations for rational numbers? * Classify them