Difference between revisions of "User-Defined Methods"

From CompSciWiki
Jump to: navigation, search
(Removed Solutions section.)
 
(10 intermediate revisions by 5 users not shown)
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
 +
|Picture=Wiki_method02.jpg
 +
|Introduction=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 difficult to understand. [[Calling_Methods|Chapter 3: Calling Methods]] briefly described how to call a method to make your work easier. This chapter will explain how to create your own methods to perform tasks in a well organized and structured manner.
  
===[[Overview]]===
+
|Body=
===[[Writing a Method]]===
+
==[[Overview]]==
===[[Calling a User-Defined Method]]===
+
==[[Writing a Method]]==
===[[Methods and Scoping]]===
+
==[[Calling a User-Defined Method]]==
===[[Commenting Methods]]===
+
==[[Methods and Scoping]]==
===[[Passing Arguments using Methods]]===
+
==[[Commenting Methods]]==
===[[Review Questions and Exercises]]===
+
==[[Passing Arguments using Methods]]==
 +
==[[User Defined Methods Review Questions and Exercises|Review Questions and Exercises]]==
 +
 
 +
 
 +
|PChapterNum=5
 +
|PChapterLink=[[Loops]]
 +
|NChapterNum=7
 +
|NChapterLink=[[Arrays]]
 +
}}
 +
 
 +
 
 +
{{Category:COMP 1010}}

Latest revision as of 13:42, 8 December 2011


Wiki 1010 Table of Contents

Wiki method02.jpg

Chapter 6

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 difficult to understand. Chapter 3: Calling Methods briefly described how to call a method to make your work easier. This chapter will explain how to create your own methods to perform tasks in a well organized and structured manner.

  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




Chapter 5: Loops Table of Contents Chapter 7: Arrays



Template loop detected: