creating python program with jupyter
Project detail
implement a basic Kitty system that can process the scenarios described in the Appendix.
Requirements
An individual can only participate in a single event at any given time.
Assume that all members share all transactions equally.
Set-up:
Declare named individuals to participate in the event/activity.
Setup the activity: indicating the participating individuals.
Code to add transactions. A transaction has (see Appendix):
name: string
amount: a positive number
payee: member ID
Code to print the reconciliation, i.e. total cost, cost each, who owes who what? (see Appendix)
Submissions will be tested on the Samples in the Appendix and on similar test cases.
Error Handling:
Transactions should not be created for an event if the payee is not signed up for the event.
The code for inputting transactions should be robust against invalid data.
How to proceed:
Start by creating basic versions of your classes.
Create the methods, etc. to allow you to record the transactions for Sample 1.
Write the code to track the total cost of the trip.
Tackle the code for performing the reconciliation for Sample 1:
As a first step, calculate the balance (+,-) for each person.
Then figure out who pays who. Write code for the scenario is Sample 1 first.
Extend the reconciliation code to handle Sample 2.
Traditionally, when a group of friends would go on holiday (?), they’d manage a kitty to keep track of shared expenses. In recent years, a number of phone apps have emerged to digitise this process. Examples include, Settle Up, Splitwise and Kittysplit.
The objective for this assignment is to design and implement a basic Kitty application.
( should comprise your notebook only. Clear all outputs in the notebook before saving for submission. You can use markdown cells in the notebook to explain any design decisions you have made. )
Appendix: Sample runs
Sample 1
Annie, Sally & Bill are going to a concert.
Annie paid for the tickets – €180.
Sally paid for dinner – €75.
Bill paid for drinks after – €19.
Bill paid for the taxi – €16.
Reconcile, who owes who what?
Output
Total: €290.00, that is €96.67 each.
Annie has balance €83.33
Bill has balance €-61.67
Sally has balance €-21.67
Bill pays Annie €61.67
Sally pays Annie €21.67
Sample 2
Cathy, Robin & Jen are going to the cinema.
Cathy paid for the tickets – €33.
Robin paid for dinner – 60.
Jen paid for drinks after – €21.
Jen paid for the taxi – €27.
Reconcile, who owes who what?
Output
Total: €141.00, that is €47.00 each.
Cathy has balance €-14.00
Robin has balance €13.00
Jen has balance €1.00
Cathy pays Robin €13.00
Cathy pays Jen €1.00