Your task for homework 1 will be to implement design problems from CS 142. The problems can be found in QUESTIONS.md
. your task is to discuss and implement three of them.
For each question:
- Provide a short writeup explaining what the 'main problem' is, what decisions were made to most efficiently solve the problem. You should mention what the space and time complexity of your solution is. Add a short description of any classes you create for the problem and how they interact.
Your writeups should be done in markdown and added to the root directory of the repo (don't modify this (README.md
) file. Nothing bad will happen if you do, though). You can look at this file for syntax. If you use a different guide for markdown, please add a link to it in your writeup. You may put all the writeups in the same file under different headings.
-
Create a folder in
src/
and create any java files necessary to implement the basic solution. You may need to create multiple files to create all the necessary classes, but you don't need to add much functionality beyond solving the 'main problem'. Make sure the code for each problem is separated. Add clear and thorough comments to your code. -
Write test cases in
test/
to thoroughly and rigorously test your solution. Describe your test cases in your writeup. In particular, describe why you think you've covered all the important cases.
Your tests should all run and succeed using the testing plugin in the CodeSpace.
We will do Question 1 in class together. You may use any 3 of the remaining questions for your homework.
- Total points: 100
- Each question is individually graded out of 30
- There are an additional 10 points for the overall submission
- All files are in the appropriate places (code files in subdirectories of
src/
, test files intest/
and writeup(s) in the base directory) - Tests run using the testing plugin on Codespaces
- All files are in the appropriate places (code files in subdirectories of
- Thorough writeup: 10 points
- You can lose points for missing information regarding your code or the test cases
- You can lose points for poorly formatted markdown
- Complete code: 10 points
- You can lose points for poor comments or style
- Thorough and well thought out test cases: 10 points
- You can lose points for missing potential sources of error
- You can lose points if your tests fail...
Questions about the lab should be asked in Slack in a public channel to ensure that everyone gets the answer. If there is a particularly important change to the assignment, I will post the update in slack/google classroom and pin it. See google classroom for due date. The due date listed on github classroom is the last chance to submit late.
You may google individual data structures and their time/space complexity, but you may not google any part of the question itself. No generative AI, including Bing.
For this assignment, the Codespace environment will automatically commit and push for you every 30 seconds, so you don't have to worry about that right now. In the future assignments, I will disable that feature so you can be in control of your commits and commit messages. You will be able to roll-back changes to individual files, but much of git's functionality may be limited for this assignment.
I referenced this link to remind myself how to embed links in markdown.