Difference between revisions of "User-Defined Methods"

From CompSciWiki
Jump to: navigation, search
Line 1: Line 1:
{{1010Chapter|Introduction=Up until now, all of the code you have written has been placed in the main method. As programs get larger and more complex, code written entirely in the main method becomes unmaintainable and unreadable. [[Calling_Methods|Chapter 4: Calling Methods]] briefly described how to call a method to make our work easier. This chapter will explain how to create your own methods to perform your own tasks.}}
+
{{1010Chapter|ChapterNum=6
 +
|Introduction=Up until now, all of the code you have written has been placed in the main method. As programs get larger and more complex, code written entirely in the main method becomes unmaintainable and unreadable. [[Calling_Methods|Chapter 4: Calling Methods]] briefly described how to call a method to make our work easier. This chapter will explain how to create your own methods to perform your own tasks.
  
 +
|Body=
 
==[[Overview]]==
 
==[[Overview]]==
 
==[[Writing a Method]]==
 
==[[Writing a Method]]==
Line 9: Line 11:
 
==[[User Defined Methods Review Questions and Exercises|Review Questions and Exercises]]==
 
==[[User Defined Methods Review Questions and Exercises|Review Questions and Exercises]]==
 
==[[User Defined Methods Solutions|Solutions]]==
 
==[[User Defined Methods Solutions|Solutions]]==
 +
 +
 +
|PChapterNum=5
 +
|PChapterLink=[[Loops]]
 +
|NChapterNum=7
 +
|NChapterLink=[[Arrays]]
 +
}}
 +
 +
 +
{{Category:COMP 1010}}

Revision as of 16:06, 10 August 2010


Wiki 1010 Table of Contents

Chapter 6

Up until now, all of the code you have written has been placed in the main method. As programs get larger and more complex, code written entirely in the main method becomes unmaintainable and unreadable. Chapter 4: Calling Methods briefly described how to call a method to make our work easier. This chapter will explain how to create your own methods to perform your own tasks.

  Write a Program a Day Case Studies

Overview

Writing a Method

Calling a User-Defined Method

Methods and Scoping

Commenting Methods

Passing Arguments using Methods

Review Questions and Exercises

Solutions




Chapter 5: Loops Table of Contents Chapter 7: Arrays



Template loop detected: