CS123 S12 Lab4

From CourseWiki
Revision as of 20:19, 1 March 2012 by Dturnbull (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Back to Schedule

CS 123 - Lab 4 - Functions

Due: Before class on Wednesday, March 10th at 9:24am

  • Exercises 6.2, 6.7, 6.9, & 6.15
  • Draw the stack trace for the following program with this function:
function [ res ] = stringDouble( myStr )
   res = [myStr,myStr];

and when this script is executed:

str = 'Xyz';
out1 = stringDouble(str);
out2 = stringDouble(out1);
display(out2)

To check that you are correct, try running this program AFTER you drawn the stack trace.


Notes:

  1. All the files for an assignment must be saved in a folder of the form Lab04-USERNAME within your cs123/lab/ directory. For example, if your Ithaca username is jsmith1, you must place all related documents, m-files, text files, etc, in the folder cs123/lab/lab04-jsmith.
  2. When you are done, you must create a zip file called lab04-USERNAME.zip and email it to me (dturnbull@ithaca.edu) as an attachement before the Thursday morning deadline. Please use the subject line: "CS123 Lab04 USERNAME"
  3. You also have to bring a printed report that splices together your answers, code, and plots. Please keep this focused and short. This is due at the beginning of class on Thursday.
  4. Your labs will be graded on correctness, design and form (i.e., comments, indentation, clear plots with good labels, etc.)
  5. Labs that are between 1-minute and 1-day late will be graded at 90%. Labs that are more than 1-day late will be graded at 80%.
Personal tools