{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lab_004

# lab_004 - Homework Assignment 5 A medley of recursive...

This preview shows pages 1–2. Sign up to view the full content.

Homework Assignment 5 A medley of recursive methods Overview This lab assignment will introduce you to thinking recursively. You will implement four short recursive methods. You are allowed to use iterative structures (for loops, while loops, etc), but the purpose of this lab is recursive thinking, and your solutions must exemplify this. You may work with a partner, if you choose to, for this lab (see the note at the bottom of this page). Objectives Practice using recursive thinking to solve seemingly complex problems; Practice writing and working with recursive methods; Practice developing algorithms to solve specific problems; Practice working in small teams to solve problems, design algorithms and write code Pho-new-words (Phone Words) Take out your cell phone right now (or look at the picture below). Next to each number key (except for the 1 key), there are three or four letters. Each digit can be thought of as one of its corresponding letters. Given a (10 digit) phone number, we want to generate all possible words that this phone number can be interpreted as (we don't care if they aren't English words). For example, the phone number "7466396737" can be read as "phonewords" (check this out for yourself). Actually, we want to be able to generate all corresponding words for a phone number of any length. So, "228" can be read as "cat" and "bat", as well as many other words.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern