Software Engineering

Software Engineering - Recursion Advantage short elegant...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Software Engineering Problem: Algorithm Data (Ways to store it) Life Cycle : Specification : most crucial part of program design because you have to identify the problem accurately. Testing : FIND ERRORS Abstraction (focus on WHAT you want something to do) -Data -Functional ADT (combination of data and the function that operate against that data) We define it in a class: give user functionality , don’t mess with my data. Info Hiding: with public and private member: only class has access to private member.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Recursion Advantage: short, elegant, concise solution. Disadvantage: can’t call it recursively in every language, only the ones that have dynamic allocation possibilities. Slow run of the code. RTS holds :-Parameters-Local variables (exist as long as the function lasts)-Stack Recursive Algorithm :-Base Case OR Anchor Point: point where the recursion will stop.-Function calls itself RTS Overflow : recursion code calls crash Dynamic memory is obtained from de HEAP....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online