© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
88 replies
REAL STUNNA

❔ OOP Product Inventory Project

Hi I'm making a product inventory project to get better at OOP, and I have another class called Inventory where I have a method that calculates the value of the entire inventory. I'm trying to figure out how I would go about doing this, and so far my logic is whenever a new product is initialized, I want to add the quantity of that product and price of the product to a list so I can access that list in the Inventory class and then go about calculating the sum. My question is: for the constructor, when I initialize a new product in my Program.cs file, will it add the desired information to the list? I'm not sure if I'm doing it right.
Screen_Shot_2023-01-13_at_5.37.58_PM.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements
Next page

Similar Threads

Inventory Maintence Project Issue
C#CC# / help
3y ago
OOP help with a project please
C#CC# / help
2y ago
OOP help
C#CC# / help
9mo ago
❔ OOP Help
C#CC# / help
4y ago