Homework 3
In this week's assignment, you will practice
- Implementing member functions (including constructors) for a user-defined class.
- Writing a
Makefile
. - Working with statically sized arrays of primitives.
Let's Go!
Both team members should click the button below to accept the assignment:
- Accept HW3 on GitHub Classroom
- (Choose the same team you created in HW1)
Outline
- Part 1: Written Questions
- Part 2: Make Your Makefile
- Mini Lesson: Static Class Members
- Part 3: Define the Sprite Class
- Part 4: Define the Asciimation Class
- Part 5: Add Asciimation Display Functions
- Part 6: Make Your First Asciimation
- Part 7: Make It Your Own
- Part 8: Check Your Submission
Helpful Hints
Though in previous assignments you have submitted images, it is generally best practice to commit only source code in your repository. Please do not submit your generated movie files for this assignment.
Pair Programming
Remember:
- You must work on coding and writing tests as a pair, according to the pair-programming guidelines.
- But you can (and probably should) read this assignment writeup and think about it on your own.
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) to a repository when those files can be automatically produced from files already in the repository.
Useful Information
Other Resources
As you work through this assignment, we suggest you keep the following references handy:
- The following sections of the C++ Primer, 5th Edition:
- Sections 3.5.1–3.5.2, for a review of primitive arrays
- Section 7.1.2, for different ways to define member functions
- Section 8.2, to better understand the file-reading code in the starter code
- As always, we encourage you to ask (and answer) questions on Piazza as you work!
- We have also posted a new resource page this week: Working with Makefiles
- Some time ago, a particularly industrious grutor wrote an Unofficial CS70 Textbook (!!) and the compilation case study contains multiple examples of Makefiles.
- Remember that the CS 70 Idioms we expect to see in your code are summarized on the Coding Idioms page—not following them will result in lost points on your homework:
Grading
Completing this assignment is worth 100 points, and will be graded as follows:
- 19 Points: Written Questions
- 16 Points: Makefile
- 60 Points: Coding (completeness, correctness, clarity & style)
- 5 Points: Correctly denoting all team members in Gradescope submission
(When logged in, completion status appears here.)