Lab 7 - Spring 2019

Designing Functions

The main purpose of this lab is to practice

  • using the Design Recipe to write functions for intertwined data
  • we will use the Files and Directories example of intertwined data from yesterday

How to get started

  1. Use your CS account to login to one of the Linux workstations in the classroom.

  2. Open a browser and copy/paste this URL: https://classroom.github.com/a/ZJ1SsIuh

  3. Login to Github and you will be prompted to accept this assignment
    1. Note: this will create your own copy of Lab 7 for you to work on, but it's not on your Linux account yet

  4. Open a terminal window.

  5. Create a new directory for this lab in your cs101 directory by entering the following at the Linux prompt:

    cd cs101
    mkdir lab7
    cd lab7

  6. Type the following commands to pull down a copy of this lab from GitHub:
    $ git init
    $ git remote add origin https://github.com/Vassar-cs101-mlsmith-spr2019/lab-7-yourGitHubID
    $ git pull origin master

Design intertwined functions

  1. Launch DrRacket and open your lab7.rkt file

  2. Fill in your name where <YOUR NAME> appears in the comments at the top of the program.

  3. Develop the four (4) versions of empty-file?.
    • one version for each intertwined data definition
    • follow the steps of the Design Recipe for each function.
    • be sure your solution for each exercise includes all appropriate grading artifacts.

  4. When your program successfully runs, show it to me or one of our coaches and follow the procedure below to commit and push it back to GitHub.

Submitting your work

From a terminal window, type the following commands at the Linux prompt:

$ git commit -m "finished lab7" lab7.rkt
$ git push -u origin master



Log out

When you are done, close DrRacket and log out. Always remember to log out when you are done using the system, to ensure that no one else uses your account.