This course has been about "programming in the small". We have had lots of exercises in which you write one or a few short procedures using a particular programming technique or facility. In this final project you have a chance to build your own program. Your program should involve at least two levels of functions and probably several levels. By levels I mean this: Level 1 functions use only scheme build-in functions. Level 2 functions also use some Level 1 functions. Level 3 functions use at least one level 2 function along with level 1 and built-in functions, ... Choose your supporting functions carefully. Name them well and include a comment before each one stating its specification: what it assumes of the input arguments and what it promises about the result.
Submit code and sample runs showing input and output. Write an explanation of the system. Think of the writup as writing a brief manual for the system. You are writing to a person who knows scheme but knows nothing about the project. You are making it easy for that person to load and use your project. It is entirely appropriate to include the sample runs as examples in the writeup.
The due date is Wed, May 15, to allow lab on May 13 to be used to work on the project getting help from Ray as needed. The deadline is firm. Submissions turned in on May 16 will be accepted with 20% penalty. No submissions are accepted after that. This is not an electronic submission. Submit paper to Ray.
Choose a topic:
Design painters for some characters. You don't have to make a complete alphabet. Design a procedure which takes a string of characters and makes a painter to display the string. Thus ((text-painter "I can't do that, Dave") view) would display the text, each character written by your painter for the character. Fixed width characters or variable width is acceptable. In either case the size of the text should be scaled to the frame as is normal with painters. You may find the scheme function string->list useful. It would be a good idea to build characters from a suite of painters that paint particular "strokes" of characters. For instance "P" might be made of two strokes. Build "B" and "R" by adding strokes to "P".
Variant: Simulate a 7 segment display. In a 7 segment display, every character is made by showing a subset of 7 components, roughly thus:
_____ <_____> ^ ^ | | | | | | | | V_____ V <_____> ^ ^ | | | | | | | | V_____ V <_____>
Design a painter that is built from an expression. It draws the box and arrow representation of the expression. You can assume the expression is a proper tree, which means that it is either not a pair or is a pair whose car and cdr are distinct proper trees. Thus you can assume no loop structures or shared substructures. It would be an extensive project to figure out a way to display every atom (non pair) in an appropriate way For simplicity here you could display all atoms with the same image. Thus (list (cons 1 2) 3) might display as
_____ _____ |.|-|-->|*|/| -|--- ----- | _V___ |*|*| -----.It would be desirable to display all boxes the same size but scaled appropriately to the frame. Thus you might have a function that does a preliminary analysis of the expression. If it is determined that the given expression should involve boxes in three rows and 5 columns then each box could be made occupy (a set part of) a portion of the frame that is 1/3 the height and 1/5 the width.
Extend the ticket seller exercise so that tickets are being sold in blocks of adjacent seats in a row. Tickets are being sold for 10 rows.
Do exercise 3.71. For this one, your code and results suffice. No additional writeup is required.
Design a project of your own choosing. Write up a brief description of the proposed project (one or two paragraphs) and get it approved by Saunders. Include the proposal statement with the project submission.