This group project is designed to be open-ended. This means that not only will you be the developer, but also the product designer and project manager. It's up to you decide how to build your very own version of Snapchat. There is no right or wrong as long as your app operates the way you expect it to.
For today's group project, you'll be building out the User class of Snapchat from scratch. Fork/Clone this lab (or use the Open in Nitrous
button). In this directory, make a file called user.rb
. Code out your User class here!
Before you start actually coding, spend 5 - 10 minutes planning out how your class will function and what it will look like. Pseudo-code can be really helpful in designing your class.
Think about:
- What attributes does that class have?(i.e. username? password?)
- What actions will they be able to take?
- What's your MVP (minimum viable product)
- How can users be able to interact with other users?
If you're all fired up and ready to go, get to planning! If not...keep reading.
We know that every class has both attributes and actions. Let's break those down:
-
Attributes:
- Every snapchat user has a username and a snap story, so we know we'll at least need those two attributes.
- Can you think of any others? How does your class store snapchats you receive? Maybe we need another attribute for that?
-
Actions:
- A user can send a snap. How does that work? How does this method know what image you're sending and who you're sending it to?
- Add to their snap story. Think about how this might work - we need to modify an attribute of user.
- How do we differentiate between seen and unseen snapchats? What about how to make them disappear?
View Group Project - Object Oriented Snapchat on Learn.co and start learning to code for free.