/

ComputerScience1 F6 2023

ADVANCED CERTIFICATE OF SECONDARY EDUCATION EXAMINATION

COMPUTER SCIENCE 1

(For Both School and Private candidates)
136/1
Time: 3 Hours Year: 2026

Instructions
  1. This paper consists of sections A and B with a total of ten (10) questions.
  2. Answer all questions from section A, and two (2) questions from section B.
  3. Section A carries seventy (70 marks) and section B carries thirty (30 marks).
  4. Non-programmable calculators may be used.
  5. All writing must be in blue or black ink, except drawings which must be in pencil.
  6. Cellular phones and any unauthorized materials are not allowed in the examination room.
  7. Write your Examination Number on every page of your answer booklet(s).

Section A (70 Marks)

Answer all questions in this section.
  1. A traffic light control system needs to manage the flow of vehicles at an intersection. The system has two inputs: C (Car sensor detects a car) and T (Timer indicates a specific time interval has passed). The output L (Light changes to green for the main road) should be 1 if a car is detected AND the timer has passed its interval, OR if no car is detected but the timer has passed its interval (to prevent indefinite waiting).
    1. Create a truth table that represents the traffic light control system described above. (4 marks)
    2. Use the truth table constructed in 1(a) to generate a simplified Boolean expression for L. (3 marks)
    3. Draw the logic gate circuit for the simplified Boolean expression obtained in 1(b). (3 marks)
  2. Consider the following C++ program segment:
    #include <iostream>
    
    void modifyValue(int& num) {
        num = num * 2;
        std::cout << "Value inside function: " << num << std::endl;
    }
    
    int main() {
        int myValue = 10;
        std::cout << "Original value: " << myValue << std::endl;
        modifyValue(myValue);
        std::cout << "Value after function call: " << myValue << std::endl;
        return 0;
    }
    
    1. Identify the type of parameter passing used for the num variable in the modifyValue function. (2 marks)
    2. Predict the output of the given C++ program segment. (4 marks)
    3. Explain two advantages of using functions in C++ programming. (4 marks)
  3. Assume you are developing a Visual Basic application for a library system.
    1. Describe the purpose of the following Visual Basic properties or events:
      1. Text property of a TextBox. (2 marks)
      2. Click event of a CommandButton. (2 marks)
      3. Visible property of a Control. (2 marks)
    2. Write Visual Basic code that checks if a user-entered password (in a TextBox named txtPassword) is "Admin123". If it matches, display "Access Granted" in a MsgBox; otherwise, display "Access Denied". (4 marks)
  4. Mpanda University is planning to upgrade its campus network infrastructure to support a growing number of students and staff. The current network frequently experiences bottlenecks and slow data transfer speeds.
    1. Explain two benefits of using a Fiber Optic Cable over a Twisted Pair Cable for the university's backbone network. (4 marks)
    2. Differentiate between a hub and a switch, outlining their key operational differences in a network environment. (4 marks)
    3. Suggest a suitable network topology for the main campus building that would offer high reliability and ease of fault isolation. Justify your choice with one reason. (2 marks)
  5. Cybersecurity has become a critical concern for both individuals and organizations.
    1. Differentiate between a virus and a worm, highlighting how they spread and their primary impact on computer systems. (4 marks)
    2. A company's database was recently compromised, leading to the leakage of sensitive customer information. Identify three common causes of data breaches. (3 marks)
    3. Outline three measures a company can implement to protect its databases from unauthorized access and data breaches. (3 marks)
  6. A local business wants to create a simple feedback form on its website where customers can submit their contact details and comments.
    1. Write the HTML code to create a basic form with input fields for "Name", "Email", and a multi-line "Comments" area, along with a "Submit" button. (5 marks)
    2. Using JavaScript, write a function that, when called by the "Submit" button's onclick event, validates that the "Name" and "Email" fields are not empty. If either is empty, an alert box should display "Please fill in all required fields." Otherwise, an alert box should display "Thank you for your feedback!" (5 marks)
  7. Memory hierarchy is crucial for the efficient operation of modern computer systems.
    1. List the six general classes of storage media that make up a typical memory hierarchy, from fastest to slowest. (6 marks)
    2. Explain the concept of "cache memory" and state its primary role in a computer system. (4 marks)

Section B (30 Marks)

Answer two (2) questions from this section.
  1. The widespread adoption of Information Technology (IT) has profoundly impacted various sectors of the economy.
    1. Analyze three opportunities that IT presents for the education sector. (9 marks)
    2. Discuss three challenges that the banking sector might face due to the rapid advancements in IT. (6 marks)
  2. XYZ Solutions is embarking on a project to develop a new inventory management system for a chain of retail stores. As a Systems Analyst, you are tasked with gathering requirements for this new system.
    1. Describe four methods you would use to collect detailed information from stakeholders regarding their needs and expectations for the new system. (12 marks)
    2. Briefly explain the importance of user involvement throughout the System Development Life Cycle (SDLC). (3 marks)
  3. Data structures are fundamental concepts in computer science, used for organizing and storing data efficiently.
    1. Differentiate between static and dynamic data structures, providing an example for each. (6 marks)
    2. Explain three advantages of using arrays as a data structure in programming. (9 marks)