Visual Programming Tutorials Outline
Visual Programming Tutorials Outline
1
TIME/Date TOPIC/SUB TOPIC EXAMPLES/NOTES Extension work
Day 1 Iteration/Loops Ex 6: A program to determine the 4. Write a program to
▪ For Loop factorial of a number. determine the ten terms
▪ while Loop of the Fibonacci series
▪ Practical application of Ex 7: A program to determine the 5. A program to search
looping structures multiplication table for a grade 3 for a number in an array
learner. The program must allow for listing and return the
the input of an integer and display a location of the number.
table basing on that integer. For example, on the
following array:
23, 45, 12, 67, the
program must search for
12 and return location 3.
End of Day 1
End of Day 2
Day 2 Arrays Ex 8: Ten athletes lined up at the 6. Write a program that
20/05/2023 starting point at an international accept 100 student
1-D Arrays athletics tournament. When the names and marks
starting bell was rung, the other through an array. The
director of the competition signalled a program must determine
false start. Some athletes had the highest, lowest and
completed odd distances eg 7 meters average marks and
while others had completed even display them.
distances eg 8 meters. Others had not
moved an inch while some had moved
going backwards to cover a negative
distance. Write a program that
prompts the director to input the
distances covered by each of the ten
athletes. The program must determine
if each of the distance covered is even,
odd, zero or negative. The program
must display the totals of odd, even,
zero and negative distances moved by
the athletes.
Functions and Procedures Ex 9: Create a function for a number 7. Write a recursive long
▪ Procedures guessing game. The function should division function. The
▪ Functions allow the input of an integer as a guess program should accept
▪ Practical application of and compare it with a random number two parameters x and y
applications and that it generates. If the numbers and then display the
procedures match, then a congratulations message result of x/y
▪ Recursion must be shown. The user is given three 8. Create a function that
times to make a correct guess. can be used by banking
Ex 10: Write a recursive factorial personnel to calculate
function. Test your program using n = interest. The application
4. must not allow
borrowing if the interest
is more than 10% of the
principal.
2
TIME/Day TOPIC/SUB TOPIC EXAMPLES Extension work
Day 2 Object Oriented Ex 11: Create the students class 9. Create a class called
Programming template and instantiate it. car. A car had attributes,
▪ Class templates make, engine size, engine
▪ Inheritance number and date of
▪ Polymorphism manufacturing. Engine
▪ Encapsulation number is set by the
▪ Abstraction constructor. Create the
methods of the class.
Create a car called
Tayota that inherits the
features of the base class
Examination Tips
End of Tutorial