- Break down problems into implementable pseudocode
- Differentiate between and produce destructive and non-destructive methods
- Automate repetitive tasks using loops
- Use strings, integers, arrays, and/or hashes
By now you should be feeling comfortable with the procedure we would like you to embrace and follow when working through challenges. You may feel like it's overkill now, but you will greatly appreciate already having set good habits when you arrive at DBC and begin bigger projects!
In this challenge, you are going to make a method that takes an array of names (You'll want to get the list from your Cohort page in Socrates) and outputs a list of accountability groups for three different units. You should try to get everyone into an accountability group of 4, but it's your decision how to deal with cohorts not easily divisible by four.
You will also not have any tests for this challenge, so it's your job to create them. Read the document on Writing Driver Test Code code with Ruby. You should write tests with expectations that return true
if the code is working and false
if it is not.
You will want to consider:
- Are there built-in methods to do this in Ruby?
- Will you try to avoid putting the same people together more than once?
- If I run this program three times in a row, will the program give me three different outputs? Is that good or bad?
- Should it remember past outputs or not?
- Write Driver Test Code
- Pseudocode
- Initial Solution
- Refactored Solution
- Reflect
- Sync your changes (push your solution) to Github
- Review