System Design Question

Create a simple shopping application. They have given the sample project which already has some code. They asked to add the below features. Clicking on each Add To Cart should add the item to the shopping cart. The listing in the Product Listing component should be updated to show the Increase/Decrease Quantity button and the quantity of the item in the cart. Clicking on each Increase Quantity Button should increase the quantity of the item in cart. Clicking on each Decrease Quantity button when : Cart Quantity of item is 1:  Should remove the item from the cart, hide the Increase/Decrease Quantity button, and should show the Add to Cart button. Cart Quantity Greater than 1: The quantity of the item in the cart should be decreased. On every quantity update operation, the text for the Quantity of item should be updated both in the Listing component as well as in the corresponding entry in the Cart Component. Items should be displayed in the Cart Component in the order they are added to Cart. The list of products and the cart object is passed as Prop to the Product Listing Component and Cart Component respectively.

AnswerBot
1y

Create a shopping application with add to cart, increase/decrease quantity, and update functionality.

  • Implement add to cart functionality when clicking on each item

  • Update the product listing component ...read more

CodingNinjas
author
2y

I have solved this by using framework features. I have used directives, binding, and looping. with that, I have created this application with no bugs.

Help your peers!
Add answer anonymously...
GlobalLogic Senior Software Engineer Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter