Fundamentals of Computer Science II (CSC-152 2000S)


Class 04: Lab: Objects and Methods

Back to Lab: Getting Started with Java. On to Lab: Objects and Methods, Continued.

Held Friday, January 28, 2000

Overview

Today's outline does not yet have an overview. Please let me know if you think it should have one.

Notes

Contents

Summary


Building Classes

The Class Declaration

Fields

Methods

Constructors

Scheme vs. Java

Just so you know what you're getting into, I've put together a small chart comparing Scheme to Java.

Category Scheme Java
Size Small Huge
Syntax Parentheses Lots
Paradigms Functional, Imperative Object-Oriented, Imperative
Data Types List, Vector, String, Number, Atom Primitive (numbers, characters), Object, String, ...
Types Implicit, Run-time Explicit, Compile-time
Hurdles/Benefits Anonymous functions; functions as data Size; exceptions; polymorphism
Execution Model Interpreted Compiled (plus JVM interpreter)
Function declaration (define name
  (lambda (arguments)
    body))
protection type name(typed-arguments)
{
  body
}
Function call (function arg1 ... argn) object.method(arg1 ... argn)
Return value from function value return value

Lab: J2


History

Tuesday, 18 January 2000

Wednesday, 26 January 2000

Friday, 28 January 2000

Back to Lab: Getting Started with Java. On to Lab: Objects and Methods, Continued.


Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.

This page may be found at http://www.math.grin.edu/~rebelsky/Courses/CS152/2000S/Outlines/outline.04.html

Source text last modified Fri Jan 28 09:42:44 2000.

This page generated on Sat Feb 19 16:08:25 2000 by Siteweaver. Validate this page's HTML.

Contact our webmaster at rebelsky@grinnell.edu