CS 5010: Problem Set 01
Out: Monday, 16 January 2017
Due: Monday, 23 January 2017 at 6pm
This is an individual assignment. You are not allowed to discuss this problem set with any other person. You are also not allowed to search for or to view any solutions to similar problems that may be available on the World-Wide Web or in other resources that might otherwise have been available to you.
The main purpose of this problem set is to give you some practice with the systems we will use in CS 5010.
In particular, you need to know how to commit your solution and how to push your commits to the course's GitHub site. To submit your solution, follow our instructions on How to Submit Your Homework, and be sure to include the required deliverables.
We will check to see whether your have submitted a solution for this problem set and whether it contains the required deliverables, but this problem set will not otherwise be graded.
You must use Racket's HtDP Beginning Student Language for this problem set.
You should begin your work on this problem set by using
git
to clone your GitHub repository from the
CS 5010 GitHub site.
The name of your GitHub repository is
pdp-
YOURNAME, where YOURNAME
is your CCIS ID.
Your repository will probably be empty when you clone it.
Within your cloned repository, you should create a new
directory named set01
.
All of the code you write for this problem set will go into
that directory.
You will also need to download a copy of
extras.rkt
and put it in your set01
directory along with
the q1.rkt
through q5.rkt
files
you will write for this problem set.
Each of those files must import that library by including
the lines
(require rackunit) (require "extras.rkt")
near the top of the file, preceded only by your comments describing the file.
Immediately following those require
declarations,
your file should state a provide
declaration for
each deliverable function. For example, your q1.rkt
file should say
(provide cvolume) (provide csurface)
Those provide
declarations allow our testing
infrastructure to require
your file and check
to see whether you've provided all of the deliverable functions.
Remember to follow the design recipe. Your deliverables include the data definitions you need (including interpretations and templates), contracts, purpose statements, examples and tests, and design strategies in addition to your function definitions.
Remember to fill out a
work session report
at the end of each
work session. Tell git
to add
it to
the files you will commit, and then commit and push that report
in addition to committing and pushing your entire
set01
directory. Do this at the end of every work
session.
Do the following exercises from the textbook:
-
Exercise 12 (
cvolume
andcsurface
). Put your solution in a file namedq1.rkt
. -
Exercise 14 (
string-last
). Put your solution in a file namedq2.rkt
. -
Exercise 19 (
string-insert
). Put your solution in a file namedq3.rkt
. -
Exercise 27 (refactoring the
profit
program). Put your solution in a file namedq4.rkt
. -
Exercise 38 (
string-remove-last
). Put your solution in a file namedq5.rkt
.