Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS100J 11 September 2003 Course Management System for CS100J is now populated with students who were pre-registered. Look at course web page to see how.

Similar presentations


Presentation on theme: "CS100J 11 September 2003 Course Management System for CS100J is now populated with students who were pre-registered. Look at course web page to see how."— Presentation transcript:

1 CS100J 11 September 2003 Course Management System for CS100J is now populated with students who were pre-registered. Look at course web page to see how to get to it and what to do if you are not in it. Consider changing your section to a less crowded one! Some sections are overly crowded. Others are 1/3 full. Tuesday 10:10 section is canceled. Today’s topic: Customizing a class (continued) Quote for the day: There is no reason anyone would want a computer in their home. --Ken Olson, president, chairman and founder of Digital Equipment Corp., 1977

2 CS100J 09 September 2003 ABOUT THE COURSE TEXT If you cannot find the course material for CS100J on the Text Shelves in the Cornell bookstore, Order a Reprint at the Book Information Desk. It will be printed within 2 business days, and you will be emailed as soon as it is available. (Some are returned daily.)

3 CS100J 09 September 2003 QUIZ on Tuesday. See “Key Concepts” at end of Section 1.4.6 Class Instance or object or manilla folder Component: field and method Procedure, function, constructor New-expression Class as a type null

4 CS100J 09 September 2003 Answers to previous. A type is a set of values together with operations on them. A variable is a name with associated value or A variable is a named box, with a value in the box

5 CS100J 09 September 2003 These answers are WRONG type is the type of a variable that it is, e.g. int, double. Each type is different and good for certain purposes. Tells computer how variable is stored. Variable: something that is stored in the computers memory. It can be changed. e.g. int x= 5. x is a variable.

6 CS100J 09 September 2003 These answers are WRONG type is the type of a data ?, such as float or int, and it carries different amounts of info. Variable: a value stored in the computer that can be changed.

7 CS100J 09 September 2003 These answers are WRONG type The kind or form of a variable. For example, “Hello” is a String and 5.0 is type double. Variable: Something (usually a letter or word) that holds information or provides access to an internal name the computer gives to an object.

8 CS100J Reading for this lecture: Section 1.5 and 1.6. Read all the “style notes”, too. Summary of lectures: On course home page, click on “Handouts” and then “Outline of lectures held so far”. Today: Add a field to a class definition. Introduce the value null.

9 A class is a file-drawer. Contents: manila folders. Bill Patient name “B. Clinton” address “New York” owes $250.00 getName() deposit(double d) (1)unique name on tab of manila folder. (2)manila folder, instance, object of the class (3)fields (they are variables) (4)methods (procedures and functions): instructions to do tasks

10 /** description of what the class is for */ public class subclass-name extends superclass-name { declarations of methods } a0 super-class-name subclass-name methods and fields inherited from superclass-name methods and fields declared in subclass-name folder belongs in file drawer for class subclass-name


Download ppt "CS100J 11 September 2003 Course Management System for CS100J is now populated with students who were pre-registered. Look at course web page to see how."

Similar presentations


Ads by Google