0% found this document useful (0 votes)
57 views15 pages

Case Studies

1) The BMI calculator takes height and weight as input to calculate BMI and determine the category. 2) The calendar converter takes a date in digits as input and outputs the date in words, converting the month digit to the month name. 3) The TH Hibah calculator determines Islamic dividends on bank balances, calculating annual and Hajj dividends separately based on balance amounts and dividend rates. 4) The blood pressure monitor takes systolic and diastolic readings and determines if the values fall in the normal range or other categories based on ranges for systolic and diastolic.

Uploaded by

Farah Cakey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views15 pages

Case Studies

1) The BMI calculator takes height and weight as input to calculate BMI and determine the category. 2) The calendar converter takes a date in digits as input and outputs the date in words, converting the month digit to the month name. 3) The TH Hibah calculator determines Islamic dividends on bank balances, calculating annual and Hajj dividends separately based on balance amounts and dividend rates. 4) The blood pressure monitor takes systolic and diastolic readings and determines if the values fall in the normal range or other categories based on ranges for systolic and diastolic.

Uploaded by

Farah Cakey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Four Case Studies

Case study 1:
BMI Calculator
BMI Chart
BMI Calculator
• Given height (in meters) and weight (in kg) of a person
• Calculate his/her BMI
• Determine the category based on BMI //how??
Case study 2:
Calendar (Month Conversion)
Calendar Version 1
10 07 2020  10 July 2020
Calendar Problem: Month Conversion
• Input 3 info in digit: <day> <month> <year>
• Print <day>
• Determine the respective <month> in words, and print it
• Print <year>
Case study 3:
TH Hibah calculator
Hibah TH Calculation
TH is a special bank for Malaysian Hajj pilgrims
Hibah is an Islamic Dividend
Hibah Tahunan is Yearly Dividend
Hibah Haji is Hajj dividend (up to RM9,980)
Example: TH Hibah calculation
• First case: Given an average balance monthly = RM15,000
• Calculate your TH dividend :
• RM15,000 x 4.25% = RM637.5
• RM9,980 x 1.5% = RM149.7
• Total hibah: RM637.5 + RM149.7 = RM787.2

• Second case: Given an average balance monthly = RM5,000 (≤ RM9,980)


• Calculate your TH dividend :
• RM5,000 x 4.25% = RM212.5
• RM5,000 x 1.5% = RM75
• Total hibah: RM212.5 + RM75 = RM287.5
TH Hibah calculator
• Set YEAR_D = 4.25
• Set HAJJ_D = 1.5
• Input an average balance monthly, let say blnc
• myYearlyD = blnc * YEAR_D / 100
• blnc * HAJJ_D / 100, (blnc ≤ RM9,980)
myHajjD = 9,980 * HAJJ_D / 100. (blnc > RM9,980)
• myTotalD = myYearlyD + myHajjD
• Output myTotalD
Case study 4:
High Blood Pressure Monitor
Blood Pressure
Example: HBP Monitor
• Given Systolic (110) and Diastolic (110) of a person
• Determine the category //how??

120

90

70
40 60 80
Example: HBP Monitor
• Given Systolic (110) and Diastolic (110) of a person
• Determine the category //how??
• first = (90<s<120) AND (40<d<80)
120
• sec = (70<s<90) AND (60<d<80)
• Normal = first OR sec
90

70
40 60 80

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy