Exceptions to requirements

Source: Internet
Author: User

Exceptions to requirements

Many project developers only focus on technology and business. They think that as long as the technology is good, the project can meet their needs and will not take the initiative to prepare any business. Some requirements are easy to understand, but the correct understanding is not easy, because requirements also have many exceptions.

The following is an example of calculating the interest on a personal loan. Many years ago, we were excited by complaints from customers:

User Requirements: The expiration interest of a one-year short-term loan is calculated based on the annual interest rate specified in the contract, and the prepayment is calculated based on the actual number of days (12 months per year and 30 days per month ).

As needed, developers can calculate interest in the following ways:

Method 1: (the annual and daily interest rates are calculated for prepayment ,):

Daily interest rate = annual interest rate/12/30 = annual interest rate/360

Repayment Interest = Principal * annual interest rate

Prepayment Interest = Principal * Actual days * daily interest rate

Method 2: (all are calculated at the daily interest rate)

Daily interest rate = annual interest rate/12/30 = annual interest rate/360)

Repayment Interest = Principal * 365 * daily interest rate

Prepayment Interest = Principal * Actual days * daily interest rate

Method 3: (the annual interest rate is calculated for the expired payment, and the prepayment is calculated based on the daily interest rate ):

Daily interest rate = annual interest rate/12/30 = annual interest rate/360

Repayment Interest = Principal * annual interest rate

Prepayment Interest = (principal * annual interest rate)-principal * (365-actual days) * daily interest rate

These three methods seem to be okay from the perspective of demand understanding. This is a simple calculation. The result is that the Bank has received complaints from customers who make prepayment and complained to the newspaper, the newspaper interviewed various banks and found that several banks had this problem. Some of them had more prepayment than the due interest, and some calculated more due interest.

Let's take a look at the problem:

The customer made a loan of 0.1 million yuan and paid off the loan three days in advance (the actual number of days is 362), with an annual interest rate of 5.31% at that time.

Follow Method 1:

Repayment Interest = 100000*5.31/100 = 5310 yuan

Prepayment Interest = 100000*362 * (5.31/100/360) = 5339.5 RMB

Result: if you make a payment three days in advance, you have to pay 29.5 yuan more than the due payment.

Method 2:

Repayment Interest = 100000*365 * (5.31/100/360) = 5383.75 yuan

Prepayment Interest = 100000*362 * (5.31/100/360) = 5339.5 RMB

Result: an extra 29.5 yuan interest is required for prepayment, that is, an extra 73.75 yuan will be required for repayment upon expiration..

Method 3:

Repayment Interest = 100000*5.31/100 = 5310 yuan

Prepayment Interest = 100000*5.31/100-100000*3 * (5.31/100/360) = 5265.75 RMB

Result: Three days in advance, 44.25 Yuan less interest than the amount due.

The same requirement produces different results and is incorrect because:

Because: daily interest rate = annual interest rate/360(12 months per year, and 30 days per month)

The actual number of days is calculated by 365 days.,(There is a 5-day error)

So: there will be obvious problems in Prepayment after 360.

Result: method 1 and method 2 are used.Complaints about higher customer interest

Method 3The implicit error isIf the customer pays the loan in advance one to five days, the interest is calculated as negative or 0..

The correct method should be as follows: (there is no problem with prepayment at any time)

Repayment Interest = Principal * annual interest rate

Daily rate = annual rate/365

Prepayment Interest = Principal * daily interest rate * Actual days

Calculated using this method:

Repayment Interest = 100000*5.31/100 = 5310 yuan

Prepayment Interest = 100000*362 * (5.31/100/365) = 5266.36 RMB

Result: Three days in advance, 43.64 Yuan less than the amount due.

After reading the above analysis, we can see that the error seems to be due to the fact that the error is based entirely on the demand. This isDemand exception. Therefore, a good developer must not blindly look at the demand, because users only talk about the demand from a purely business perspective, while we are looking at the demand from both the business and technical implementation perspectives, from big to small, from coarse to fine analysis.

To determine whether a requirement is an exception, we must first look at the requirements.Logical or not(In a single calculation, one year is calculated by 360, and the other by 365 days is not logical .)Common sense(Too much repayment in advance is definitely not in line with common sense), as long as we really understand the demand, it will not be an exception to the demand.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.