bg287

csc110

Posted in csc110 by bnmng on 2010 04/01

Homework, (paper handed out) due Thursday, April 15t.

Test 3 covers chapters 5 and six of both textbooks. Sample test handed out. Test 3 is Tuesday April 6th. Lab Thursday April 18th.
Bronson: two on Chapter 5
Brookshear Three on 6.3 Brookshear and 6.3 Bronson.

Not introducing new material today. Just looking at the program.

Today: Look a t program 3 and sample test 3.

If yo missed turning in your program, or have errors to correct, you can resubmit with a 15 point late fee.

Programming functions:

Skip the temptation to start programming without functions and then try to put your code into functions later.

Example: A program with a sentinel loop.
The proper structure for a sentinel loop is : primary read, test, read data.

getData ( principle, years, rate).

Casting. You can use casting

Initializing the control

Parameters in calling statements, headers, and prototypes must agree in type, number, and order.

Alias. (I’ll write about Alias later, but it’s pretty much the same as reference

Three things for functions: Prototype, Call, Definition. For references, the ampersand appears in the prototype and definition, Not in the call.

Actual parameters appear in the call. Formal parameters are in the heading.

The function call is in the main.

The function body is between the curly braces in the definition.

The prototype is above the main.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: