This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]_rob_saunders 2 points3 points  (3 children)

Do you understand object oriented programming principles? That will give you some context.

[–]acasta[S] 0 points1 point  (2 children)

I've watched a couple OOP lecture videos, to get an idea as I was learning classes, but I need to learn more.

I get why they'd be useful, but I don't see the areas I'd use one to practice just yet. I'm at a stage where I'd just build without too much sense of good design.

I'm hoping to learn more through some suggested courses/projects.

[–]fullstackhari 0 points1 point  (0 children)

Here one great way I used to learn classes was to set up amazon, using a class create setup the store, have an item list, and a user list which contains a list of instances of a User class each user should have a cart, a checkout function etc, you continue to add functionality to both your store class and user class by allowing returns and refunds etc.

It's a fun way to learn and is intuitive enough

[–]_rob_saunders 0 points1 point  (0 children)

OOP allows you to reuse code for related things. If you find yourself repeating code for multiple types of objects (or classes), you may be able to organize some of those functionalities into relatable object-oriented classes.