You are on page 1of 7

UNIVERSITY COLLEGE OF THE CARIBBEAN

Incorporating Institute Of Management Sciences & Institute Of Management & Production A Member of the Commonwealth & OAS Consortia of Universities

ASSOCIATE OF SCIENCE DEGREE IN MANAGEMENT INFORMATION SYSTEMS END OF MODULE EXAMINATION


CENTRE MODULE DATE TIME : OXFORD TERRACE CAMPUS : PROGRAMMING TECHNIQUES [ITT103] : APRIL 19, 2010 : 10:00 AM

DURATION : 3 HOURS

INSTRUCTIONS:

1. Please read all instructions carefully before attempting any question. 2. This paper consists of seven (7) printed pages and two (2) sections [A&B] 3. Section A Problem Solving has six (6) compulsory questions = 30 marks. 4. Section B Programming has two (2) flowchart and two (2) pseudo code questions for you to choose one (1) of each. (10 marks each).
ALL QUESTIONS MUST BE ANSWERED IN THE ANSWER BOOKLET PLEASE ENSURE THAT YOU NUMBER YOUR QUESTIONS CORRECTLY. CLEARLY WRITE THE NUMBER OF THE QUESTION ON EACH OF THE RELEVANT PAGES. WHERE QUESTIONS HAVE MULTIPLE PARTS, ALL PARTS MUST BE ANSWERED. START THE RESPONSE TO EACH QUESTION ON A NEW PAGE.

Write your REGISTRATION NUMBER clearly on each page of your answer booklet. DO NOT WRITE YOUR NAME. NB. Your script will not be marked if it has your name.

DO NOT TURN OVER UNTIL YOU ARE TOLD TO DO SO

Section A Problem Solving Short Answers This section contains six (6) questions, worth thirty (30) marks. Answer all questions. Do not write an entire program.
1. Write Pseudocode to solve the following problem:

Wrights Bedding would like you to write a program to calculate and display the bill for his customers. The program should accept the customer type, quantity of beds purchased and the price of one bed. The program should calculate and print the customers final bill. A discount is given to each customer based on the customer type. The discount to be given is indicated below. The customer type entered must be Gold or Silver. A fifteen percent (15%) tax is added to the bill after the appropriate discount has been subtracted. The customer type and their discount rates are as follows:

Customer Type

Discount Rate 10% 5%

Gold ........................................... Silver ...........................................

Display the bill for ONE customer. 2. Write a while loop which sums all the even integers from -5 to 9 exclusive.

[5] [4]

3. Write a function called DoubleUp which accepts an integer parameter. If the integer is even, the function should return three (3) times the integer received, otherwise the function should return one plus the integer received. 4. myName is a one dimensional array that stores the names of students in a class as shown below:Samuels Brown Richard Brown Newby Samuels [5]

a. Write the pseudocode to find and print the total number of students whose name is Brown b. Write the pseudocode that will display alternate names from the array [4] [3]

Page 2 of 7

5. Draw the flowchart for the following problem: New Horizon Limited, an IT based company wants persons to apply for a job. A code of J indicates the applicant is a Jamaican citizen and a code of NJ indicates the applicant is not a Jamaican citizen. The specifications for the job require that the applicant be a Jamaican citizen, 18 years of age or older. If the applicant satisfies both criteria , then output the Job acceptance message, and process the job application. If one or both criteria is not met then output appropriate messages. [4]

Page 3 of 7

6. Complete the following flowchart based on the question given below:


START

[5]

QUESTION
Input student identification

a.

number,

programme and credits as

accumulated input. The

Identification

number and programme of all


Read IdNumber, Programme, Credits

students more

who than

have 10 be

earned credits

should

outputted. Stop inputting student information when a

e.

negative credit amount is inputted. Finally print the total number of students

b. Yes No

who

have

earned

more

than 10 credits.

c. No Yes

d.

Print Programme is , Programme Print Idnumber is , Idnumber STOP

Page 4 of 7

Section B This section contains two (2) Flowchart questions and two (2) Pseudocode questions worth 10 marks each. Answer two questions one Flowchart and one Pseudocode.

1 Flowchart Answer any one the following.


A. Draw a flowchart to solve the following problem:
[10]
Your DVD Club offers discount on disc rentals according to customers type of club membership. If customers club is the Bolt group, apply 25 % Discount. On the other hand, the Asafa group members gets 20% discount while Shelly group members receive 15% discount. If you are older than 60 years old, you receive an additional discount of 3% irrespective of whether or not you are a group member. If you are not a member of a group and not older than 60 years, you receive no discount. Using the most appropriate Control structure, create an algorithm, using flowchart, that calculates and displays the Payment Due for a rental after reading the buyers group code, age and the price of the DVD rented.

OR

B. Draw a flowchart to solve the following problem

[10]

Print all the odd numbers out of a set of integers (i.e. a set of both even and odd numbers) which are read in from the keyboard. Count all the odd numbers and find their sum. At the end print this sum and the total number of odd numbers read in. The programme should continue to do this until last number read in is a negative number.

2. Pseudocode - Answer any one the following.


A. Write Pseudocode to solve the following problem: [10]

Fortune Plus Limited requires a simple menu driven banking program to monitor their five (5) savings accounts, as shown in the display below. The accounts are identified by account numbers that are stored in an array.

If the Deposit option is chosen, then the user must enter the account number, and also enter the amount to be deposited. If the account number exists, then the amount is

Page 5 of 7

added to the existing balance and the user is shown the new balance. The programme then returns to the menu display as shown below. If the Withdraw option is chosen, then the user must enter the account number, and also enter the amount to be deducted. If the account number exists, then the amount is deducted, plus a service charge of 5% and the user is shown the new balance. The programme then returns to the menu display as shown below. If the Query option is chosen, then the user must enter the account number, and if the account number exists, then the balance on a particular account is displayed. The programme then returns to the menu display as shown below. If the user selects the Exit option by pressing zero (0), then the program will terminate, issuing some appropriate message to the user. WELCOME TO FORTUNE PLUS LIMITED Deposit Withdraw Query Exit <Press> 1 <Press> 2 <Press> 3 <Press> 0

Please Select Your Transaction :

OR

B. Write Pseudocode to solve the following problem:


Marys car mart needs a program to generate a report showing Penalty Payments due by delinquent customers and Raffle Eligibility status for customers who make loan payment earlier than due date. The program will repeatedly get each customers id, due date, actual payment date, number of days late (for payment already made), payment due and

[10]

amount paid. It then processes data to determine customers status as Raffle Eligible or Delinquent. The program calculates and prints Customer ID, Status and Overall Penalty. Data input to the program will stop after reading Customer ID 000. If a customer made payment late or paid less than the amount due, penalty is applied as follows: Late Penalty - is calculated at 1% of the payment due multiplied by the number of days late.

Page 6 of 7

Underpaid Penalty - If payment made is less than the payment due, an Underpaid Penalty of 5% of the difference should be paid by customer.

Overall Penalty - A customer can be both late and also underpay. Hence, the Overall Penalty is the sum of both penalties.

On the other hand, in an effort to motivate customers to pay early, the car mart will award eligibility for a raffle to win a 2008 Mitsubishi Pajero (motor vehicle), to any customer who makes payment before due date.

END OF QUESTION PAPER

Page 7 of 7

You might also like