Unit 1 Assignment: Recursion Outcomes addressed in this activity: Unit Outcomes:

WRITE MY ESSAY

Unit 1 Assignment: Recursion
Outcomes addressed in this activity:
Unit Outcomes:

Unit 1 Assignment: Recursion
Outcomes addressed in this activity:
Unit Outcomes:
Analyze recursion as a problem-solving procedure.
Apply problem-solving procedures to solve data structure and algorithm problems.
Course Outcome:
IT391-1: Apply the common linear structures of lists, stacks, and queues.
Purpose
The purpose of the assignment in this unit is to study and practice implementing recursion to solve problems of a repetitious nature.
Assignment Instructions
This assignment has two sections that will be written as two sections of the same program. In Section 1, the student is provided example code. The student will take the example code, into a program in the IDE corresponding to the language path they have chosen, execute the code successfully, and produce the correct output.
For Section 2, the student will write the code without the aid of a supplied example code. Unlike previous assignments, both sections of assignment 1 will be placed in a single program.
The beginning of each section will be delineated with the following comment block. Be sure to insert the correct values for the section number.
//*********************************************************
//****Assignment #, Section #
//*********************************************************
Assignment Sections Detailed
Section 1:
1. Add your section comment to the code.
2. Print a blank line.
3. Print “********** Section 1 **********”.
4. Print a blank line.
5. Create a method called Fibonacci which will recursively calculate the Fibonacci sequence for the number passed to it.
6. Call the Fibonacci method and pass it the value 10.
Section 2:
1. Add your section comment to the code.
2. Print “********** Section 2 **********”
3. Print a blank line.
4. Create a method called factorial which will recursively calculate the factorial of an integer value passed to it.
5. Create a for loop to use the factorial method to find and print the factorials of every number from 1 to 4.
6. When printing the factorial values, print them showing the number and its factorial. For example, the factorial of 4 would be printed as 4! = 24
Directions for Saving and Submitting Your Assignments
Submit the source code file for the language path of your choosing as well as a Word® document containing screenshots of the entire output produced by the program.
Name your assignment documents according to the file naming conventions below. (Use your own last name, of course.) Submit your completed assignments to the Unit 1 Dropbox by the deadline.
The code files should be saved as: IT391_YourLastName_Unit1 (.java, .cs, .php, or .js, respectively).
The Word documents should be saved as: IT391_YourLastName_Unit1_Screenshots.
The zip file should be saved as: IT391_YourLastName_Unit1.ZIP. Submit one zipped file to the Unit 1 Dropbox.

WRITE MY ESSAY

admin Avatar

Leave a Reply

Your email address will not be published. Required fields are marked *