SYSTEMS ANALYSIS AND DESIGN NOVEMBER 2024 PAST PAPERS REVISION
1. Outline four characteristics of an adaptive system in systems development.
- Flexibility – The system can adjust to changes in the environment or business needs.
- Self-Learning – The system can improve its performance over time by learning from previous operations.
- Scalability – It can expand or reduce its capacity to handle varying workloads.
- Resilience – The system can recover from failures or disruptions without significant downtime.
2. (b) Explain two uses of documentation in systems development.
- User Guidance – Helps end-users understand how to operate the system efficiently.
- System Maintenance – Provides developers and IT teams with technical details for troubleshooting and future enhancements.
2. (c) Faith, a system analyst, conducted a problem definition for a system. Explain three reasons for carrying out this exercise.
- Clarifying the Scope – Defines the boundaries and objectives of the system to avoid unnecessary features.
- Identifying Key Issues – Helps in pinpointing the exact problems that the system aims to solve.
- Stakeholder Agreement – Ensures all stakeholders have a common understanding of the system’s purpose before development begins.
2. (d) Daniel used a structured approach during system analysis. Explain three benefits of this approach.
- Better Organization – Breaks down the system into smaller, manageable components for easier development.
- Improved Maintainability – Structured systems are easier to update and modify in the future.
- Error Reduction – A systematic approach reduces the chances of inconsistencies and design flaws.
3. (a) Outline four activities carried out during system maintenance.
- Corrective Maintenance – Fixing errors and bugs in the system.
- Adaptive Maintenance – Modifying the system to accommodate changes in business needs.
- Perfective Maintenance – Improving the system’s performance or user experience.
- Preventive Maintenance – Identifying and fixing potential issues before they cause major problems.
3. (b) Explain two uses of observation as a fact-finding method in systems development.
- Understanding User Behavior – Helps system analysts observe how users interact with existing systems.
- Identifying Process Inefficiencies – Detects operational bottlenecks that may not be obvious in interviews or surveys.
3. (c) A project manager intends to use the PERT chart technique in an ICT project. Explain three disadvantages of this technique.
- Complexity – Creating a PERT chart for large projects with many interdependent tasks can be overwhelming.
- Uncertainty in Estimates – PERT relies on estimated time durations, which may not always be accurate.
- Time-Consuming – Regular updates and adjustments are required as project conditions change.
3. (d) Lawrence developed a logical design for a computer system. Describe three components of this design.
- Data Flow Diagrams (DFDs) – Show how data moves through the system.
- Entity Relationship Diagrams (ERDs) – Represent relationships between different data entities.
- Process Specifications – Define the logic and rules that govern system processes.
4. (a) Outline four challenges of using observation as a fact-finding method in systems development.
- Time-Consuming – Observing users and processes for extended periods can be slow.
- Observer Influence – Users may alter their behavior when they know they are being watched.
- Limited Scope – Some system functions may not be observable, especially internal processes.
- Requires Expertise – The observer must accurately interpret the data collected.
4. (b) An organization carried out user training before implementing a new information system. Explain three benefits the organization will accrue from this training.
- Increased Efficiency – Trained users can operate the system faster and more effectively.
- Reduced Errors – Proper training minimizes mistakes in system operation.
- Higher User Satisfaction – Employees are more comfortable and confident using the system.
4. (c) Distinguish between information technology and information system.
- Information Technology (IT) – Refers to the hardware, software, and networks used to process and store data.
- Information System (IS) – A broader concept that includes IT, people, processes, and policies that manage data to support decision-making.
4. (d) With the aid of a diagram in each case, describe three notations used in a structured chart.
(Since I cannot provide diagrams, here are descriptions instead.)
- Process Symbol – Represents a function or action in a structured chart, usually shown as a rectangle.
- Decision Symbol – Indicates a branching point where different actions occur based on conditions, represented as a diamond.
- Data Flow Symbol – Shows the movement of data between components, represented by arrows.
5. (a) Outline four benefits of carrying out a system user acceptance test in systems development.
- Ensures System Meets Requirements – Confirms that the system works as expected.
- Identifies Last-Minute Errors – Catches defects before full deployment.
- Improves User Confidence – Users are more likely to accept and trust the system.
- Reduces Post-Implementation Issues – Minimizes costly fixes after deployment.
5. (b) Explain each of the following terms as used in project management:
- Milestone – A key event or achievement in a project timeline, such as completing a phase.
- Deliverable – A tangible output or result produced in a project, like a report or software module.
- Critical Path – The longest sequence of dependent tasks that determines the project duration.
5. (c) Differentiate between limited entry and extended entry decision tables.
- Limited Entry Decision Table – Uses only binary (yes/no) conditions to define rules.
- Extended Entry Decision Table – Allows multiple possible values for conditions, offering more flexibility.
5. (d) John developed user documentation during system development. Describe three elements included in this documentation.
- User Guide – Instructions on how to use the system.
- Troubleshooting Section – Common problems and their solutions.
- FAQs – Answers to frequently asked questions by users.
6. (a) Outline four categories of decision support systems (DSS).
- Model-Driven DSS – Uses mathematical models for decision-making.
- Data-Driven DSS – Analyzes large data sets to support decisions.
- Knowledge-Driven DSS – Provides recommendations based on expert knowledge.
- Communication-Driven DSS – Facilitates group decision-making.
6. (b) Describe each of the following components of a system:
- Environment – The external factors influencing a system, such as users, regulations, and market conditions.
- Boundary – The limits defining what is inside and outside the system.
6. (c) Explain three circumstances under which a social feasibility study is most appropriate.
- When System Affects Many People – Ensures public acceptance before implementation.
- When User Adoption is Critical – Helps determine whether users will accept and use the system.
- When Cultural or Ethical Concerns Exist – Identifies potential social resistance or ethical issues.
7. (a) A company generates payslips for its employees using an automated payroll system. The system accepts total hours worked by an employee and computes the gross pay at the rate of 1200 per hour. The system then stores this information in a file. Draw a system flowchart to represent this logic.
(Since I cannot provide a diagram, here is a description of the flowchart’s structure.)
- Start →
- Input Total Hours Worked →
- Calculate Gross Pay (Total Hours × 1200) →
- Store Data in File →
- End
7. (b) Outline two limitations of a data dictionary in system analysis.
- Time-Consuming to Maintain – Requires constant updates as the system evolves.
- Limited Contextual Information – Does not capture system behavior, only data definitions.
7. (c) Explain each of the following types of questions in a questionnaire:
- Open-Ended – Allows respondents to provide detailed answers in their own words.
- Closed-Ended – Provides predefined answer choices for respondents to select from.
7. (d) Explain two circumstances that could lead to the use of focus group discussions during data collection in system development.
- When Gathering User Feedback – Useful for understanding user needs and expectations.
- When Exploring System Improvements – Helps in brainstorming enhancements based on group discussions.
7. (e) Nathan designed a system using a prototype. Explain three types of prototypes he could have used.
- Throwaway Prototype – Built quickly to test ideas, then discarded after gathering feedback.
- Evolutionary Prototype – Continuously refined and improved until it becomes the final system.
- Incremental Prototype – Developed in phases, adding new features over time.
7. (f) Differentiate between instructor-led and self-paced training methods.
- Instructor-Led Training – Conducted by a trainer in a classroom or virtual setting, allowing direct interaction.
- Self-Paced Training – Users learn independently at their own speed using materials such as manuals, videos, or e-learning platforms.
7. (g) Outline four characteristics of Object-Oriented System Development methodology.
- Encapsulation – Bundles data and related functions together.
- Inheritance – Allows reuse of code from existing objects.
- Polymorphism – Enables objects to take different forms based on context.
- Modularity – Divides the system into independent, reusable components.
7. (h) An ICT project exhibited signs of failure attributed to finances. Explain three approaches that could have been used to avert the failure.
- Budget Monitoring – Regularly tracking expenses to prevent overspending.
- Cost Optimization – Identifying ways to reduce costs without compromising quality.
- Seeking Additional Funding – Securing more financial resources from investors or stakeholders.
7. (i) Distinguish between instructor-led and self-paced training methods.
(This question is repeated; refer to answer 7. (f) above.)
7. (j) Figure 1 shows an Entity Relationship Diagram (ERD) for employees in various departments. Use it to answer the following questions:
(Since I don’t have the figure, here are general responses based on common ERD features.)
-
Identify Two Entities in the Figure
- Possible entities: Employee and Department.
-
Describe the Double Line Attribute in the Figure
- A double line attribute usually represents a multi-valued attribute, meaning an entity can have multiple values for that attribute (e.g., an employee can have multiple phone numbers).
-
Describe One Type of Relationship Depicted in the Figure
- A one-to-many relationship (1:M) may exist between Department and Employee, where one department can have multiple employees, but each employee belongs to only one department.
8. (a) Explain two disadvantages of acquiring an information system through leasing methods.
- Long-Term Cost – Leasing may appear cost-effective initially, but in the long run, the total payments may exceed the cost of purchasing the system outright.
- Limited Control – The organization does not have full ownership, meaning customization and modifications may be restricted by the leasing terms.
8. (b) The specifications of an ICT project were noted to be poorly defined. Explain three reasons that could have led to this poor definition.
- Inadequate Stakeholder Involvement – If key users and stakeholders are not involved in the requirements gathering phase, the specifications may not accurately reflect their needs.
- Ambiguous Requirements – Lack of clarity in defining the system’s scope, functionality, and constraints can lead to vague specifications.
- Rapidly Changing Needs – If business needs or technology trends change frequently, it may be difficult to define stable specifications.
8. (c) Distinguish between modelling and network stages in Jackson Structured Programming.
- Modelling Stage – In this stage, the real-world problem is analyzed, and data structures are identified before the coding phase. It focuses on understanding how the data should be structured.
- Network Stage – This stage involves structuring the program logic to match the data model. It deals with defining control structures that will process the modeled data effectively.
8. (d) Sarah used a dataflow diagram (DFD) tool to design a system. Explain three challenges she could have encountered while using DFD.
- Complexity in Large Systems – A large system may have multiple processes, making the DFD too complex and hard to interpret.
- No Control Flow Representation – DFDs do not show the sequence of execution, which can make understanding the logical flow of the system difficult.
- Lack of Standardization – Different designers may interpret DFD symbols and notations differently, leading to inconsistencies.
COMPUTER APPLICATIONS II
1(a) Outline the three steps of the accounting process.
- Recording transactions – Entering financial data into accounts.
- Classifying and summarizing – Organizing data into meaningful categories.
- Financial reporting – Preparing statements for decision-making.
(b) Outline two advantages and two limitations of using Geographic Information System (GIS) applications.
Advantages:
- Enhanced decision-making – Visual representation of data improves analysis.
- Efficient resource management – Optimizes planning and allocation.
Limitations:
- High implementation cost – Requires expensive software and hardware.
- Complexity – Needs skilled personnel for effective use.
(c) Explain the differences between supervised learning and unsupervised learning as used in Artificial Intelligence (AI).
- Supervised Learning – Uses labeled data to train models (e.g., spam detection).
- Unsupervised Learning – Identifies patterns in unlabeled data (e.g., customer segmentation).
(d) Explain each of the following terms as used in Computer Aided Design (CAD) program:
(i) Solid Modelling
Creates 3D objects with volume and mass, allowing real-world simulations.
(ii) Surface Modelling
Defines the outer shape of a 3D object without considering its internal structure.
2 (a) Outline four technical skills that a computer company requires for effective use of a GIS.
- Spatial data analysis – Understanding and interpreting geographic data.
- Database management – Handling large datasets efficiently.
- Programming (Python, SQL, etc.) – Automating GIS functions.
- Cartography and mapping techniques – Designing accurate and readable maps.
(b) Explain two uses of a journal when recording transactions in accounting.
- Records original transactions – Ensures accurate bookkeeping.
- Tracks chronological order – Maintains transaction history for audits.
(c) Describe two benefits gained when AI is used in a word processor to aid in checking spelling and grammar in a document.
- Error reduction – AI suggests corrections, improving document quality.
- Enhanced efficiency – Speeds up proofreading and editing.
(d) Outline three circumstances when customizing a CAD user’s interface such as toolbars, menu bars would enhance productivity.
- Frequent use of specific tools – Custom toolbars improve efficiency.
- Different user preferences – Adjusts settings for individual needs.
- Project-specific needs – Tailors tools for specialized tasks.
3 (a) Outline the function of each of the following groups of commands in the Modify Dimension Style settings of a CAD program:
(i) Lines
Controls dimension line styles and extension line properties.
(ii) Symbols and Arrows
Defines arrow types, tick marks, and marker symbols.
(iii) Text
Adjusts dimension text size, position, and font style.
(b) Explain two ways in which an organisation would make use of a ledger in their accounting procedures.
- Tracks financial transactions – Provides detailed records for each account.
- Supports financial statements – Summarizes data for balance sheets and income statements.
(c) Distinguish between attribute data and spatial data as used in GIS.
- Attribute Data – Descriptive information (e.g., city names, population, land use).
- Spatial Data – Geographical coordinates and locations that define object positions.
(d) A vehicle manufacturing plant has opted to acquire robots to support its operations. Explain the need for each of the following types of robots for the company:
(i) Research Robots
Used for testing and developing new technology before mass production.
(ii) Industrial Robots
Perform repetitive tasks like assembly, welding, and painting to improve efficiency.
4(a) Outline three advantages of using cheques to pay workers’ salaries in an organisation.
- Security – Reduces the risk of theft compared to handling cash.
- Record-keeping – Provides a clear payment history for auditing.
- Convenience – Can be deposited directly into employees’ bank accounts.
(b) State a circumstance that would necessitate the use of each of the following arc-drawing methods in a CAD program:
(i) 3-Point
Used when defining an arc by specifying three distinct points.
(ii) Start, End, Angle
Useful when an arc needs to be drawn with a precise angle measurement.
(iii) Continue
Extends an existing arc while maintaining continuity.
(iv) Start, End, Radius
Creates an arc with a specific radius between two defined points.
(c) Explain two types of remote sensing technologies used in GIS applications.
- Passive Sensing – Uses natural energy sources like sunlight (e.g., satellite imagery).
- Active Sensing – Emits its own energy signals, like LiDAR or radar, to capture data.
(d) Assume you are designing a facial recognition system for a school. Explain two features you would include to ensure confidentiality of students’ data.
- Data Encryption – Protects stored biometric data from unauthorized access.
- Access Control – Restricts system use to authorized personnel only.
5 (a) Outline two benefits of integrating remote sensing data with GIS.
- Improved accuracy – High-resolution satellite images enhance mapping precision.
- Efficient monitoring – Enables real-time tracking of environmental changes.
(b) A college was advised to acquire virtual reality equipment to support teaching and learning. Outline three benefits the college would derive from the technology.
- Immersive learning – Enhances engagement through interactive environments.
- Simulations – Provides hands-on training for practical subjects.
- Remote access – Allows learning without physical presence.
(c) Distinguish between a trade discount and a cash discount as used in accounting.
- Trade Discount – A price reduction given to customers who buy in bulk.
- Cash Discount – A discount offered for early payment of an invoice.
6. (a) Explain the function of each of the following drawing commands as used in a CAD program:
(i) TRIM
Removes unwanted sections of an object by cutting along reference edges.
(ii) OFFSET
Creates parallel copies of lines or shapes at a specified distance.
(iii) FILLET
Joins two lines with a smooth rounded corner.
(b) Explain the function of each of the following in the diagram:
(i) Machine Learning Algorithm
A set of rules that enable computers to learn from data and make predictions.
(ii) AI Model
The trained system that applies learned patterns to process new data.
(c) A geospatial company was tasked by the Ministry of Education with creating a GIS application to track courses offered to trainees by each technical training institution. Explain two technical challenges the company might face when handling the data from the colleges.
- Data inconsistency – Different institutions may use different data formats, making integration difficult.
- Data accuracy issues – Errors in data entry and missing information can affect system reliability.
(d) Explain two reasons why an organisation would maintain a petty cash book alongside the main cash book.
- Eases tracking of small expenses – Reduces complexity in the main cash book by recording minor transactions separately.
- Improves cash control – Prevents misuse by allocating a fixed petty cash amount.
QUANTITIVE METHODS NOV 2024 PAST PAPERS
1. (a) Explain five advantages of using the simple random sampling method in data collection.
- Eliminates bias – Every individual has an equal chance of selection.
- Easy to implement – Requires minimal technical expertise.
- Ensures representativeness – Provides a fair sample from the population.
- Allows statistical generalization – Results can be extended to the entire population.
- Supports probability-based analysis – Facilitates accurate inferential statistics.
2. (a) Explain five differences between correlation analysis and regression analysis.
Correlation Analysis | Regression Analysis |
---|---|
Measures strength and direction of the relationship between two variables. | Establishes a predictive relationship between dependent and independent variables. |
Does not differentiate between dependent and independent variables. | Has a clear distinction between dependent and independent variables. |
Values range between -1 and 1. | Provides an equation for prediction. |
Indicates association but not causation. | Helps in forecasting and decision-making. |
Used for understanding relationships. | Used for making predictions and estimating impact. |
3. (a) Explain five areas of application of the concept of time value of money in business decision-making.
- Investment appraisal – Evaluating projects using NPV and IRR.
- Loan amortization – Calculating loan payments over time.
- Savings and retirement planning – Assessing future value of savings.
- Capital budgeting – Determining long-term investment feasibility.
- Lease vs. buy decisions – Comparing financial impact of leasing vs. purchasing assets.
3. (c) (i) Distinguish between mutually exclusive events and independent events.
- Mutually Exclusive Events – Cannot occur simultaneously (e.g., rolling a die: getting a 2 and a 5).
- Independent Events – Occurrence of one does not affect the probability of the other (e.g., flipping a coin and rolling a die).
3. (c) (ii) Distinguish between union of events and intersection of events.
- Union of Events (A ∪ B) – Probability of either A or B occurring.
- Intersection of Events (A ∩ B) – Probability of both A and B occurring.
6. (a) Explain four properties of a good measure of central tendency.
- Uniqueness – Each dataset should have a single, clear value.
- Simplicity – Easy to understand and compute.
- Stability – Resistant to small data changes.
- Representativeness – Accurately reflects the dataset.
6. (a) Explain four advantages of using the observation method in data collection.
- Direct information – Captures real-time behavior.
- Eliminates respondent bias – No reliance on self-reported data.
- Useful for qualitative research – Helps understand social interactions.
- Does not rely on respondent cooperation – Effective even when subjects are unaware.
OBJECTED ORIENTED PROGRAMMING NOV 2024 PAST PAPERS
1. (a) Outline four operators that cannot be overloaded in C++ programs.
- Scope resolution operator (::)
- Member selection operator (.)
- Pointer-to-member operator (.*)
- Ternary conditional operator (?:)
(b) Explain two functions of a destructor in OOP programs.
- Releases memory – Frees dynamically allocated memory to prevent memory leaks.
- Performs cleanup – Closes files, releases resources, and performs final tasks before an object is destroyed.
(c) Differentiate between multilevel and hierarchical inheritance as used in OOP programs.
- Multilevel Inheritance: A class derives from another derived class, forming a chain of inheritance.
- Hierarchical Inheritance: Multiple classes inherit from a single base class.
2. (a) Outline the role of each of the following input functions:
(i) getline() – Reads an entire line of input, including spaces.
(ii) push_back() – Appends a character to the end of a string.
(iii) pop_back() – Removes the last character from a string.
(iv) peek() – Returns the next character in an input stream without extracting it.
(b) Explain two advantages of using enum data type as used in C++ programs.
- Improves code readability – Uses meaningful names instead of numeric values.
- Prevents invalid values – Ensures only predefined values are used.
(c) Differentiate between virtual base class and abstract class as applied in polymorphism.
- Virtual Base Class: Helps prevent multiple copies of the same base class in a hierarchy.
- Abstract Class: Contains at least one pure virtual function and cannot be instantiated.
4. (a) Explain two properties of abstract data types.
- Encapsulation – Data is hidden and accessed only via defined methods.
- Abstraction – Only essential features are presented, hiding the internal implementation.
(b) Outline four circumstances that necessitate the use of bitwise operators in a C++ program.
- Setting or clearing specific bits in a variable.
- Performing fast arithmetic operations.
- Optimizing memory usage.
- Implementing low-level hardware communication.
(c) Differentiate between smart pointer and wild pointer as used in C++ programs.
- Smart Pointer: Automatically manages memory using RAII (Resource Acquisition Is Initialization).
- Wild Pointer: A pointer that has not been initialized and may point to an unknown memory location.
5. (a) Outline four services provided by the operating system for OOP software.
- Memory management – Allocates and deallocates memory dynamically.
- Process management – Handles execution of multiple OOP programs.
- File management – Provides storage and retrieval of class-based data.
- Security and access control – Restricts unauthorized access to OOP applications.
5. (b) Explain two uses of free store in OOP programs.
- Dynamic memory allocation – Memory is allocated at runtime using
new
anddelete
. - Efficient resource management – Enables handling of large data structures dynamically.
5. (c) Explain two circumstances that necessitate the implementation of hybrid inheritance.
- When combining multiple inheritance and hierarchical inheritance.
- To avoid redundancy and ensure proper data structure organization.
6. (a) Outline four advantages of encapsulation in programming.
- Hides implementation details.
- Prevents unintended data modification.
- Increases code maintainability.
- Supports modular programming.
6. (b) Explain two characteristics of static data members used in C++ programs.
- Shared among all objects of the class.
- Retains its value between function calls.
6. (c) Differentiate between istream class and ostream class as used in C++ programs.
- istream class – Handles input operations (e.g.,
cin
). - ostream class – Handles output operations (e.g.,
cout
).
7. (a) Outline four disadvantages of arrays in programming.
- Fixed size – Cannot grow dynamically.
- Lack of built-in search methods – Requires manual iteration.
- No memory efficiency for sparse data – Wastes memory.
- Cannot store mixed data types.
7. (b) Explain two ways in which comments are applied in C++ programs.
- Single-line comments (
//
) – Used for short explanations. - Multi-line comments (
/* */
) – Used for detailed documentation.
8. (a) Outline four advantages of inheritance in OOP programs.
- Code reuse – Avoids redundancy by reusing existing classes.
- Extensibility – Allows modification without affecting the base class.
- Improves maintainability – Easier to manage related classes.
- Encourages modular programming.
8. (b) Differentiate between sequence containers and associative containers in C++ programs.
- Sequence Containers: Store elements in a linear fashion (e.g.,
vector
,deque
). - Associative Containers: Store elements based on keys (e.g.,
map
,set
).
VISUAL PROGRAMMING NOV 2024 PAST PAPERS
1. (a) Outline four properties of a command button control that may be used to alter its location in a Visual Basic program.
- Left – Specifies the distance between the left edge of the form and the button.
- Top – Determines the vertical position of the button on the form.
- Width – Defines the horizontal size of the button.
- Height – Defines the vertical size of the button.
(b) Distinguish between combo box and option button as used in a Visual Basic program.
- Combo Box: A drop-down list that allows users to select an item from a predefined list or type their own input.
- Option Button: A radio button that allows users to select only one option from a group of choices.
(c) Explain each of the following properties of a text box control used in a Visual Basic program:
(i) Multiline
- Determines whether the text box can accept multiple lines of text.
- True allows multiple lines; False restricts it to one line.
(ii) MaxLength
- Specifies the maximum number of characters a user can enter into the text box.
(iii) Name
- Identifies the text box control by a unique name used in the code to reference the control.
(d) Explain the function of each of the following statements in a Visual Basic program:
(i) Err.Description
- Returns a description of the last runtime error that occurred.
(ii) Err.Raise
- Generates a runtime error manually and assigns an error number.
(iii) Err.Clear
- Clears all error information from the Err object.
2. (a) (i) Outline two statements that can be used to output values in a Visual Basic program.
- MsgBox – Displays a message box with the specified text.
MsgBox "Hello, World!"
- Print – Displays text in a form or debug window.
Print "Welcome to Visual Basic"
2. (a) (ii) Write a program segment that concatenates two strings and displays the results on a message box.
Program Code:
Dim Var1 As String
Dim Var2 As String
Dim Result As String
Var1 = "I am "
Var2 = "happy"
Result = Var1 & Var2 ' Concatenation using "&"
MsgBox Result
Output: “I am happy”
(b) Alex encountered several windows within the development environment of a Visual Basic program. Explain three types of windows he could have interacted with.
- Code Window – Allows writing and editing of code.
- Form Designer – Used to design the user interface by placing controls.
- Properties Window – Displays and allows modifications of control properties.
3. (a) State whether each of the following variable declarations are valid or invalid, giving a reason for your answer:
(i) Dim counter As Integer
- Valid ✅
- Reason: The variable name follows Visual Basic naming rules (letters, numbers, and underscores allowed, but must start with a letter).
(ii) Dim “Total_Sales” As Double
- Invalid ❌
- Reason: Variable names cannot be enclosed in double quotes.
(iii) Dim 2ndPlace As Integer
- Invalid ❌
- Reason: A variable name cannot start with a number.
(iv) Dim firstName As String
- Valid ✅
- Reason: The variable name follows proper naming conventions.
(b) Distinguish between bound controls and unbound controls as used in a Visual Basic program.
- Bound Controls: Controls (e.g., text boxes, labels) linked directly to a database field. They automatically display and update data from the database.
- Unbound Controls: Controls not directly linked to a database. They require manual handling of data (e.g., using code to fetch values).
(c) Explain three advantages of using Active Data Objects (ADO) to connect to a database in Visual Basic programming language.
- Faster Performance – ADO is optimized for speed when accessing and manipulating data.
- Supports Multiple Database Types – Can connect to different databases like SQL Server, MySQL, and MS Access.
- Efficient Record Manipulation – Provides features like batch updates and record navigation.
3. (d) Write a Visual Basic program that calculates the sum of the numbers between 20 and 50, then displays the result on a picture box. Use a Do…While loop statement. Attach the code to a command button.
Program Code:
Private Sub cmdCalculate_Click()
Dim sum As Integer
Dim num As Integer
sum = 0
num = 20
Do While num <= 50
sum = sum + num
num = num + 1
Loop
Picture1.Print "Sum = " & sum
End Sub
This program calculates the sum of numbers from 20 to 50 and displays it in a PictureBox.
4. (a) (i) Outline two advantages of initializing variables before using them in a Visual Basic program.
- Prevents Unexpected Errors – Ensures the variable starts with a known value.
- Improves Readability – Makes code more understandable and predictable.
(ii) Outline four characteristics of event procedures in a Visual Basic program.
- Trigger-Based – Executed when a specific event (e.g., button click) occurs.
- Linked to Controls – Associated with UI elements like buttons, forms, and text boxes.
- Has a Specific Syntax – Starts with
Private Sub
and ends withEnd Sub
. - Can Modify UI or Data – Can change properties, call other functions, or handle errors.
(b) Outline four advantages of using Option Explicit
in a Visual Basic program.
- Prevents Undeclared Variables – Ensures all variables are declared before use.
- Avoids Spelling Mistakes – Reduces errors caused by mistyped variable names.
- Improves Code Readability – Makes debugging easier by enforcing clear declarations.
- Enhances Memory Management – Helps avoid unnecessary variable usage.
(c) Distinguish between a global level variable and a local level variable scope in terms of memory allocation as used in a Visual Basic program.
- Global Variable:
- Declared at the module level using
Public
orGlobal
. - Stored in memory throughout the program’s execution.
- Declared at the module level using
- Local Variable:
- Declared inside a procedure using
Dim
orPrivate
. - Memory is allocated only during the procedure’s execution.
- Declared inside a procedure using
5. (a) Given that the variable string1
stores the string "Favourite lesson"
, write a Visual Basic program that would perform each of the following using a string function:
(i) Display the string "Favourite Lesson"
MsgBox UCase(Left(string1, 9)) & " " & UCase(Right(string1, 6))
- Explanation: The
UCase
function converts text to uppercase.
(ii) Display the length of the variable string1
MsgBox "Length: " & Len(string1)
- Explanation: The
Len
function returns the number of characters in the string.
(iii) Display the last five characters in the string
MsgBox "Last 5 Characters: " & Right(string1, 5)
- Explanation: The
Right
function extracts characters from the right end of the string.
(iv) Remove all spaces from the string
MsgBox "Without Spaces: " & Replace(string1, " ", "")
- Explanation: The
Replace
function removes spaces by replacing" "
with""
.
(v) Reverse the string
Dim reversedString As String
Dim i As Integer
For i = Len(string1) To 1 Step -1
reversedString = reversedString & Mid(string1, i, 1)
Next i
MsgBox "Reversed: " & reversedString
- Explanation: The
Mid
function extracts each character in reverse order.
(b) Distinguish between Menu Editor Toolbar and Menu Editor Context Menu as used in a menu editor in a Visual Basic program.
-
Menu Editor Toolbar:
- A toolbar used to create, modify, and manage menus in a Visual Basic program.
- Provides buttons to add, delete, and arrange menu items.
-
Menu Editor Context Menu:
- A right-click shortcut menu that appears when modifying a menu item in the Menu Editor.
- Provides options for properties like renaming and deleting menu items.
(c) Explain the use of the prefix in each of the following cases:
(i) Prevention of naming conflict
- Explanation: Prefixes help avoid duplicate variable names in large programs by specifying their purpose or location (e.g.,
txtName
for a text box,lblName
for a label).
(ii) Scalability and extensibility
- Explanation: Using consistent prefixes makes it easier to expand a project without confusion. For example, if all database-related variables start with
db_
, new variables follow the same convention.
(iii) Ease of maintenance
- Explanation: A well-defined naming convention allows developers to understand and update the code more easily.
(d) Write a Visual Basic program that displays a message box with the prompt "Are you sure you want to quit?"
using the constants vbExclamation
and vbYesNo
. If the user selects Yes, the form closes. If the user selects No, the background colour of the form changes to green. Attach the code to a form load event.
Program Code:
Private Sub Form_Load()
Dim response As Integer
response = MsgBox("Are you sure you want to quit?", vbExclamation + vbYesNo, "Exit Confirmation")
If response = vbYes Then
Unload Me
Else
Me.BackColor = vbGreen
End If
End Sub
- Explanation:
MsgBox
shows a Yes/No confirmation message.- If
Yes
is selected, the form closes. - If
No
is selected, the background turns green.
6(a) Explain three reasons why one may consider using global variables in Visual Basic programming.
- Accessibility Across Procedures – Global variables can be used throughout the program, avoiding the need to pass them between functions.
- Efficient Data Storage – When multiple procedures need to use the same data, a global variable prevents repeated calculations.
- Simplifies Code – Reduces the need for passing arguments between functions, making the program easier to read.
6. (c) State two differences between passing data by value and passing data by reference as used in a Visual Basic program.
Feature | Pass by Value (ByVal ) |
Pass by Reference (ByRef ) |
---|---|---|
Effect on Original Data | Sends a copy of the data (original remains unchanged). | Sends a reference to the actual data (changes affect original). |
Usage | Used when you want to preserve the original value. | Used when you want to modify the original value. |
Example | Function DoubleValue(ByVal x As Integer) |
Function DoubleValue(ByRef x As Integer) |
7. (a) Explain a circumstance that may necessitate the use of each of the following controls on a Visual Basic programming language.
(i) OLE (Object Linking and Embedding)
- Circumstance: When embedding or linking an external object (e.g., Word document, Excel spreadsheet, or multimedia file) within a Visual Basic form.
- Example: A VB application that needs to display an Excel sheet for data entry.
(ii) Option Button
- Circumstance: When a user must select only one option from a group of choices.
- Example: A gender selection form where the user selects either “Male” or “Female.”
(iii) Frame
- Circumstance: When grouping multiple related controls together for better organization.
- Example: A frame can be used to group radio buttons under a “Payment Method” section in a billing system.
7. (b) Distinguish between data control and data engine as used in a Visual Basic program.
Feature | Data Control | Data Engine |
---|---|---|
Definition | A built-in control in VB used for simple database operations like navigation and record retrieval. | A software component (e.g., ADO or DAO) used for advanced data manipulation and database connectivity. |
Usage | Used for basic data binding in simple applications. | Used for complex database operations like executing queries, transactions, and multiple database connections. |
Example | A VB form using a Data Control to connect to an MS Access table. | Using ADO (ActiveX Data Objects) to fetch and manipulate database records via SQL queries. |
7. (c) Study the following Visual Basic program code segment (assume the variables have been declared appropriately). Use it to answer the question that follows.
(i) Identify the type of error that may occur in the code, giving a reason for your answer.
- Possible Errors:
- Syntax Error: If the code violates Visual Basic’s syntax rules.
- Runtime Error: If it attempts invalid operations (e.g., division by zero).
- Logical Error: If the program runs but produces incorrect results.
(ii) Explain one way of correcting the error.
- Solution: Depending on the error type:
- Syntax Error → Check for missing parentheses, incorrect keywords, or undeclared variables.
- Runtime Error → Handle unexpected inputs (e.g., prevent division by zero using
If denominator <> 0 Then
). - Logical Error → Debug by printing variable values at different steps.
7. (d) To interact with a computer’s file system while building Visual Basic applications, a programmer can use several controls. Explain three controls the programmer is likely to use.
-
File System Object (FSO)
- Used for creating, deleting, and managing files/folders.
- Example:
FileSystemObject.OpenTextFile("C:example.txt")
-
Common Dialog Control
- Used for opening file selection dialogs (e.g., Open, Save, Print dialogs).
- Example: Selecting a file to open in a text editor.
-
Drive, Directory, and File List Controls
- Drive List Box → Shows available drives.
- Directory List Box → Displays folders in a drive.
- File List Box → Lists files in a selected folder.
8. (a) Explain the type of information in each of the following sections of a report control in a Visual Basic program.
(i) Report Header
- Information: Displays general information about the report.
- Example: Report title, company logo, and date.
(ii) Page Header
- Information: Displays repetitive information at the top of each page.
- Example: Column titles or report name.
(iii) Group Header
- Information: Displays labels or headings for grouped data.
- Example: If a report is grouped by department, the group header will contain the department name.
8. (b) Explain three challenges a programmer may experience when using Visual Basic 6.0 programming language to develop an application system.
-
Limited Support for Modern Features
- VB6 is outdated and does not support modern development standards like multi-threading and 64-bit applications.
-
Compatibility Issues
- Many modern operating systems (e.g., Windows 11) have limited support for VB6 applications.
-
Poor Object-Oriented Programming (OOP) Support
- VB6 lacks full OOP features like inheritance, making large applications harder to manage.
8. (c) Write a Visual Basic program that prompts a user to input 7 numeric elements into an array when the form loads. When the command button is clicked, the program allows a user to input a value into a text box to be searched within the array. After conducting the search, the program should indicate whether the number is present in the array and display its index if found. Use the linear search algorithm.
Program Code:
Dim numbers(6) As Integer ' Array to store 7 elements
Dim i As Integer
Private Sub Form_Load()
' Prompt user to enter 7 numbers
For i = 0 To 6
numbers(i) = Val(InputBox("Enter number " & (i + 1) & ":"))
Next i
End Sub
Private Sub cmdSearch_Click()
Dim searchValue As Integer
Dim found As Boolean
Dim index As Integer
searchValue = Val(txtSearch.Text) ' Get search value from text box
found = False
' Linear Search
For i = 0 To 6
If numbers(i) = searchValue Then
found = True
index = i
Exit For
End If
Next i
' Display result
If found Then
MsgBox "Number found at index " & index, vbInformation, "Search Result"
Else
MsgBox "Number not found!", vbExclamation, "Search Result"
End If
End Sub
Explanation:
- On Form Load, the program prompts the user to input 7 numbers into an array.
- When the button is clicked, the user enters a search value.
- A linear search algorithm checks if the number exists in the array:
- If found, displays its index.
- If not found, shows an error message.
DATABASE MANAGEMENT SYSTEMS NOV 2024 PAST PAPERS
1. (a) Explain each of the following data types used in SQL:
(i) CHAR(n)
- A fixed-length character data type that stores exactly
n
characters. - If the actual value has fewer than
n
characters, it is padded with spaces to meet the specified length.
(ii) VARCHAR(n)
- A variable-length character data type that can store up to
n
characters. - Unlike
CHAR
, it does not pad spaces if the value is shorter thann
.
(iii) NVARCHAR(n)
- A variable-length Unicode character data type that can store up to
n
characters. - Used when storing multilingual data, as it supports Unicode characters.
(b) Outline four circumstances that necessitate the use of subqueries in SQL.
- Filtering results dynamically – When the filtering criteria depend on another query’s results.
- Calculating aggregate values – When the main query needs computed values from another set of data.
- Checking existence – Using
EXISTS
orIN
to check if a value exists in another table. - Correlating data between tables – When retrieving data based on conditions that reference another table.
(c) Distinguish between a public key and a private key in data security.
- Public Key: A key that is shared openly and used for encryption.
- Private Key: A secret key used for decryption and known only to the owner.
Public key encryption ensures that anyone can send encrypted messages, but only the private key holder can decrypt them.
2. (a) Outline the meaning of each of the following terms as used in database design:
(i) Aggregation
- A process where one entity acts as a higher-level entity containing one or more lower-level entities.
- Example: In a university database, a “Course” entity can be related to multiple “Students,” but the “Department” entity can aggregate multiple “Courses.”
(ii) Attribute
- A characteristic or property of an entity.
- Example: In a Student entity,
Name
,StudentID
, andAge
are attributes.
(iii) Domain
- The set of valid values that an attribute can hold.
- Example: The attribute “Gender” may have a domain of
{Male, Female, Other}
.
(iv) Entity
- A real-world object that is stored in a database.
- Example: “Student” is an entity, as each student has unique data stored in a table.
(b) Explain the relationship of entities in the following database models with examples:
(i) Hierarchical DBMS
- Uses a tree-like structure with parent-child relationships.
- Example: A company database where one department (parent) can have multiple employees (children).
(ii) Network DBMS
- Uses a graph structure where one entity can have multiple relationships (many-to-many).
- Example: In a university, a student can enroll in multiple courses, and each course can have multiple students.
(c) State three examples of each of the following types of SQL commands:
(i) Data Control Language (DCL)
GRANT
– Gives user permissions.REVOKE
– Removes permissions.DENY
– Prevents users from accessing certain data.
(ii) Transaction Control Language (TCL)
COMMIT
– Saves all changes made in a transaction.ROLLBACK
– Reverts changes if an error occurs.SAVEPOINT
– Creates checkpoints in a transaction to roll back to.
(d) Write SQL statements for the given tasks:
(i) Insert the records into the table:
INSERT INTO Form2 (StudentID, Name, Class, CatScore)
VALUES
(1127, 'Akua', '2E', 70),
(1128, 'Nala', '2E', 81);
(ii) Delete all records where Class is 2E:
DELETE FROM Form2 WHERE Class = '2E';
(iii) Update Jabari’s CatScore to 88:
UPDATE Form2
SET CatScore = 88
WHERE Name = 'Jabari';
(iv) Add a column and insert value for Imani:
ALTER TABLE Form2 ADD ExamScore INT;
UPDATE Form2
SET ExamScore = 70
WHERE Name = 'Imani';
3. (a) Explain the purpose of the following in a database:
(i) Indexing
- Improves query performance by allowing the database to retrieve records faster.
(ii) Referential Integrity
- Ensures relationships between tables remain consistent by preventing deletion or updates of related records.
(b) Explain circumstances that lead to the following anomalies:
(i) Insertion Anomaly
- Occurs when new data cannot be added without existing related data.
- Example: If a database requires a student to be enrolled in a course, but a new student has not yet chosen a course, they cannot be added.
(ii) Update Anomaly
- Occurs when data needs to be updated in multiple places.
- Example: If a student’s address is stored in multiple records, changing their address requires updating all occurrences.
(c) Reasons for using a DBMS instead of a spreadsheet:
- Better data integrity – Ensures consistency across multiple users.
- Handles large volumes – Databases are more efficient for handling thousands/millions of records.
(
4. (a) Benefits of Effective Database Organization
- Efficient Data Retrieval – Well-organized databases allow quick and easy data access.
- Elimination of Redundancy – Reduces duplicate data, saving storage space and improving consistency.
- Enhanced Data Security – Ensures that only authorized users can access or modify sensitive data.
- Improved Data Integrity – Ensures accuracy and consistency of data through validation and constraints.
(b) Explanation of Database Users
- Database Architect – Designs the overall structure of a database, including relationships, tables, and constraints.
- Sophisticated Users – Use complex queries and advanced tools to extract and analyze data (e.g., data analysts).
- Naïve Users – Use pre-built applications or interfaces to interact with the database without knowing SQL.
(c) SQL Statements for Salary Table (Salary (Employee, Salary, Department)
)
- Total salary paid to employees in the Human Resource department
SELECT SUM(Salary) FROM Salary WHERE Department = 'Human Resource';
- Average salary per department
SELECT Department, AVG(Salary) FROM Salary GROUP BY Department;
- Number of employees in each department
SELECT Department, COUNT(Employee) FROM Salary GROUP BY Department;
- Maximum salary in the Marketing department
SELECT MAX(Salary) FROM Salary WHERE Department = 'Marketing';
5. (a) Challenges of Many-to-Many Relationships in Databases
- Data Redundancy – Storing duplicated data can lead to inefficiencies.
- Complex Queries – Retrieving data requires joins, making queries more complex.
- Difficult Integrity Maintenance – Ensuring consistency can be challenging due to multiple references.
- Performance Issues – Large datasets with many-to-many relationships can slow down queries.
(b) Differences Between Distributed and Centralized Databases
Feature | Distributed Database | Centralized Database |
---|---|---|
Storage | Data is stored in multiple locations | Data is stored in a single location |
Access Speed | Faster access for local users | Slower if accessed from distant locations |
Reliability | More reliable (failure in one site does not affect others) | A single point of failure can affect the whole system |
(c) Types of Entities
- Strong Entity – Exists independently and has a primary key (e.g.,
Customer
entity in an online shopping system). - Aggregate Entity – Represents a relationship between multiple entities as a single unit (e.g., an
Order
entity that linksCustomer
andProduct
).
(d) Relational Algebra Output Interpretation
- σ Fees > 4000 (School) → Displays all schools where the fees exceed 4000.
- π SchoolID, SchoolName (σ Position = ‘Not Okay’ (School)) → Displays SchoolID and SchoolName where the position is “Not Okay.”
- ρ (SchoolID, SchoolName, Fees, Status) (School) → Renames attributes of the
School
table to new names.
6. (a) Requirements for Third Normal Form (3NF)
- The database must be in Second Normal Form (2NF).
- No transitive dependencies – A non-key attribute should not depend on another non-key attribute.
- Each non-key attribute should depend only on the primary key.
(b) Effects of Database Transaction Errors
- Logical Errors – Causes incorrect calculations, leading to inaccurate database records.
- System Errors – System crashes can lead to incomplete transactions, resulting in data inconsistency.
(c) Difference Between Multivalued and Derived Attributes
- Multivalued Attributes – An entity can have multiple values for a single attribute (e.g., a
Student
entity having multiplePhone Numbers
). - Derived Attributes – Values are calculated from other attributes (e.g.,
Age
can be derived fromDate of Birth
).
7. (a) Properties of Transactions
- Isolation – Ensures that one transaction does not interfere with another.
- Durability – Ensures that committed transactions remain in the database even after system failure.
(b) Challenges of Having Duplicate Values in a Table
- Data Inconsistency – Leads to errors when updating or deleting records.
- Wasted Storage Space – Duplicate records occupy unnecessary storage.
- Inaccurate Query Results – Reports and analysis may produce incorrect data.
(c) Difference Between DROP
and DELETE
in SQL
- DROP – Completely removes a table, including its structure.
DROP TABLE Customers;
- DELETE – Removes only the records but keeps the table structure.
DELETE FROM Customers WHERE CustomerID = 101;
(d) SQL Queries for Sales Management
- List of all products purchased by Wendy
SELECT ProductName FROM Sales WHERE CustomerName = 'Wendy';
- List of all purchased products sorted in descending order
SELECT ProductName FROM Sales ORDER BY ProductName DESC;
- List of customers who purchased phones and pens
SELECT DISTINCT CustomerName FROM Sales WHERE ProductName IN ('Phone', 'Pen');
8. (a) Purposes of Entity-Relationship Diagrams (ERDs) in Database Design
- Visual Representation – Provides a clear graphical representation of entities and their relationships in a database.
- Database Structure Planning – Helps in designing the structure of a database before implementation.
- Minimizing Redundancy – Identifies relationships that reduce data duplication and improve efficiency.
- Communication Tool – Facilitates discussion between stakeholders, including developers, analysts, and clients.
(b) Explanation of Field Identifiers in Database Design
- Super Key – A set of attributes that can uniquely identify a record in a table.
- Example:
(EmployeeID, NationalID, Email)
is a super key for anEmployee
table.
- Example:
- Composite Key – A primary key consisting of multiple attributes to uniquely identify a record.
- Example:
(StudentID, CourseID)
in anEnrollment
table.
- Example:
- Alternate Key – A candidate key that is not chosen as the primary key.
- Example: In a
Customer
table withCustomerID
(Primary Key) andEmail
, theEmail
field can be an alternate key.
- Example: In a
(c) Explanation of Terms in DBMS
- Database Partitioning – Dividing a large database into smaller, more manageable parts to improve performance and efficiency.
- Example: Splitting a customer database into multiple tables based on regions.
- Database Cluster – A collection of interconnected database servers working together to manage data and provide high availability.
- Example: Multiple database servers sharing the same data for load balancing in a cloud-based system.
(d) Normalization of the Table to 3rd Normal Form (3NF)
Assumption: Let’s say the given table contains columns like GuardID
, GuardName
, HotelID
, HotelName
, TimeSpent
.
Step 1: First Normal Form (1NF)
- Ensure each column contains atomic (indivisible) values.
- Remove duplicate and multi-valued fields.
1NF Table:
GuardID | GuardName | HotelID | HotelName | TimeSpent |
---|---|---|---|---|
G001 | John | H101 | Hilton | 5 hours |
G002 | Mike | H102 | Marriot | 6 hours |
G001 | John | H103 | Serena | 4 hours |
Step 2: Second Normal Form (2NF)
- Ensure that all non-key attributes depend entirely on the primary key.
- Remove partial dependencies by creating separate tables.
Guards Table
GuardID | GuardName |
---|---|
G001 | John |
G002 | Mike |
Hotels Table
HotelID | HotelName |
---|---|
H101 | Hilton |
H102 | Marriot |
H103 | Serena |
Guard_Hotel_Assignment Table
GuardID | HotelID | TimeSpent |
---|---|---|
G001 | H101 | 5 hours |
G002 | H102 | 6 hours |
G001 | H103 | 4 hours |
Step 3: Third Normal Form (3NF)
- Remove transitive dependencies (attributes dependent on non-key attributes).
Since GuardName
depends on GuardID
and HotelName
depends on HotelID
, we have already removed transitive dependencies in 2NF. Therefore, the tables in 2NF are already in 3NF.
Final Normalized Tables in 3NF:
-
Guards Table
GuardID GuardName G001 John G002 Mike -
Hotels Table
HotelID HotelName H101 Hilton H102 Marriot H103 Serena -
Guard_Hotel_Assignment Table
GuardID HotelID TimeSpent G001 H101 5 hours G002 H102 6 hours G001 H103 4 hours