vaib-dev / Courses

Course for understanding GitHub, Data Structures, Algorithms, Software Engineering, DBMS, Computer-Networks, Scrum, Adobe-Illustrator, LinkedIn and Freelance from scratch.
12 stars 7 forks source link

Create 7-challenge-se-class-diagram.md & README.md #39

Closed vaib-dev closed 4 years ago

vaib-dev commented 4 years ago

Challenge 1: Class Diagram

Output uploaded 👍

vaib-dev commented 4 years ago

Ans1- Because in the challenge there are two different roles mentioned one is customer and other is web user. So I have made the entities according to the description that was provided in the challenge.

Ans2- As each payment has a unique ID and is related to only one account.

Ans3- Each order could refer to several payments, possibly none.

Ans4- Line item basically arranges the order in the shopping cart according to price and quantity.

Ans5- I have used Draw.io.

Ans6- Yes, I got a bit confused in the relationship part, so I watched some youtube videos.

I have drawn it thrice on a rough sheet which gave me some new ideas. So I think it is a very good practice before making it on laptop.

udeysingh95 commented 4 years ago

Q2: But in real world there are multiple payment methods attached to single account! none is also an option, or not? Q3: Each order, whereas is attached to only one payment method - or can we pay for a single order with multiple payment methods? Q4: tell me more about the line items - i didn't see a use of this. Could we relate it to some real world example? If I am ordering on amazon - what is line item in that context? Q5: OK Q6: Maybe add the resources as well - if you have taken some content directly from them. If you have only used them to learn and created the complete content by your own - then no need to add anything in resources.

vaib-dev commented 4 years ago

Ans2: Now I have added a new option for a customer who has no payment method initially. In the diagram the account stores all the methods of payment and in payment section customer just have to select by which method he wants to pay.

Ans3: No, u can select any one payment option available in the payment class like by card, EMI, COD etc.

Ans4: No, u will not see in real life. The line item is just for ordering items according to their rating or price or quantity. In real life, u see the orders arranged according to the time u add them in your shopping cart.

vaib-dev commented 4 years ago

Ans1: I think you are right. One order can only have one payment method. For eg, if I buy a shirt and coat then I will pay for them through one payment method. Got your point 👍.

Ans2: As in the description of the challenge there is a word that items should be "sorted" so I thought maybe this work would be done by line item as the name suggest managing items in an order.