740softwareConcepts / judgmentCalc

0 stars 0 forks source link

PARENT: Create Functions from Solution Design #22

Open jrgdnn12 opened 11 months ago

jrgdnn12 commented 11 months ago

Please refer to the solution design to get started. I will begin with a function that collects new user data and validates it, and saves it to the database.

This will be the parent thread. Track the status of this dependency in a new issue titles. User Add/Remove/Update function.

jrgdnn12 commented 11 months ago

I've identified a list of function that can be worked on during Agile fall sprint. A separate child issue relates to the main repository should be created for each one.

shra1802 commented 11 months ago

Hey, I ll try to make function for damage calculation and merge other interest calculation.

jrgdnn12 commented 11 months ago

I will Create the issue.

yuliyapearson commented 11 months ago

What do you mean by "damage calculation" function?

jrgdnn12 commented 11 months ago

Image

yuliyapearson commented 11 months ago

There is a word file on google drive I created before our last paper was submitted. You guys should look at it. it should help you understand damages a little better.

jrgdnn12 commented 11 months ago

I think I misunderstood it.

Shoud we call it a damage create/update function?

yuliyapearson commented 11 months ago

I guess to answer your question whether it can me merged with calculations...it depends. I think It is more of a separate function, and it's main purpose is to store info about how many damage items are in each in each case

jrgdnn12 commented 11 months ago

@shra1802 Going with Yuliya's clarification. "DamageCalculation" manipulates objects in the database very similar to the "Add/remove/update client" function. It will be adding, updating damages linked to an exiting case.

So this cannot be merged with another function. should be built independently.

yuliyapearson commented 11 months ago

And it does have one component that needs to be calculated. I will try to explain to make it a little more clear what I mean. So, there is a boolean variable for prospective damages, and the user has to identify if there are prospective damages. So this is an example of how it works. Let's say someone got into a car accident because of drunk driver and had their leg cut off. They file a lawsuit against drunk driver and win. For simplicity, lets say there are 3 kinds of "damages"/liabilities the jury awarded to the plaintiff: 1) compensation for the value of the leg 2) pain and suffering 3) punitive damages (to punis/make example of and deter drunk driving . So there are 3 damage items, so there will be 3 loops. Each damage item them occrues pre and post judgement interest. So for number 1, the person would have to be compensated for a portion of a value of working leg from the date he got into an accident until the date of judgment. And because they did not get to have their leg and because they did not get the money to compensate for it, they are entitled to prejudgement interest. So for this portion, the amount actually awarded has to be broken down to two parts for the purpose of calculations: amount for damages suffered and prospective damages. So the user would have to enter if there are prospective damages and then would have an option to calculate how much. So , let's say if the jury awarded 1,000,000 for the leg. But this amount is for the value of the leg over the whole life. So only a portion that actually was "suffered" is included in interest calculation, pre and post judgement because prejudgment interest cannot be awarded for the loss of use of the leg over the whole estimated lifetime because the person is still alive and the "damages" are spread out over the lifetime. For punitive damages, there is no prejudgement interest because the "damages"/liability incurred is just to punish the offender, it is not to compensate. For these, clearly there was no contract and the interest rate would be statutory taken from the table +2%

jrgdnn12 commented 11 months ago

So we have to differentiate between damage management and award calculation.

Lets start with the function that manages damages. need to be able to;

yuliyapearson commented 11 months ago

Guys, where do I add functions? Sorry, this is all new to me and there's a learning curve

jrgdnn12 commented 11 months ago

Hi Yuliya, I can help with that. Please schedule a meeting with me and I will walk you through. :)

yuliyapearson commented 11 months ago

Create or update Case- Persistent storage of information related to a case and an existing client. (Rini)

Store data first

View Case - To be merged with Create update case.

Damages Number -

Calculate Interest - Can this be merged with the damages calculation function? (Yuliya)

Calculate contractual interest - This is part of CalculateInterest and therefore can be merged with damage interest?

CalculateStatutoryInterest- This is part of CalculateInterest and therefore can be merged with damage interest

Payments --update judgement

Generate Vizualization - this is a candidate for upcoming sprint.

Generate Report - Can this be merged with the damages Calculation function?

Display Calculation Detail- A sub function of Generate report. (Rini)