On this page:
Overview
Setup
Tasks
Before Submitting
Submitting

Homework 4🔗

Last updated: Tue, 4 Mar 2025 08:50:50 -0500

Out: Tue Feb 25 2025, 11am EST

Due: Tue Mar 04 2025, 11am EST

Overview🔗

In this assignment, you will continue to practice programming using The Design Recipe, a systematic way to write programs that are both correct and readable.

This hw will be graded accordingly:

  • correctness (autograder) (8 pts)

  • design recipe (14 pts)

  • testing (16 pts)

  • style (6 pts)

  • README (1 pt)

Total: 45 points

Setup🔗

Create a new repository for this assignment by going to the CS450 Spring 2025 GitHub Organization and clicking "New".

Note: The CS450 Spring 2025 GitHub Organization must be the owner of the repository. Do not create the repository in your own account.

On the "Create a new repository" screen:
  • Name the repository hw<X>-<LASTNAME>-<FIRSTNAME> where <X> is the current homework number.

    For example, I would name my hw4 repository hw4-Chang-Stephen.

  • Mark the repository as Private.

  • Check "Add a README file".

  • Select the Racket template for the .gitignore.

  • Choose whatever you wish for the license.

When done click "Create repository".

Tasks🔗

In this assignment we will implement a big-bang program similar to Homework 3, except with the added ability to rotate the block. (Note that a solution to hw3 is not needed to complete this assignment. In fact, since this assignment requires new data definitions, it is recommended that all students start from scratch, even those who completed hw3. Trying to "adapt" a previous solution will be the more error-prone path, so do so at your own risk.)

Here is an online demo that approximates the behavior of the program.

Reading

Pre-programming Notes

Programming

Before Submitting🔗

Testing (and Autograders)

Before submitting, note:
  • Do not submit until all code has been thoroughly tested (by you), which means writing a "sufficient" number of Test cases.

  • A GradeScope "Autograder" may or may not be released before the due date but either way, an Autograder is not a software development/testing tool, so do not use it as one. Code must be tested independent of any Autograder and questions about Autograders will be ignored (e.g., posts asking "why is the Autograder giving an error?" are not allowed)

  • If you do submit before the deadline and get an Autograder error, this is bonus information that indicates the submitted code is not complete and/or not correct. But it’s up to you to figure out what "correct" means and how to fix to the program.

  • Of course, the course staff is here and eager to help, but cannot do so without context information. The best way to supply this information is to INCLUDE EXAMPLES WITH ALL QUESTIONS, along with what the "expected" result should be! The posted examples should be the minimal amount of code needed to communicate the problem. This will receive the clearest possible answer.

  • The Autograder test suite is subject to change. This means that the visible grade seen during submission is not the final grade.

Style

All code should follow proper Racket Style.

Also, the repository itself must follow proper style. Specifically, it must have appropriate commit messages. See How to Write a Git Commit Message if you are unsure how to write a commit message.

Files

A submission must have the following files in the repository root:

  • hw4.rkt: Contains the hw solution code.

    All defines should use the name specified in the exercise (ask if you are unsure) and should be provided.

    The easiest (but not always the most readable) way to ensure all necessary definitions are provided is to (initially) put as the second line in the file:

    (provide (all-defined-out))

    This automatically provides all definitions in the file (the first line should be #lang racket).

  • tests.rkt: This file should require hw4.rkt and define tests for it.

    Specifically, it should define a rackunit test-suite named TESTS which contains "sufficient" rackunit Test cases (e.g., check-equal?, etc.) for each defined function.

  • README.md: Contains the required README information, including the GitHub repo url.

Submitting🔗

When you are done, submit your work to Gradescope hw4. You must use the "GitHub" Submission Method and select your hw<X>-<LASTNAME>-<FIRSTNAME> repository.

Note that this is the only acceptable way to submit homework in this course. (Do not manually upload files and do not email files to the course staff. Homework submitted via any unapproved methods will not be graded.)