Assignment 4: Style and design
Due: Friday, September 22, 11:59:59 PM EST.
The following should be completed in cooperation with your assigned partner from lab 1. (Partner assignments are listed on Piazza.)
This is the second assignment where you must use the design recipe and The Style guidelines to receive full credit. We will grade these aspect much more severely from now on.
1 Preparation
Make sure you have read and studied all of Part I of HtDP2e.
2 Graphical text editor
Create a file editor.rkt for this part of the assignment. Use the standard file header at the top of the file.
Complete exercises 83–87 from HtDP2e.
3 Chip the Cheap Sheep Cashes Out
Create a file chip.rkt for this part of the assignment. Use the standard file header at the top of the file. Complete the design of the Chip program September 15, 2017.
Create a file chips.rkt and use the standard file header. Design a variant of the Chip program that has two sheep that start off on opposite sides of the screen and run toward eachother. When their heads butt, they should “bounce” off running the other direction. The left sheep (notice that the sheep can never pass each other) should be controlled with the "a" and "d" keys for changing direction toward the left and right, respectively. The right sheep is controlled with the left and right arrow keys as before.
Here’s a little animation of a sample running of this program:
(You do not need to add the “POW!” functionality, but may if you have the time.)
It should go without saying that this program should be designed using the design recipe and style guidelines. In particular make sure you use defined constants so that parameters of the program can be changed without breaking anything.
4 Revising the calendar program
Create a file calendar-revised.rkt for this part of the assignment. Use the standard file header at the top of the file.
Revise your calendar program from Assignment 3: Designing and composing functions to address all comments from the grader and make any improvements you think appropriate.
Make sure your program follows the design recipe for all functions.
Make sure your program follows the style guidelines.
Should have no lines longer than 80 columns.
Should have no text move if you do Ctl+A (select all) and hit tab (this is using auto-indent to check that you’re following the usual indentation conventions).
Should follow the standard file header outlined in the style guidelines.
Should use the names of functions given to you in the problem description. You will receive no points for any function that has a different name than what is specified.
Additionally, make explicit template definitions for the following data definitions: Month, MonthFormat, DateOrder, and DaysInYear.
There are a list of common problems in the class notes for September 18, 2017.
5 Project submission
You should submit all files: editor.rkt, chip.rkt, chips.rkt, and calendar-revised.rkt.
Submit your files directly to the submit server by uploading them. Select each of these files individually using the “Browse” button. Once you have selected all the files, press the “Submit project!” button. You do not need to put them in a zip file.