Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

:-=-~ -· ··I

~ •••• ~_)~_j
UNIVERSITI MALAYSIA PAHANG

FINAL EXAMINATION

COURSE PROBLEM SOLVING

COURSE CODE BCI1143

COURSE COORDINATOR SALWANA MOHAMAD@ ASMARA

DATE 08 FEBRUARY 2023

DURATION 3 HOURS

SESSION/SEMESTER SESSION 2022/2023 SEMESTER I

INSTRUCTIONS TO CANDIDATES:
1. This question paper consists of THREE (3) questions. Answer ALL questions.
2. All answers to a new question should start on a new page.
3. All the calculations and assumptions must be clearly stated.
4. Candidates are not allowed to refer any material other than those allowed by the
coordinator.

EXAMINATION REQUIREMENTS:

NONE

APPENDIX:

NONE

DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO DO SO

This examination paper consists of SEVEN (7) printed pages including front page.
CONFIDENTIAL 22231/BCI1143

QUESTION 1 [20 MARKS]

BeRich is an investment company offering three investment packages named Gold, Silver, and
Bronze. Each package has a different benefit, principal investment value, and dividend rate. All
packages have the same maturity period which is 10 years. Before maturity, a client can withdraw
only the dividend, meaning the principal money invested must stay in the account. The three
packages are shown in Table 1.

Table 1

::~~'e ;
B.rincil!al Investment Dividend JRate
~ ,, . Value
Bronze RM10,000 10% every year (of account
balance)
Silver RM20,000 20% every year (of account
balance)
Gold RM30,000 30% every year (of account
balance)

As a programmer, you need to develop a system to calculate the amount of money that can be
withdrawn at a specified year; and the account balance when a user keys in the input of year to
withdraw (year). This system is to give ideas on the amount of money that the potential clients
will get when they invest in a certain package. If the year is not 10, the system will calculate only
the total dividend. If the year is 10, the system will calculate the total dividend plus the principal
invested money. Note that the dividend percentage of each year is calculated on the latest balance
in the account, for instance, on the Bronze package,

Dividend for JS' year * RMJ 0, 000


= 10%
Dividend for 2nd year= 10% * (RMJO,OOO + dividend of JS 1 year)
Dividend for 3rd year = 10% * (RMJO,OOO + dividend of 2nd year + dividend of 1st year)
Dividend for 41h year = 10% * (RMJ 0, 000 + dividend of 3rd year + dividend of rd year +
dividend of JS' year)

......... .... and so on. .

An example of program input and output is shown in Figure 1. Based on the figure and all the
information given, draw a flowchart for the program.

2
CONFIDENTIAL 22231/BCI1143

*****Welcome to BeRich Investment******


How much will you get when you invest with us?
*******************************************
Choose your package [B for Bronze, S for Silver and G for Gold]:
>>B
Enter the year you want to withdraw your money
>>4
You will get a total of_ with RMlO,OOO balance in the account. Try again? [y/n]:
>>y
Choose your package [B for Bronze, S for Silver and G for Gold]:
>>B
Enter the year you want to withdraw your money
>> 10
You will get a total of_ with RMO balance in the account. Try again? [y/n]:
>>n
Thank You! INVEST NOW FOR A GREATER FUTURE ..

Figure 1

3
CONFIDENTIAL 22231/BCI1143

QUESTION 2 [40 MARKS]

Clouds Glamping is one ofthe best providers for glamping activity located in Singapore. Two
locations that can be chosen, namely East Coast Park and Pasir Ris Park with different packages
and prices. Details of the provided package are tabulated in Table 2.

Table 2

1 ~!%; 2~t::~~8 ;/'


"
Pllice. ~r .J:!&C~Ke:.f$} ·
"
Pacme
Standard package 200.00
- Consist of 1 medium size tent.
East Coast Park Family package 350.00
- Consist of 1 large size tent
Standard package 220.00
- Consist of 1 medium size tent.
Pasir Ris Park Family package 370.00
- Consist of 1 large size tent
Clouds package 400.00
- Consist of 1 large tent
- I table fan

Additional items are also available for rental, as shown in Table 3.

Table 3

Additional 'Item Price($)


Air bed 90.00
Potable air conditioning 120.00
Fairy lights 75.00

The package's price (Table 2) are for weekdays which are 10% higher during weekends.
However, the price for the additional item (Table 3) are applicable for weekdays and weekends.
An example of the manual receipt produced by Cloud Glamping is shown in Figure 2.

4
CONFIDENTIAL 22231/BCI1143

Receipt

Figure 2

As a developer, you are assigned to computerize the booking system for its branch in Malaysia.
As a start, you are required to write an algorithm with 4 modules including the main module to
calculate the total price that needs to be paid by the customer. The algorithm will allow the user
to use the system multiple times. Before entering the system, a confirmation is needed where the
user needs to enter "y" or "Y". Wrong input will result in declining to enter the system. The output
that should be displayed is the total price in Malaysian Ringgit (MYR) . Therefore, you need to
convert the currency from Singapore Dollar (SGD) to Malaysian Ringgit (MYR). Assume
lSGD = MYR3.30. The call-by-value and call-by-reference parameters must be clearly presented.
Appropriate logic structure should be applied as required by the question.

5
CONFIDENTIAL 22231/BCI1143

QUESTION 3 [40 MARKS]

Stamp duty is an essential fee on legal documents such as the instrument of transfer and loan
agreement when you purchase a property. Stamp duty are imposed on instruments and not
transactions. An instrument is defined as any written document, and in general, stamp duty is levied
on legal, commercial, and financial instruments. The stamp duty for sale and purchase agreements
and loan agreements are determined by the Stamp Act 1949 and Finance Act 2018. Types of
property can be a bungalow, semi-detached houses, condominiums, terrace houses, super link
houses, flats or townhouses. Table 4 shows the rate of stamp duty for purchase agreements or
transfers of property.
Table 4
.~P.'ui:.cil&Sen~:nee: .or Market,·Value Rate".OfStam(! ·dun:
. .
.~~.. ·
1
}
',.<,~{ ,_- ..
!';•.:,"':. :
.

First RM 100,000 1%
RM 100,001 to 500,000 2%
RM 500,001 to RM 1,000,000 3%
above RM1 ,000,000 4%

As a programmer, you are required to develop a program for stamp duty calculator. The expected
output of the program as in Figure 3.

6
CONFIDENTIAL 22231/BCI1143

Please enter property owner's name : Nur Aminah Azhar


Please enter IC/Passport number: 880312-14-5406
Please enter year of property purchase: 2022
Please enter type of property : Semi-0 house
Please enter purchase price/market value (whichever is
higher) : 415000

Property owner: Nur Aminah Azhar


IC/ Passport Number: 880312-14-5406
Year of property purchase: 2022
Type of property: Semi-D house
Purchase price/market value : 415000
Stamp duty rate: 0.02
Stamp duty amount: 8300

Figure 3

(a) Develop full system design that includes decision logic structure using non module
flowchart.
[24 Marks]

(b) Construct a C program using a sequential logic structure for inputs and outputs of the
expected output as shows as in Figure 3. The outputs should show all the value of the
input' s variables.
[16 Marks]

END OF QUESTION PAPER

You might also like