cameroon gce advanced level June 2025 computer science 3
cameroon gce advanced level June 2025 computer science 3
SECTION A: DATABASE SYSTEMS
Database design and implementation
An e–commerce company wants to develop a database to manage its data. The database should store information about
customers, orders, products and suppliers.
Customer (CustomerlD, Name, email, Address)
Product (ProductID, Product Name, Price)
Supplier (SupplierlD, SupplierName, Address)
Order (Order Date, Total)
Task 1
1. In your answer booklet, produce an entity relation diagram in 3rd normal form. Underline key fields therein.
(5 marks)
2. Write SQL queries that will enable you to add the column phoneNumber to the table Customer, and
Description to table Product. (2 marks)
3. Use a suitable DBMS of your choice to implement the database design in 1 above; print a copy of your database.
(2 marks)
4. Insert sample data into the tables created and print a copy each of product, customer and order; see the tables below.
(3 marks)
5. Implement SQL queries to perform the following operations, and then copy them into their respective spaces below:
a) Retrieve the names of all customers who have placed an order.
(1 mark)
b) Retrieve the names of all the products that Jane supplied. Use the join operator to obtain your answer.
(2 marks)
(1 mark)
»
c) Print a copy of each query.
d) Retrieve the names of all customers who have ordered a product supplied by Ousman. (3 marks)
t
e) Print a copy of this query. (1 mark)
CustomerlD Customer Name Email Address
001 John Che Johnc@gmail.com Bekora
002 Jane Full Jane@gmail.com Bafang
003 Jane Full Fuh@yahoo.com Bafang
004 Shutang Ben Shutang@hotmail.coni Kejum
Productll) Product Name Supplierll) Price
001 Caps 01 2500
002 Shirts 01 1500
003 Shoes 02 2000
Supplier!!) Supplier Name Address
1 Ousman Njombc
2 Manka’a Sangmclima
3 Ngimfack Banteng
4 Manka’a Sangmclima
Order!I) CustomcrID . Order Date
l | 001 | 20–03–2025 | |
2 | 002 | 25–03–2025 | i |
(30 marks) | SECTION B: PROGRAM DEVELOPMENT |
Using your preferred programming language (PL), C or Pascal, and integrated program development environment
(IDE), carry out the following programming tasks. Note that comments within questions start from a double slash ( / / )
to the end–of–line, or are between / * and * /.
Game of Life Task Description
Conways’ Game of Life (or just “Life”) is a “cellular automaton” which evolves live and dead cells within a grid (or
board) here represented as a 2–D array. Grid cells are either alive or dead and evolve in successive generations as
determined by their neighbours. The neighbours of any given cell are horizontally, vertically or diagonally adjacent to it.
The following rules are applied to the current (or initial) generation of cells in order to obtain the cell values of the next
generation.
1) Any live cell with fewer than two live neighbours dies as if caused by under population.
2) Any live cell with two or three live neighbours lives on to the next generation.
3) Any live cell with more than three live neighbours dies, as if by overpopulation.
4) Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.
For example, Figure 1(a) is a 4–by–4 grid for the initial stage (or current generation) of a “Life” cellular automaton and
Figure 1(b) is the next generation obtained by obeying the above rules.
Initial Stage: | Next Generation: | ||||
1 | 1 | 0 | 0 | I 1 I | 0 I 0 I |
0 0 0 1 0 I 0 I
0 0 I 1 1 0 I 0 I 1 I )
1 I 1 1 I 0 0 I I
I
Figure. 1: (a) Initial Stage (b) Next Generation
Task 2:
We develop program fragments to display and evolve successive generations of “Life” from a 2–D array. Arrays
A [ Row ] [ Col ] and B [ Row ] [Col ] are used to store the current and next generation of the board’s state. Col and
Row are global variables used to store the size of the arrays and are both initially set to 4. You are to develop executable
code from the algorithms given in each subtask. For each subtask, make sure the coding is correctly done
A level 2025 Computer science 3-Copy