Modifying an existing program to create a new one – Casio CLASSPAD 330 3.04 User Manual

Page 647

Advertising
background image

20060301

Modifying an Existing Program to Create a New One

You can use the procedure described below to recall an existing program, modify it, and then
run the result as a new program. This helps reduce key input requirements.
The following shows how to modify the “OCTA” program we created on page 12-2-1 to
handle tetrahedrons.

Example: To create a program named “TETRA” that calculates the surface areas (cm

2

) and

volumes (cm

3

) of three regular tetrahedrons, the lengths of whose sides are 7, 10,

and 15 cm

The following formulas calculate the surface area S and volume V of a
regular tetrahedron for which the length of one side A is known.

The following is the program required for this example.

Length of One Side A ..........Input A

Surface Area S ....................Print approx(

(3)

s A^2)

Volume V ............................Print approx(

(2)

w 12 s A^3)

The following is the “OCTA” program (page 12-2-1).

Length of One Side A ..........Input A

Surface Area S ....................Print approx(2

s

(3)

s A^2)

Volume V ............................Print approx(

(2)

w 3 s A^3)

A comparison of the two programs indicates that the following modifications of the “OCTA”
program will produce a program that performs the calculations required by this example.

• Delete “2

s” (underlined with a wavy line above).

• Change 3 to 12 (underlined with double lines above).

S ClassPad Operation

(1) On the application menu, tap

1.

(2)

Tap

}, or tap [Edit] and then [Open File].

12-3-2

Debugging a Program

S = 3 A

2

, V

=

2

12

A

3

A

Advertising