DATAOOD

DATAOOD - Fall 2005 1 Tri Le Data Structure and OO Design...

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

View Full Document Right Arrow Icon
Fall 2005 1 Tri Le Data Structure and OO Design Notes DATA STRUCTURE AND OBJECT ORIENTED DESIGN General Programming Knowledge Layout of memory: Text: - where your program resides while it is executing. - function/ methods definitions, condition statements, loops, constant strings. Data: - stores global memory, static variable. - when program loads into memory. - goes away when program ends. - 0 initialized. Stack: - local variables, parameters, return results. - return addresses, old registers. - created when functions are called. - go away when functions end. - uninitialized, initialized with contents from the last used space. Heap: - dynamic memory. - C: malloc – free. - C++: “new” – delete. - Java: “new” – garbage collector. Compiler: Translates a programming language to another. - Lexical error - Parse error _ Syntax error - Semantic error 2 sections of a method: 1. Validity check. 2. Logic: real reason for the function to exists. Recursion: + a function calls itself + when to use: a problem that can be solve through a repetition when the problem simplifies with each iteration of the repetition: choice is “loop” or “recursion”
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/07/2008 for the course CSE 12 taught by Professor Gary during the Spring '08 term at UCSD.

Page1 / 3

DATAOOD - Fall 2005 1 Tri Le Data Structure and OO Design...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online