Homework 2
In this assignment, you will practice
- Writing functions in C++
- Reading input from a file
- Working with statically sized arrays of primitives
- Applying your CS skills to communicate information from other disciplines
Specifically, you’ll use a C++ Turtle class to generate embroidery patterns that visualize data.
You can even have an embroidery machine stitch out your final pattern!
Wait, really??! Like, actually stitched out?
Yes! A while ago, the CS 70 instructors convinced the Center for Teaching and Learning to get us a couple of programmable embroidery sewing machines! They read in files in the format your code will generate, and use those files to know what stitches to put where. Those machines are now in the Maker Space!
Let's Go!
Both team members should each click the button below to accept the assignment:
- Accept Assignment Code on GitHub Classroom
- (Choose the same team you created in HW1)
Outline
- Part 1: Written Questions
- Part 2:
libembroidery
and Turtle - Part 3: Plot Example Data
- Part 4: Plot Student Data
- Part 5: Check Your Submission
- Optional: Embroider a Patch** — you know you want to!
Handy Links
Helpful Hints
Pair Programming
Remember:
- You must work on coding and writing tests as a pair, according to the pair-programming guidelines.
- You can (and probably should) read this assignment writeup and think about it on your own, however.
Mastering Version Control
- Commit Early, Commit Often — Remember to add and commit your files regularly! In particular, don’t forget to push them when you’re finished.
- Don't Add Extraneous Files — As a general rule (even outside CS 70!), you should not add generated files of any form (e.g., compiled machine code, generated images) to a repository when those files can be automatically produced from other files already in the repository. This week, we will make an exception for the embroidery and image files you will create, since Gradescope makes it difficult for your grutors to view them otherwise.
Useful Information
Other Resources
As you work through this assignment, we suggest you keep the following references handy:
- Sections 1.5, 2.3.1, and 2.4 (up to but not including 2.4.1) of the C++ Primer, 5th Edition.
- To access from the 5Cs campuses: click the link, sign in with your campus credentials, and then click "Start"
- If you're off campus, or if that link doesn't work, use this link to log into the O’Reilly Safari Learning Platform: Academic edition and then search there for C++ Primer (or try clicking the above link again once logged in).
Grading
Completing this assignment is worth 127 points, and will be graded as follows:
- 75 points: Coding (completeness, correctness, clarity/style)
- 47 points: Written questions
- 5 points: Correctly denoting all team members in Gradescope submission
- It is particularly true this week that we reserve the right to give extra credit for especially interesting or creative submissions.
(When logged in, completion status appears here.)