Example 2 An E commerce site has the following cash back offers i If purchase

# Example 2 an e commerce site has the following cash

This preview shows page 43 - 48 out of 90 pages.

Example 2 An E-commerce site has the following cash back offers. (i) If purchase mode is via website, an initial discount of 10% is given on bill amount. A=A+2 Yes 1 2 3 4 5 6 START CLEAR WORKING LOCATIONS SETA=1 B=B+A A=199? PRINT B END No © The Institute of Chartered Accountants of India
ENTERPRISE INFORMATION SYSTEMS 1.44 (ii) If purchase mode is via phone app, an initial discount of 20% is given on bill amount. (iii) If done via any other purchase mode, the customer is not eligible for any discount. Every purchase eligible to discount is given 10 reward points. (a) If the reward points are between 100 and 200 points, the customer is eligible for a further 30% discount on the bill amount after initial discount. (b) If the reward points exceed 200 points, the customer is eligible for a further 40% discount on the bill amount after initial discount. Taking purchase mode, bill amount and number of purchases as input; draw a flowchart to calculate and display the total reward points and total bill amount payable by the customer after all the discount calculation. Solution 2 Let us define the variables first: PM: Purchase Mode BA: Bill Amount TBA: Total Bill Amount NOP: Number of Purchases TRP: Total Reward Points IN_DISC: Initial Discount ET_DISC: Extra Discount on purchases eligible to Initial Discount N: Counter (to track the no. of purchases) Refer Fig. 1.7.4 the desired flowchart. Example 3 A bank has 500 employees. The salary paid to each employee is sum of his Basic Pay (BP), Dearness Allowance (DA) and House Rent Allowance (HRA). For computing HRA, bank has classified his employees into three classes A, B and C. The HRA for each class is computed at the rate of 30%, 20% and 10% of the BP Pay respectively. The DA is computed at a flat rate of 60% of the Basic Pay. Draw a flow chart to determine percentage of employee falling in the each of following salary slabs: (i) Above ` 30,000 (ii) ` 15,001 to ` 30,000 (iii) ` 8,001 to ` 15,000 (iv) Less than or equal to ` 8,000 Solution 3 The required flowchart is given in Fig. 1.7.5: © The Institute of Chartered Accountants of India
AUTOMATED BUSINESS PROCESSES 1.45 Fig. 1.7.4: Flowchart for Example 2 TRP = 0, TBA = 0, BA = 0 No No Yes No Yes Yes No Yes Start Read PM, BA, NOP If PM = Website? IN_DISC = 0.10 If PM = Phone App? IN_DISC = 0.20 IN_DISC = 0 TRP = NOP * 10 If 100 <= TRP <= 200? ET_DISC = 0.30 BA = BA – (BA*IN_DISC) TBA = BA – (BA*ET_DISC) If TRP > 200? ET_DISC = 0.40 Print TRP, TBA Stop TBA = BA © The Institute of Chartered Accountants of India
ENTERPRISE INFORMATION SYSTEMS 1.46 Solution 3 (Ctd.) Fig. 1.7.5: Flowchart for Example 3 Yes Yes Yes No Yes No No No No Start Read BASIC,CLASS HRA = 0.1*BASIC DA = 0.6 * BASIC If SALARY 8,000 C 1 = C 1 + 1 SALARY = BASIC + DA +HRA Clear all working locations I = 1 If SALARY 15,000 C 2 = C 2 + 1 Yes If SALARY 30,000 C 3 = C 3 + 1 I = I + 1 C 4 = C 4 + 1 If I 500? If CLASS= A? HRA = 0.3 * BASIC Yes If CLASS = B? HRA = 0.2*BASIC No Print P 1 , P 2 , P 3 , P 4 Stop P 4 = C 4 *100/500 P 1 = C 1 *100/500 P 2 = C 2 *100/500 P 3 = C 3 *100/500 © The Institute of Chartered Accountants of India
AUTOMATED BUSINESS PROCESSES 1.47 Start X = 10, Y =20, Z = 30, S = 0, I = 0 S = Z Z = Y Y = X X = S I = I + 1 If I = 1?

#### You've reached the end of your free preview.

Want to read all 90 pages?

• Spring '20
• Management, The Institute of Chartered Accountants of India, enterprise information systems