Professional Documents
Culture Documents
Bci1143 Problem Solving S1 080223
Bci1143 Problem Solving S1 080223
~ •••• ~_)~_j
UNIVERSITI MALAYSIA PAHANG
FINAL EXAMINATION
DURATION 3 HOURS
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
This examination paper consists of SEVEN (7) printed pages including front page.
CONFIDENTIAL 22231/BCI1143
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,
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
Figure 1
3
CONFIDENTIAL 22231/BCI1143
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
Table 3
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
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
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]