Skip to content
Sharp

Object-oriented programming · interview question

Why is it important to reject invalid stock quantities in an e-commerce application?

Multiple choiceMediumchapter-3-curatedpremiumoopinvariants-and-validation
Choose one answer
Answer and explanation

Correct answer

D. To maintain data integrity and prevent errors

Why

Rejecting invalid stock quantities is crucial to maintaining data integrity and preventing errors in an e-commerce application. Ensuring valid stock levels helps avoid situations like overselling or underselling products, which could lead to customer dissatisfaction and operational issues.

Test yourself on Object-oriented programming

A free test with instant, explained results. No account needed.

Start free test
All Object-oriented programming questions →