19.12.2012 Views

Computer Programming Concepts and Visual Basic David I. Schneider

Computer Programming Concepts and Visual Basic David I. Schneider

Computer Programming Concepts and Visual Basic David I. Schneider

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

260 <strong>Computer</strong> <strong>Programming</strong> <strong>Concepts</strong> <strong>and</strong> <strong>Visual</strong> <strong>Basic</strong><br />

<strong>and</strong> (3) place text at appropriate points on the chart. The basic tools for accomplishing each<br />

of these steps follow.<br />

■ SPECIFYING A COORDINATE SYSTEM<br />

Suppose we have a piece of paper, a pencil, <strong>and</strong> a ruler <strong>and</strong> we want to graph a line extending<br />

from (2, 40) to (5, 60). We would most likely use the following three-step procedure:<br />

1. Use the ruler to draw an x axis <strong>and</strong> a y axis.<br />

Focus on the first quadrant because both<br />

points are in that quadrant.<br />

2. Select scales for the two axes. For instance,<br />

we might decide that the numbers on the x axis<br />

range from –1 to 6 <strong>and</strong> that the numbers on the<br />

y axis range from –10 to 80.<br />

3. Plot the two points <strong>and</strong> use the ruler to draw<br />

the straight-line segment joining them.<br />

EXAMPLE 1<br />

(a) Draw a coordinate system with the numbers on the x axis ranging from –2 to 10, <strong>and</strong> the numbers<br />

on the y axis ranging from –3 to 18.<br />

(b) Draw the straight line from (1, 15) to (8, 6).<br />

(c) Draw the straight line from (–2, 0) to (10, 0).<br />

SOLUTION:<br />

(a) (b)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!