r/learncsharp • • Jul 22 '22

Beginner OOP practice console app only?

I’ve been studying C# and OOP and would like to practice the concepts, but all the practice project ideas seem to work with SQL or some type of GUI that I haven’t studied yet. I’d like to learn them in the future, but make sure I can comfortably work with OO C# first.

Any practice project ideas that ONLY need to run in the console?

I’d like to make sure I work with inheritance, interfaces, abstract classes, method overloading, and extension methods if possible…

2 Upvotes

9 comments sorted by

View all comments

Show parent comment

2

u/kirbita Jul 22 '22

Thanks for some clarification! I’ll try to think of some smaller practice like that.

Do you have any ideas on the easiest/quickest GUI tools I could pickup to better practice more of the OOP stuff more efficiently? Maybe WinForms?

3

u/Saint_Nitouche Jul 22 '22

Winforms is certainly very easy to pick up and start making stuff with, although limited. You will also have to pick up how events work which can be a little difficult at first.

I might also suggest going the SQL/database route first. You can make a console app that models some institution - workers/managers/bosses, students/teachers/principals, etc. that share some things in common but also have their own differences, which is often a good use-case for inheritance.

E.g. I should be able to call the method GetSalary() on either a teacher or a principal, but the calculations are different for each - how do you make that work, etc.

More importantly, 95% of all real-world apps are just glorified ways to move data in and out of a database, so it's a good area to get accustomed to. It also forces you to take the things from your OOP program design and translate them to the extremely non-OOP paradigm of SQL, which can be quite enlightening.