Recall & Review
beginner
What is the primary responsibility of the User class in an expense management system?The User class represents an individual who can participate in groups and record or share expenses. It typically holds user details like name, email, and unique ID.Click to reveal answer
beginner
How does the Group class help in managing expenses?The Group class organizes multiple users into a collection where expenses can be shared and tracked collectively. It manages group members and their shared expenses.Click to reveal answer
beginner
What key attributes should the Expense class have?The Expense class should include attributes like amount, description, date, payer (User), and participants (Users who share the expense).Click to reveal answer
intermediate
Why is it important for the Expense class to track participants separately from the payer?Tracking participants separately allows the system to split the expense fairly or by custom shares among users, while the payer is the one who initially paid the amount.
Click to reveal answer
intermediate
How can the Group class maintain scalability when handling many users and expenses?By using efficient data structures like hash maps for quick user lookup, and by separating expense records to avoid large monolithic objects, the Group class can scale well.Click to reveal answer
Which class should store the list of users who share a particular expense?
✗ Incorrect
The Expense class stores participants who share the cost of that expense.
In an expense system, who is responsible for paying the amount initially?
✗ Incorrect
The User who pays the amount is called the payer.
What does the Group class primarily manage?
✗ Incorrect
Group manages users and the expenses shared among them.
Which attribute is NOT typically part of the Expense class?
✗ Incorrect
Group name belongs to the Group class, not Expense.
Why separate payer and participants in an expense?
✗ Incorrect
Separating payer and participants clarifies payment and debt responsibilities.
Describe the roles and key attributes of User, Group, and Expense classes in an expense sharing system.
Think about who pays, who shares, and how groups organize users.
You got /3 concepts.
Explain why it is important to track both the payer and participants separately in the Expense class.
Consider a dinner bill paid by one but shared by many.
You got /3 concepts.