Object-oriented programming course · IPCA
E-commerce app
An online-shop simulation in C# and .NET 8, organised in layers: domain models, interface-backed repositories, business rules and typed exceptions.
Problem
Practise domain design in object-oriented programming: customers, staff, products, cart, orders, stock and discounts.
Context and motivation
Coursework, used to separate responsibilities explicitly instead of putting everything in the entities.
What I built
Built on my own: the console application and the accompanying report.
Technical decisions
2Repositories behind interfaces
Each entity is accessed through an interface (IClienteRepository, IProdutoRepository, …), so storage can be swapped without touching the business rules.
Exceptions that mean something
StockNaoSuficienteException, ClienteNaoEncontradoException and ProdutoNaoEncontradoException replace generic errors with explicit, typed failures.
What it does
- Customers, staff and products as domain entities
- Cart and order placement, with business rules kept outside the entities
- Stock control and discounts
Limitations and next steps
Known limitations
- Console application with no real persistence and no automated tests.