The
WorkTogether
procedure calls all the procedures needed to make ev -
erything hap pen. When I took my first computer course,
the instructor told us to
think about what we wanted our pro gram to do and write a top-level pro cedure to
call other procedures to do it. Then, he sug gested that you have fi nished something
important and you should go have a beer. That is what the
WorkTogether
pro -
cedure does. Go have a beer (if
you are of le gal drinking age, not driv ing, not
pregnant, etc.)! This pro cedure does all of the fol lowing:
• It asks the user to in put a name, e-mail address,
and pro ject idea
(
GetNameEmailIdea
).
• It jumps to the tenth slide thanking the user for wanting to work with
you (
GoToWorkTogether
).
• It cre ates a new slide that contains the name, e-mail, address, and
project idea (
AddWorkTogetherSlide
),
• It saves the presentation so the newly
added slide be comes part of
the pre sen ta tion (
Save
),
The pro ce dures
YourIdea_are_all_variations_of_the_YourName'>YourName
,
YourEmail
, and
YourIdea
are all variations
of the
YourName
pro cedure from earlier chap ters.
Al though any version of
YourName
will work,
YourName
and
YourEmail
use a ver sion that forces the
user to type something. Because giv ing a pro ject idea is op tional,
YourIdea
uses a version that does not re quire the user to type any thing. The name,
e-mail
address, and project idea are stored in the variables
userName
,
userEmail
, and
userIdea
re spectively. At the appropriate time, all
three of these procedures
are called in succession by the
Do'stlaringiz bilan baham: