User Tools

Site Tools


at-m42:labs:lab1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
at-m42:labs:lab1 [2009/04/28 09:51] eechrisat-m42:labs:lab1 [2011/01/14 12:59] (current) – external edit 127.0.0.1
Line 182: Line 182:
 ===== Part 3: Simple IO and Case Study I ===== ===== Part 3: Simple IO and Case Study I =====
  
-These exercises support [[at-m42:lecture3|Lecture 4 Simple IO and Case Study]]. +These exercises support [[at-m42:lecture4|Lecture 4 Simple IO and Case Study]]. 
  
 ==== Exercise 3.1 ==== ==== Exercise 3.1 ====
Line 235: Line 235:
 <code groovy> <code groovy>
 gcd(n, m) = n              if n == m gcd(n, m) = n              if n == m
-gcd(n, m) = gcd(n, n - m)  if n < m+gcd(n, m) = gcd(n, m - n)  if n < m
 gcd(n, m) = gcd(n - m, m)  otherwise gcd(n, m) = gcd(n - m, m)  otherwise
 </code> </code>
Line 262: Line 262:
  
 ===== Part 6: Closures ===== ===== Part 6: Closures =====
 +
 +These exercises support the first part of [[at-m42:lecture6#closures|Lecture 6]]. 
  
 ==== Exercise 6.1 ==== ==== Exercise 6.1 ====
Line 267: Line 269:
 A software house is contracted to develop Groovy, Java and C# projects. Each project has one or more programmers involved, with perhaps the same individual associated with more than one project. For example, the following shows Chris, Renate and Paul involved with the Groovy project: A software house is contracted to develop Groovy, Java and C# projects. Each project has one or more programmers involved, with perhaps the same individual associated with more than one project. For example, the following shows Chris, Renate and Paul involved with the Groovy project:
 <code groovy> <code groovy>
-def softwareHouse = ['Goovy' : ['Chris', 'Renate', 'Paul'],+def softwareHouse = ['Groovy' : ['Chris', 'Renate', 'Paul'],
                      'Java' : ['Chris', 'Paul'],                      'Java' : ['Chris', 'Paul'],
                      'C#' ; ['Javier']                      'C#' ; ['Javier']
Line 287: Line 289:
  
 ===== Part 7: Files ===== ===== Part 7: Files =====
 +
 +These exercises support the second part of [[at-m42:lecture6#files|Lecture 6]]. 
  
 ==== Exercise 7.1 ==== ==== Exercise 7.1 ====
at-m42/labs/lab1.1240912268.txt.gz · Last modified: 2011/01/14 12:48 (external edit)