Asia-Pacific Forum on Science Learning and Teaching, Volume 19, Issue 2, Article 16 (Dec., 2018)
Jose LUKOSE and Kuttickattu John MAMMEN
Enhancing academic achievement in an introductory computer programming course through the implementation of guided inquiry-based learning and teaching

Previous Contents


Appendix

Sample questions from formative and summative assessments.

(Extract from) Formative assessment 1 (Test 1)

Question 1

1.1 With the aid of a diagram, show the various steps of the Program Development Cycle. 

1.2 Explain the term Algorithm so that its importance in programming is made clear.

Question 2 

The ATM (Automatic Teller Machine) is used to withdraw money from your account. Consider that you need to withdraw some money from your account. Answer the following questions from your knowledge of using an ATM.

Note: Assume that there is enough money in your account and the machine is in working order.

1.1 List two inputs into the machine for the job

1.2 List two outputs from the machine.

1.3  Write the various steps needed to perform the operation in the correct order.

(Extract from) Formative assessment 2 (Test 2)

Question 1   

Barking Lot is a day care centre for dogs. The centre charges R75.00 per day for dogs below 10 kg, R90.00 per day for dogs 10 kg and above but below 30 kg and R120.00 per day for dogs 30kg and above. The program accepts the name of the dog's owner, breed and weight (in kg) of the dog and the number of days the dog needs to be taken care of. The customer must pay 14% VAT on the total amount. The program must calculate and display the total amount before VAT, the VAT amount and the final amount to pay including VAT.

You are required to do the following:

1.1 Draw the IPO chart of the program 

1.2 Write the Pseudocode for the program.

Question 2

Vusi is planning to organise a graduation party at his home. He wants to calculate the cost for his party. The following list shows the cost of hiring the equipment and the cost of food to be provided.

Item

Cost

Tent

R 1550.00 to accommodate up to 50 guests. If there are more guests, R1000 for an additional tent.

PA System

R 600

Chairs

R 20 for each chair

Catering

R 150 per person if number of guests is 20 or less. If the number of guests is more than 20, the charge is R 130 per person.

In addition to the above, he needs to pay for the services of a DJ at R 200 per hour. The program will accept the total number of guests he plans to invite and duration of the party in hours. The program must then calculate and display the following with meaningful messages:

  • The total cost of catering
  • The total cost of hiring the tent and chairs.
  • The total cost of hiring the PA system together with services for the DJ
  • The final amount he need to pay
  • 2.1 Write the complete program in pseudocode.

    (Extract from) Formative assessment 3 (Test 3)

    Question 1

    Consider the following pseudocode written by a programmer:

    BEGIN

         Declare P, Q As String

         Declare X,Y,Z As Integer

         Accept Y, Z

         X = Y * 2^ (Z-3) + 15\6 – (18+Y)MOD 7 – 4

         If X>20 Then

              P = "Big Value"

         Else

              P = "Small Value"

         End If

         If NOT X MOD 4 < Y/(Z – 3) Then

              Q = P

         Else

              Q = "No Value"

         End If

         Display "P = ", P

         Display "Q =", Q

    END

    1.1 Draw a Trace Table using the input values 5 and 6.

    Question 2        

    Vuyo's couriers is a courier company based in East London. They charge customers to courier their parcels based on the weight of the parcel and the distance between East London and the destination. They charge R30 per kilogram for the weight of the parcel. In addition, for the first 50 kms they charge R80. For up to 100kms they charge R120. For more than 100km they charge R200. They do not deliver parcels if the distance is more than 200kms. For parcels weighing more than 2kg they charge an additional R100. The customer must pay 14% VAT on the total amount. Your program must display the total amount without VAT, the VAT amount and the final amount.

    3.1 Draw the IPO chart of the program                                       

    3.2 Draw the flow chart for the program                         

    Question 3

    South African property owners must pay municipal rates according to the market value of their property. XYZ municipality charges different rates for residential property, business property and education institution. The calculation of property tax is as follows:

    Residential Property: The first R 50000 of the market value of the property is exempt from tax. Tax is payable for the balance at a rate of 0.91% for one year.

    Business Property: Tax for one year is calculated at 1.2% of the market value of the property.

    Educational Intuition: Tax for one year is calculated at 0.25% of the market value of the property.

    Divide the yearly tax by 12 to get the tax payable monthly.

    Write a program using pseudocode to prompt for meaningful messages. The program must calculate and display (along with meaningful messages) the monthly tax payable by each owner. The program must repeat this for 100 properties. Finally, the program must display the following.

    • Total tax for all residential properties for one year.
    • Total tax for all business properties for one year.
    • Total tax for all educational institutions for one year.

    Specific instruction: The user enters R for residential property, B for business property and E for educational institution.

    (Extract from) Formative assessment 4 (Test 4)

    Question 1

    ABC is a company that has two types of employees (Draftsman and Supervisor) and their salaries are calculated as follows: A Supervisor earns a basic salary of R3000 a month. In addition to the basic salary, the employee receives R150 for each year of service for up to 5 years of service. If the years of service are above 5, then the amount is R200 for each year above 5 years of service. A draftsman earns a basic salary of R2800 a month. In addition to the basic salary, the employee receives R140 for each year of service up to 3 years of service; for the service above 3 years, the amount of R190 for each year of service above 3 years is paid.

    Your program should receive appropriate data. Thereafter calculate and display (with meaningful messages) the monthly salary of an employee.

  • Draw the flow chart for the program      
  • Write the pseudocode for this program
  • Question 2

    The South African Post Office charges for international parcel a basic charge and an additional charge depending on the weight of the parcel. The following table gives the charge for sending the parcel depending on the zone of the address.

    Zone

    Basic Rate

    Additional Charge
    per 100 gram or part thereof

    Zone A

    R 111.10

    R 3.40

    Zone B

    R 163.80

    R 4.25

    Zone C

    R 163.80

    R 15.30

    Zone D

    R 169.50

    R 14.00

    Zone E

    R 126.10

    R 21.80

    Zone F

    R 210.40

    R 19.50

     2.1 Write a Visual Basic Console Application to accept input, calculate and display (with meaningful messages) the amount charged to send the parcel to the specified location/Zone. The program terminates only when the user enters "ZZZ" for the name of the customer

     


    Copyright (C) 2018 EdUHK APFSLT. Volume 19, Issue 2, Article 16 (Dec., 2018). All Rights Reserved.