ITEC 320 - Procedural Analysis and Design - Spring 2010



Weekly Notes Topics Reading Assignments
Week 1 1.1-1.3, 2.1 (History and goals); 5.5 (Comments); 4.2 (Text_io); 6.1, 6.5 (Numeric types) P1 is ready
Week 2
  • A whirlwind tour of Ada - Part 2 - Types
    • Numeric types and literals, strong typing, Type attributes
    • numeric output, operators
    • What is a type?
    • Subtypes, enumerated types
    • numeric Input, procedures
    • String and numeric output, types, literals, operations, attributes

  • A whirlwind tour of Ada - Part 3
    • Structured statements
    • Numeric input
    • Procedures, parameter modes, scope, global, exceptions
    • Scope, global
    • Exceptions

  • Let's write a program in groups: Read a low and a high value to define a range, and then read a sequence of numbers, until eof, and count the number of numbers below, in, and above the range. Calculate the percent in each group. Assume the endpoints of the range are in the range. Output, nicely formatted, the counts and percents.
    Here's a solution (and prettified)

  • Some examples from last semester:
    • sumto10.adb: sum the ints from 1 to 10
    • sumtoeof.adb: sum all the integers in a file of integers
    • echochars.adb: print the characters in a file
    • echocharsnl.adb: print the characters in a file, with newlines

    • echocols.adb: print up to 5 columns of each line
    • countvowels.adb: print the vowels in the input
    • Exceptions - Let's do some exception handling
    • Redirection: < for redirecting Standard Input, > for Standard Output

  • Notes from last year:
Same as last week P1 is ready!
P2 ready too!
Week 3 As last week
+ Procs: Chap. 9
+ Exceps: 2.6, Chap 14
+ Arrays: 8.1-6, 2.4
P2 is here.
Start NOW!
Week 4 Notes from last year: Procs: Chap 9
  • P2 is here
  • P3 will be available soon.
  • Week 5 Procs: chapter 9
  • Exam Monday 2/23/09
  • P3 is here
  • Week 6
    • Exam Postponed:

    • Records - Introduction
      • Class exercise: Write a program that creates a list of lines that are input.
        • A list is an array with a maximum and current length.
        • A line is defined by two points.
        • A points is defined by 2 integers
        • A partial solution: linelistpart.adb
        • An almost complete solution: linelist.adb

    • Notes from last year on arrays:
      • Example 1: Get and print 10 ints in reverse: print10.adb and prettified
      • Example 2: Print n ints in reverse: printn.adb and prettified
      • Example 3: Print n ints in reverse, with procedures (ie get, put): printnprocs.adb and prettified

      • Example 3: Print n strings in reverse, with procedures (type String is an Array of Characters): printnstrings.adb and prettified

      • Example 4: Strings are arrays of characters somestrings.adb and prettified

      • Example 5: Strings are UNCONSTRAINED arrays of characters mystrings.adb and prettified

      • Let's do printnprocs with unconstrained
      • Notes on Arrays

      • Group project - create an array that is the sum of two parallel arrays: Finish This!
      • Group project - print list of unique words:
      • Group Project:
        • Input: Sequence of lines of 80 or fewer characters each
        • Output: Frequency of each letter
        • Output: Frequency of each letter and of blanks and certain punctuation
        • Punctuation to count: '.', ',', '!',
        • Frequency count should be case insensitive
        • Output format: Only output non-zero frequencies
      • Ada Pair record and client vs Java Class Pair and client


    Procs: chapter 9
    P3 is here (updated for Fall 09)
    Week 7
    • Exam

    • Notes on look_ahead
    • More on records
      • Review last week's group problem

      • Class Project:
        • Input: list of words, one word per line, each word is shorter than 80 characters
        • Output: Print list of unique words and their frequecies
        • Constraint: main is
        •         l: WhatTypeIsThis;
              begin 
                  getWords(l);
                  putWordsAndFreqs(l);
              end words;
                              
        • Constraint: fixed length strings
          • Use get_line(w, len) to input each string
          • Example using getline:
          •     declare
                    w: String(1..80);
                    len: Natural;
                begin
                    loop
                        get_line(w, len);
                        exit when len = 0;
                        put_line(w(1..len));
                    end loop;
                end;
                                    
        • First step: Design types (draw pictures)
        • Second step: Read and write all words, ignoring test for uniqueness
    Arrays: 8.1-6, 2.4; P3 is here (Due 11:59 p.m., Tue 10/20/09)
    Week 8 Records: 8.7, 2.4 Packages: 3.1 & Ch. 11 P4 is here
    Week 9 Packages: 3.1 & Ch. 11 Program 4
    Week 10 Packages: 3.1 & Ch. 11 Program 4 due Thurs 11/05/09
    Week 11 Packages: 3.1 & Ch. 11
    Program 5
    Week 12 LookAhead; Variant Records; Limited Private; Generics: 3.4 & Ch. 17
    Pointers:
     Chapter 10
     Section 2.5
    Exam Mon. NEXT week Program 5
    Program 6
    Week 13
    • Thanksgiving Week!
      Program 5
    Program 6
    (Suggestion: finish Program 5 and start Program 6 ASAP)
    Week 14   Program 5

    OPTIONAL Program 6 is available!
    Week 15  
  • Program 5 (Due Tues, 12/8, midnight - No late programs accepted after Thurs, 12/10, midnight)

  • Program 6 (Due Sat, 12/12, midnight - No late programs accepted)
  • Week 16 Comprehensive Final Exam:
       12:30 p.m. - 2:30 p.m., Tuesday, May 4, 2010
       8:00 a.m. - 10:00 a.m., Tuesday, May 5, 2010
      Comprehensive
    Final Exam
    Notes for entire semester


    --
    Dr. Okie's Home Page
    Last modified on Tuesday, 09-Feb-2010 13:56:16 EST