SyllabusMine
SyllabusMine
Learning Outcome1
1. Which of the following is NOT a phase in the System Development Life Cycle (SDLC)?
Answer: C) Abstraction
2. Which framework is commonly used with Python for backend development?
Answer: A) Django
3. What does FURPS stand for in requirements gathering?
Answer: A) Functionality, Usability, Reliability, Performance, Supportability
4. Which of the following is an example of a system analysis tool?
Answer: D) UML
5. Which of the following is a key component of system interaction?
Answer: B) Functionality requirements
a) FURPS is an acronym used to describe the phases of the System Development Life Cycle (SDLC).
False
d) A Decision table is a system analysis tool used to represent and analyze complex decision-making scenarios.
True
e) The purpose of system interaction is to define the roles and functions of various components within a system.
True
g) What role does training the team play in backend system improvements?
Training ensures that developers are updated on the latest technologies, security practices, and performance
optimization techniques, which improves overall backend system reliability and performance.
Practical Assessment
Functionality
Usability
Reliability
Performance
Supportability
END
Theoretical Assessment
a) A sequence diagram shows the interactions between objects in terms of the messages exchanged over time.
True
b) An activity diagram portrays the static structure of the system by showing its classes and methods.
False
c) A use case diagram encapsulates the functional requirements of a system by utilizing actors and use cases.
True
d) The composite structure diagram displays the relationships between the parts within a class, focusing on its
internal structure.
True
e) A package diagram is used to describe the dynamic behavior of a system and how objects interact over time.
False
4. What are the main advantages and disadvantages of using UML diagrams in system design?
Advantages:
Disadvantages:
Practical Assessment
Imagine you are a software system designer for a student-owned project. Each student should manage their own
project tasks and progress.
2. Class Diagram:
Classes:
o Student (Attributes: studentId, name; Methods: addTask(), updateProgress())
o Task (Attributes: taskId, description, deadline, status; Methods: updateStatus())
o Project (Attributes: projectId, title, description)
o Mentor (Attributes: mentorId, name)
Relationships:
o Student "works on" Task
o Mentor "guides" Student
o Student "owns" Project
pgsql
CopyEdit
Start
Login Student
Display Task List
If (new task) then
Add Task (description, deadline)
Else
Select Task
Update Task (status)
EndIf
Track Progress
Logout
End
4. Flowchart:
(I can generate an actual flowchart image if you want.)
5. Level 0 Data Flow Diagram (DFD):
Explanation:
The DFD focuses on how data flows during operations (like updates and tracking), while the ERD focuses on how
data is stored in relation to entities.
Decision Tree:
Start → Task Urgency? → Workload? → Deadline Near? → Action
Discussion:
The decision table organizes possible actions based on different conditions, while the decision tree provides a clear
flow for quick decision-making during task prioritization.
Written Assessment
1. A Data Flow Diagram (DFD) is used to represent the flow of data within a system.
True
2. Level 2 DFD is typically the highest level, providing a very broad overview of the system.
False (Level 0 is the highest/most general; Level 2 is more detailed.)
3. Microsoft Office is a preferred tool for creating Data Flow Diagrams.
False (Specialized tools like Visual Paradigm are preferred.)
4. In database design, identifying database objects includes defining tables and their relationships.
True
5. System Design Document (SDD) primarily focuses on the technical aspects of system implementation.
True
6. Use Case Documents are a type of system design documentation.
True
7. The Physical Data Model represents the logical structure of the database.
False (It represents the actual physical implementation, not just logical.)
8. Technical Specification Document (TSD) includes detailed information about the system’s hardware
requirements.
True
Practical Assessment
You are hired to develop the following for the school management system:
Level 1 DFD
Breakdown of major processes:
o Student Enrollment: Handles admissions.
o Attendance Management: Records daily attendance.
o Grading Management: Manages exam scores and reports.
o Communication Management: Allows parents and teachers to communicate.
o Administration Management: Oversees scheduling and reporting.
Tables:
o Students (StudentID, FirstName, LastName, DateOfBirth, Class,
ParentID)
o Teachers (TeacherID, Name, Department, Email)
o Parents (ParentID, Name, ContactInfo)
o Courses (CourseID, CourseName, TeacherID)
o Grades (GradeID, StudentID, CourseID, Grade)
o Attendance (AttendanceID, StudentID, Date, Status)
Relationships:
o A Student belongs to one Parent.
o A Teacher teaches many Courses.
o A Student has many Grades and many Attendance records.
Primary Keys: Each table has a unique primary key (e.g., StudentID, TeacherID).
Foreign Keys:
o Grades.StudentID → Students.StudentID
o Grades.CourseID → Courses.CourseID
o Courses.TeacherID → Teachers.TeacherID
o Students.ParentID → Parents.ParentID
Indexes:
o On StudentID, TeacherID, and CourseID for faster lookup.
Backend Application Development - Learning Outcome 1 End Assessment, properly structured with each
question aligned with its correct answer.
1. The POST HTTP method is typically used to retrieve data from a server. ❌ False ➝ The POST
method creates new resources; GET retrieves data.
2. Middleware in Express.js can be used to modify the request and response objects. ✅ True ➝
Middleware processes requests before passing them to route handlers.
3. A 404 Not Found status code indicates that the requested resource was successfully created. ❌ False
➝ 404 means the resource does not exist.
4. In Express.js, the next() function is used to pass control to the next middleware function in the stack.
✅ True
5. Debugging a RESTful API involves reviewing and updating the API documentation as one of the
steps. ✅ True
6. CRUD operations in Node.js using Express.js include creating, reading, updating, and deleting
resources. ✅ True
14. Postman is a popular tool for testing and documenting APIs. ✅ True
15. Nodemon is a utility tool for Node.js that helps developers during development. ✅ True
16. Node.js is an open-source JavaScript runtime environment that allows developers to execute
algorithm code on the server side. ✅ True
17. Postman is a popular tool for developing and documenting APIs. ✅ True
V: Short Answers
18. What will be performed once you use the following command: ✅ mkdir ubudeheproject → Creates a
new folder named "ubudeheproject"
19.
VII: True/False
20. Dependencies are internal packages or libraries that a Node.js application relies on to perform
various tasks. ✅ True
35. To create a new resource, you typically use the ✅ POST HTTP method.
36. In Express.js, middleware functions can modify the request and response objects, ✅ end the request-
response cycle, and call the next middleware function.
37. Command to install MySQL package in Node.js: ✅ npm install mysql
38. When a server encounters an unexpected issue, it typically responds with ✅ 500 Internal Server
Error
39. To test API endpoints, you can use a tool called ✅ Postman
40. Middleware responsible for logging details of incoming requests: ✅ Logging
41. A resource that does not exist in the database should return ✅ 404 Not Found status code.
42. The status code ✅ 200 OK indicates a request was successful and data is returned.
43. Middleware that handles errors in an Express app: ✅ Error Handling
44. CRUD operations in Node.js require setting up Express endpoints for ✅ Create, Read, Update, and
Delete
45. Method used to update a resource: ✅ PUT
46. An Express server can be started by calling the ✅ listen method.
47. Input validation middleware ensures incoming data ✅ meets necessary requirements.
48. Successful resource creation in a RESTful API returns ✅ 201 Created status code.
49. To connect to MySQL in Node.js, create a ✅ MySQL Connection
50. The ✅ GET method is used to request data from a specified resource.
51. Middleware to parse JSON data in incoming requests: ✅ body-parser
52. When debugging a RESTful API, it is important to ✅ validate input data and monitor network
traffic.
XI: Practical Assessment - API & Database Development for Tela Tech Ltd
Database: Kigali Innovation DB
✅ Table: clients
Names VARCHAR(255)
Sex VARCHAR(10)
Address VARCHAR(255)
Column Data Type
Phone VARCHAR(15)
Email VARCHAR(255)
API Endpoints
✅ Insert client
http
POST /clients
Status Code: 201 Created
✅ Update client
http
PUT /clients/:id
Status Code: 200 OK
✅ Retrieve clients
http
GET /clients
Status Code: 200 OK
✅ Delete client
http
DELETE /clients/:id
Status Code: 200 OK
Error Handling
✅ 404 Not Found → Resource does not exist ✅ 500 Internal Server Error → Server issues
🚀 Outcome: Tela Tech Ltd now has a structured API connected to its database!
1. Which type of encryption uses the same key for both encryption and decryption? ✅ A) Symmetric
Encryption
2. Which algorithm is commonly used for symmetric encryption in Node.js?? ✅ B) AES
3. In asymmetric encryption, which key is used to decrypt the data? ✅ B) Private Key
4. Which Node.js module provides built-in support for cryptographic operations? ✅ C) crypto
5. Which of the following is NOT a use case for hashing? ✅ B) Encrypting large amounts of data
6. What is the output size of a SHA-256 hash? ✅ B) 256 bits
7. Which of the following is a disadvantage of symmetric encryption? ✅ B) Key distribution
8. What does the bcrypt library primarily do? ✅ B) Hash passwords
9. Which encryption method is generally slower? ✅ B) Asymmetric
10. In the context of encryption, what does IV stand for? ✅ A) Initialization Vector
1. Asymmetric encryption uses the same key for both encryption and decryption. ❌ False
2. The Moment.js library in Node.js is primarily used for date manipulation. ✅ True
3. The crypto module in Node.js supports both symmetric and asymmetric encryption techniques. ✅
True
4. Using bcrypt in Node.js automatically handles the addition of salt to the hashing process. ✅ True
5. The package.json file in a Node.js project keeps track of dependencies and their versions. ✅ True
6. Hash functions are reversible. ❌ False
7. Asymmetric encryption is more suitable for bulk data encryption than symmetric encryption. ❌
False
8. A public key can be shared openly while the private key must be kept secret. ✅ True
9. All cryptographic algorithms are equally secure. ❌ False
10. Hashing can be used to securely store passwords. ✅ True
1. Symmetric encryption is typically used for encrypting large amounts of data ✅ A) quickly
2. The ✅ B) crypto module in Node.js supports various cryptographic functions.
3. In ✅ B) asymmetric encryption, a pair of keys (public and private) is used, with one key encrypting
the data and the other decrypting it.
4. The bcrypt library is commonly used in Node.js for securely ✅ A) hashing passwords
5. A ✅ A) 128 -bit key and a 16-byte initialization vector (IV) are generated for AES encryption.
6. Salting is often used to prevent brute-force attacks on hashed passwords. ✅ A) Salting
7. Symmetric encryption is more efficient for encrypting large amounts of data. ✅ A) Symmetric
8. The RSA algorithm is commonly used in asymmetric encryption to generate public and private keys.
✅ B) RSA
9. To store passwords securely, we use hashing, not encryption. ✅ B) Hashing
10. The process of converting plaintext into ciphertext is known as encryption. ✅ C) Encryption
Scenario: Tela Tech Ltd requires secure encryption methods for web applications.
bash
javascript
function encryptData(data) {
const cipher = crypto.createCipheriv("aes-256-cbc", key, iv);
let encrypted = cipher.update(data, "utf-8", "hex");
encrypted += cipher.final("hex");
return encrypted;
}
javascript
function encryptMessage(message) {
return publicEncrypt(publicKey, Buffer.from(message)).toString("hex");
}
function decryptMessage(encryptedMessage) {
return privateDecrypt(privateKey, Buffer.from(encryptedMessage,
"hex")).toString();
}
javascript
javascript
🚀 Outcome: Tela Tech Ltd now has a secure Node.js backend with encryption, password security, and API
protection!
1. What is the primary purpose of unit testing? ✅ b) To validate individual components or functions ➝
Unit testing ensures that each function works correctly in isolation.
2. Which of the following is a popular unit testing framework for Node.js?? ✅ d) Mocha ➝ Mocha is
one of the most widely used testing frameworks for Node.js..
3. Which assertion library is commonly used with Mocha? ✅ b) Chai ➝ Chai provides assertion styles
for Mocha testing.
4. What command is used to install Mocha in a Node.js project? ✅ a) npm install mocha
5. In Chai, which API is used for behavior-driven development (BDD) style assertions? ✅ a) Should
6. What is the main benefit of using the Expect API in Chai? ✅ a) It is simpler to write and understand
7. What is the first step in the unit testing process? ✅ b) Writing the test cases
8. Which tool is commonly used for usability testing? ✅ b) Puppeteer
9. What does the acronym OWASP stand for? ✅ a) Open Web Application Security Project
10. Which of the following is NOT a type of security vulnerability? ✅ c) Unit Testing
11. Which command installs the Chai assertion library? ✅ a) npm install chai
12. What type of testing is Postman primarily used for? ✅ b) API Testing
13. What is the primary function of Puppeteer? ✅ a) Simulate user interactions in web applications
14. In Mocha, which hook runs before all test cases? ✅ a) before()
15. Which is NOT a key benefit of unit testing? ✅ d) Improved network performance
16. What is the purpose of the describe() function in Mocha? ✅ a) To group related test cases
17. Which of the following is a feature of the Chai Expect API? ✅ a) It allows chaining of assertions
18. Which method is used to run tests in Mocha? ✅ b) npm test
19. What is an example of a dynamic analysis tool for security testing in Node.js?? ✅ a) OWASP ZAP
20. Which framework is commonly used to implement security tests in Node.js?? ✅ d) Cypress
21. What is a key benefit of using automated testing tools like Puppeteer? ✅ a) Reduces human error
22. Which command is used to run a collection in Postman? ✅ b) newman run
23. In Mocha, how do you skip a test case? ✅ b) Use it.skip()
24. Which of the following is an example of a static analysis tool? ✅ a) ESLint
25. What is a common use case for Chai’s should API? ✅ a) Writing test assertions in a more natural
language style
a) Mocha ✅ 1. JavaScript
b) Junit ✅ 3. Java
c) PyTest ✅ 2. Python
d) RSpec ✅ 4. Ruby
1. Unit testing is primarily conducted to ensure that ✅ individual components or functions work as
expected.
2. In Chai, the ✅ Expect API allows for natural language assertions.
3. The Mocha testing framework uses the ✅ describe() method to group related tests.
4. Usability testing is important because it helps identify issues with ✅ user experience and interface
design.
5. A common vulnerability in web applications, where an attacker can inject SQL queries, is known as
✅ SQL Injection.
6. Postman is commonly used to ✅ test API endpoints and automate testing.
7. Puppeteer allows developers to ✅ automate user interactions in a headless Chrome browser.
8. In security testing, ✅ penetration testing is used to identify potential vulnerabilities before an
attacker can exploit them.
9. Node.js applications should always use ✅ SSL/TLS encryption to ensure data is transmitted
securely.
10. A test case in unit testing is designed to ✅ validate a specific function or feature.
IV: Practical Assessment - API & Security Testing for TelaTech Ltd
Database: Kigali Innovation DB
✅ Table: clients
Names VARCHAR(255)
Sex VARCHAR(10)
Address VARCHAR(255)
Phone VARCHAR(15)
Email VARCHAR(255)
API Endpoints
✅ Insert client
http
POST /clients
Status Code: 201 Created
✅ Update client
http
PUT /clients/:id
Status Code: 200 OK
✅ Retrieve clients
http
GET /clients
Status Code: 200 OK
✅ Delete client
http
DELETE /clients/:id
Status Code: 200 OK
Error Handling
✅ 404 Not Found → Resource does not exist ✅ 500 Internal Server Error → Server issues
Testing Tasks
1️Use Postman for usability testing on APIs 2️⃣ Use Puppeteer for frontend automation testing 3️⃣ Use Mocha
& Chai for unit testing of endpoints 4️⃣ Monitor test results for API performance 5️⃣ Implement security
testing in Node.js 6️⃣ Perform penetration testing using OWASP ZAP
🚀 Outcome: TelaTech Ltd now has well-tested APIs, with usability validation and security enhancements
implemented!
Written Assessment
1. In a CI/CD pipeline, tools like _____________ are used to automate the testing and deployment
process.
o Answer: a) Jenkins
2. To manage environment variables and sensitive information like API keys in a Node.js application,
you should use _____________.
o Answer: c) Environment Variables
3. Before deploying a Node.js application, it is essential to install all necessary modules using
_____________.
o Answer: b) npm install
4. The command pm2 start index.js is used to _____________ the application using PM2.
o Answer: c) Start
5. For secure file transfer to a server, tools like _____________ can be used.
o Answer: b) SCP
1. Node.js is a runtime environment that allows you to run JavaScript on the server side.
o Answer: True
2. Continuous deployment means that every change that passes the automated tests is deployed to
production automatically.
o Answer: True
3. Docker is a version control system used for managing Node.js application code.
o Answer: False
4. PM2 is used for managing and monitoring Node.js applications in production.
o Answer: True
5. SCP is used to manage Node.js dependencies and packages.
o Answer: False
6. In a CI/CD pipeline, Jenkins can be used to automate the deployment of a Node.js application.
o Answer: True
7. Environment variables are used to store sensitive information, such as API keys, in a Node.js
application.
o Answer: True
8. A webserver is responsible for storing and retrieving data in a Node.js application.
o Answer: False
Practical Assessment
or using PM2:
Maintenance Plan:
END
Mobile App
Mobile App
Learning outcome 1
1. Dart supports both static and dynamic data types, allowing for flexibility in variable declaration.
o True
2. In Dart, variables must be declared with a type before they can be used.
o False (Type inference is allowed using var or dynamic.)
3. Dart provides standard control flow structures like if, else, for, and switch.
o True
4. In Dart, functions are first-class citizens, meaning they can be assigned to variables and passed as
arguments.
o True
5. Dart can only be used for developing web applications and is not suitable for native app development.
o False
III. Fill in the blanks using the correct term (Class, Encapsulation, Polymorphism, Inheritance, Abstraction,
Object)
Project Objective:
Develop a cross-platform mobile application for smart home control using Dart and Flutter.
Requirements:
Tool Setup:
o Install Flutter SDK and Dart.
o Configure Android Studio or VS Code.
o Set up an emulator or physical device.
Dart Concepts and OOP:
o Use Dart variables, data types, functions, and control flow.
o Apply OOP principles (encapsulation, inheritance, polymorphism, abstraction).
App Features:
o Device on/off toggles.
o Real-time monitoring dashboard.
o Room-specific control widgets (e.g., temperature, lights).
Library & Package Usage:
o Use http for API calls.
o Use provider or riverpod for state management.
o Use flutter_switch or fluttertoast for UI enhancements.
Deliverables:
LEARNING OUTCOME 2
A. Flutter is an open-source UI software development kit (SDK) created by Google. Its primary purpose is to allow
developers to build natively compiled applications for mobile, web, and desktop from a single codebase.
B. A widget in Flutter is the basic building block of the Flutter UI. Everything in Flutter is a widget, including
layout structures, elements, and animations.
C. The lifecycle of a Stateful widget includes methods such as createState, initState, and build.
D. To check if everything is properly installed after setting up the Flutter SDK, you run the command: flutter
doctor.
E. The Navigator widget is used to navigate between different screens in Flutter.
Project Objective:
Develop a basic task management app using Flutter.
App Requirements:
Tool Setup:
o Install Flutter SDK.
o Set up development IDE (Android Studio or VS Code).
o Create and run a new Flutter project.
Core Features:
o Add new tasks.
o View task list.
o Mark tasks as complete/incomplete.
o Delete tasks.
Widget Usage:
o Use TextField, ListView, Checkbox, ElevatedButton, and Card widgets.
o Apply layout widgets like Column, Row, Padding, Expanded.
State Management:
o Use setState() for basic local state.
o Optional: Implement Provider for global state.
UI Enhancements:
o Use pre-designed widgets (ListTile, AppBar, FloatingActionButton).
o Add basic animations and responsiveness.
Deliverables:
LEARING OUTCOME 3
📘 Theoretical Assessment
1. Which HTTP method is primarily used to create a new resource on the server?
✅ B) POST
2. What is the primary purpose of the PUT method in RESTful APIs?
✅ B) Update an existing resource
3. Which of the following is essential for securely handling user authentication in a mobile application?
✅ C) Utilizing HTTPS for API calls
4. What is the purpose of the PATCH method in RESTful services?
✅ B) Update part of a resource
II. True or False – Answer the following statements
1. Data integrity refers to the protection of data from unauthorized access and modifications
✅ False
(Data integrity is about accuracy and consistency. Unauthorized access relates to security.)
2. Using encryption is a common practice to enhance security standards for data stored in a database
✅ True
3. Regular audits and monitoring are not necessary for maintaining data integrity in a backend system
✅ False
4. Security standards such as GDPR and HIPAA help organizations ensure the confidentiality and
integrity of sensitive data
✅ True
5. Implementing strong access control measures can help maintain both data integrity and security in a
backend application
✅ True
III. Fill in the blanks (Choose from: Logging, Breakpoints, Codebase, Assertion, Debug, Isolation)
1. In software development, a codebase is the collection of source code used to build a software program.
2. The process of identifying and fixing bugs in your application is known as debug.
3. Logging is the practice of recording information about the execution of a program to help diagnose issues.
4. In testing, isolation refers to the practice of running tests in a way that ensures they do not affect each
other.
5. A(n) assertion is a statement used in programming that checks if a condition is true, often used in testing.
6. Developers use breakpoints to pause the execution of a program at a specific line of code to examine the
state of the application.
🛠 Practical Assessment
Objective:
Build a mobile application that uses backend integration for managing user data and improving user experience.
The app must implement full HTTP support, debugging, testing, and follow microapp architecture for scalability.
✅ Requirements:
📂 Deliverables:
LEARING OUTCOME 4
1. The two main types of builds in mobile app development are Debug Build and Release Build.
✅ Debug is used during development; Release is used for production.
2. The APK file format is used to package Android applications for distribution on the Google Play Store.
✅ .apk is the standard Android app packaging format.
3. In iOS development, the final app package is typically distributed as an IPA file.
✅ .ipa stands for iOS App Store Package.
4. The process of App Store Optimization (ASO) involves optimizing the app's listing to improve visibility
and attract more downloads.
✅ ASO improves discoverability of an app in store search.
5. A developer must register with the Apple Developer Program to publish apps on the Apple App Store.
✅ Registration is required for access to app submission tools.
6. To monitor application performance and user experience, developers can use tools like Firebase and
Sentry.
✅ These tools offer real-time monitoring and crash reporting.
7. After deployment, issues related to compatibility problems can arise if the app is not compatible with
certain devices or operating system versions.
✅ Compatibility problems can affect app functionality post-deployment.
Nosql Database
1. What is a key feature of NoSQL databases? ✅ c) Horizontal scaling ➝ NoSQL databases scale out by
distributing data across multiple servers instead of vertically upgrading a single machine.
2. In MongoDB, what is a collection? ✅ a) A group of documents ➝ Collections are groups of related
JSON-like documents, similar to tables in relational databases.
3. Which term refers to the process of storing and retrieving data without fixed schemas? ✅ c) NoSQL
➝ NoSQL databases allow flexible schemas, unlike relational databases that enforce strict table structures.
4. What is MongoDB's equivalent of a table in relational databases? ✅ d) Collection ➝ Collections
store documents just like tables store rows.
5. Which of the following is a benefit of using MongoDB's indexing feature? ✅ b) Faster data retrieval
➝ Indexing improves query performance by making data access efficient.
6. Which type of NoSQL database does MongoDB fall under? ✅ d) Document ➝ MongoDB is a
document-oriented database storing structured JSON-like documents.
7. What does optimistic locking help prevent in MongoDB? ✅ c) Simultaneous updates from
overwriting data ➝ Optimistic locking prevents data conflicts when multiple users try to modify a
document.
8. Which tool is used to interact with MongoDB in a shell environment? ✅ b) Mongosh ➝ Mongosh is
MongoDB’s official command-line interface.
9. In requirement analysis for a NoSQL database, what is the first step? ✅ b) Identify Key
Stakeholders and End-Users ➝ Understanding the users and their needs is the first step in designing a
database.
10. Which of the following describes the scalability of MongoDB? ✅ c) Supports horizontal scaling
across distributed systems ➝ MongoDB scales across multiple nodes using sharding.
1. NoSQL databases are always schema-less and cannot enforce any structure on the data. ❌ False
(MongoDB supports schema validation).
2. MongoDB stores data in the form of tables similar to relational databases. ❌ False (MongoDB stores
collections and documents instead of tables).
3. In MongoDB, documents within the same collection can have different structures. ✅ True
4. Indexing in MongoDB can improve the performance of read operations by making data retrieval
faster. ✅ True
5. Optimistic locking prevents other users from accessing a document while it is being edited. ❌ False
(Optimistic locking allows access but prevents overwrites).
6. In MongoDB, relationships between documents can be modeled by embedding documents or
referencing them. ✅ True
7. Collections in MongoDB always require a predefined structure for documents. ❌ False (Collections
are schema-flexible).
8. MongoDB Atlas is a cloud-based solution that automates the deployment and scaling of MongoDB
databases. ✅ True
9. In the requirements analysis process for a NoSQL database, identifying key stakeholders and end-
users is the first step. ✅ True
10. MongoDB's Compass environment is a command-line tool used for database management. ❌ False
(Compass is a GUI tool, whereas Mongosh is CLI).
1. What is NoSQL? ➝ A type of database designed for flexibility, scalability, and performance by
avoiding rigid schemas found in SQL-based systems.
2. What is MongoDB and how does it work? ➝ MongoDB is a NoSQL document database that stores
JSON-like documents in collections, providing high availability, indexing, and replication.
3. What is meant by Availability in a NoSQL context? ➝ Ensuring data remains accessible even during
failures through replication and fault-tolerant architecture.
4. What is a Document in MongoDB? ➝ A JSON-like object that holds structured data, similar to rows in
relational databases.
5. What is a Collection in MongoDB? ➝ A logical grouping of documents, similar to tables in relational
databases.
6. How does Indexing work in MongoDB? ➝ Indexes improve query speed by optimizing data retrieval.
Example:
javascript
db.users.createIndex({ age: 1 })
7. How are Relationships managed in NoSQL databases like MongoDB? ➝ Two ways: Embedding
(nested documents) or Referencing (foreign keys-like IDs).
8. What is a Data Model in NoSQL? ➝ A schema design pattern that determines how data is stored and
accessed.
9. What is a Schema in NoSQL databases? ➝ Defines data structure, even though NoSQL databases are
schema-flexible.
10. How are user requirements identified for a database? ➝ By interviewing stakeholders, understanding
data needs, and defining scalability & performance goals.
bash
bash
bash
mongosh
javascript
use ecommerce_db
javascript
db
🚀 Outcome: The Cybercafé now has a MongoDB infrastructure ready for use!
Theoretical Assessment: NoSQL & MongoDB
Here are the questions aligned with their correct answers for better understanding.
1. Which of the following is a tool used for drawing NoSQL databases? ✅ b) Edraw Max ➝ Edraw
Max is widely used for database diagramming, including ERDs for NoSQL.
2. What is the first step in installing Edraw Max? ✅ b) Download the installer from the official website
➝ The software must first be downloaded before installation.
3. In MongoDB, what is a 'collection'? ✅ b) A group of related documents ➝ Collections store multiple
documents in a schema-flexible way.
4. Which diagram is commonly used to model entity relationships in databases? ✅ b) UML Class
Diagram ➝ UML class diagrams help visualize how entities relate to each other.
5. What does 'sharding' refer to in a NoSQL database like MongoDB? ✅ b) Horizontal partitioning of
data across multiple servers ➝ Sharding splits large datasets across multiple servers for scalability.
6. Which of the following diagrams helps visualize how data flows through a system? ✅ c) Data Flow
Diagram (DFD) ➝ DFDs represent how data moves between entities.
7. What should be considered when designing a conceptual data model? ✅ c) The high-level entities
and their relationships ➝ A conceptual model focuses on entities, attributes, and relationships.
8. What is the primary goal of schema normalization in MongoDB? ✅ b) Ensure minimal data
redundancy ➝ Normalization prevents duplicate data storage, making queries efficient.
9. Which factor should be considered when defining a collection structure in MongoDB? ✅ b)
Application workload and access patterns ➝ Schema design should support efficient querying and
indexing.
10. Which MongoDB design pattern is commonly applied for managing relationships between
documents? ✅ b) Embedding and Referencing ➝ MongoDB supports embedding (nested data) and
referencing (foreign keys-like structures).
1. What are some popular NoSQL database drawing tools? ✅ Edraw Max, Draw.io, Lucidchart,
ERDPlus, and MySQL Workbench.
2. How do you install Edraw Max for database drawing? ✅ Download the installer → Run the setup →
Follow the installation steps.
3. What are collections in MongoDB, and how do you identify them in a conceptual data model? ✅
Collections are groups of documents, similar to tables in relational databases.
4. How do you model entity relationships in a NoSQL database? ✅ Using ERDs (Entity Relationship
Diagrams) and defining embedded or referenced documents.
5. What is sharding, and how is it applied in MongoDB? ✅ Sharding splits data across multiple
servers, ensuring efficient query execution.
6. What is replication in MongoDB? ✅ Replication creates copies of data on multiple servers for
availability.
7. How do you visualize a high-level data model in a database design? ✅ Using ERDs, UML diagrams,
and Data Flow Diagrams (DFDs).
8. How would you design a conceptual data model for an e-commerce website using MongoDB? ✅
Define collections like Users, Orders, Products, and Payments, modeling relationships
properly.
9. How do you identify the application workload for MongoDB schema design? ✅ Analyze queries,
indexing needs, and read/write operations.
10. What are common schema design patterns used in MongoDB? ✅ Embedding, Referencing,
Extended Reference, and Bucket Pattern.
Practical Assessment: Entity Relationship Diagram (ERD) for ABC Network Company
Steps to Draw the ERD
Salesperson
Customer
Order
Inventory Item
Part
Employee
Supplier
Use rectangles for entities (Salesperson, Customer, Order, Inventory Item, Part, Employee, Supplier).
Use diamonds for relationships (One-to-Many, Many-to-Many).
Define Primary Keys (PK) in each entity.
Define Foreign Keys (FK) for relationships.
🚀 Outcome: ABC Network Company now has a structured ERD for effective database implementation!
Below is a structured answer key aligned with each question for better understanding.
3. Replica Set ✅ C. A group of MongoDB instances that maintain the same dataset for high availability.
8. Mongo Shell ✅ D. A graphical interface for interacting with the database using commands.
9. Capped Collection
E. A storage structure that overwrites its oldest entries when a size limit is reached.
✅
G. A format used to represent data in MongoDB that supports more data types than
10. BSON ✅
JSON.
use healthSyncDB
Step 2: Define Collections
javascript
db.createCollection("patients")
db.createCollection("appointments")
db.createCollection("medicalRecords")
db.createCollection("billing")
Step 3: Insert Sample Data
javascript
db.patients.insertOne({
name: "John Doe",
age: 35,
address: "123 Health St",
phone: "123-456-7890",
email: "[email protected]",
medicalHistory: ["Diabetes", "High Blood Pressure"]
})
Step 4: Optimize Queries with Indexing
javascript
db.patients.createIndex({ email: 1 })
db.appointments.createIndex({ patientId: 1, date: 1 })
Step 5: Enable Replication for High Availability
javascript
rs.initiate()
Step 6: Implement Aggregation for Reporting
javascript
db.appointments.aggregate([
{ $group: { _id: "$doctorId", totalAppointments: { $sum: 1 } } }
])
🚀 Outcome: HealthSync now has a fully optimized MongoDB database, ready for improved query
performance and scalability!
Below is a structured answer key aligned with each question for better understanding.
1. What is the primary role of database users? ✅ c) To access and manipulate data ➝ Database users
interact with stored information, performing read, write, and update operations.
2. Which command is used to create a new user in MongoDB? ✅ a) db.createUser() ➝ The
db.createUser() command is used to assign roles and privileges to users.
3. What is the purpose of roles in MongoDB? ✅ b) To define user permissions and privileges ➝ Roles
grant access control over specific database operations.
4. Which of the following is a method to enforce authentication in a database? ✅ d) Creating a user
account with a password ➝ Authentication restricts unauthorized access by requiring valid credentials.
5. What does role-based access control (RBAC) in MongoDB allow administrators to do? ✅ c) Assign
specific roles to users based on their job functions ➝ RBAC ensures users can only perform
operations necessary for their role.
6. Which of the following methods helps protect sensitive data in a database? ✅ b) Enabling data
encryption ➝ Encryption ensures stored data remains secure and unreadable without authorization.
7. What is the purpose of auditing system activity in a database? ✅ b) To track changes and access to
the database ➝ Auditing helps detect potential breaches and security issues.
8. Which deployment option involves hosting the database on physical servers owned by the
organization? ✅ c) On-Premises ➝ On-premises databases are stored on an organization’s internal
servers.
9. Which MongoDB cluster architecture consists of a primary node and multiple secondary nodes? ✅
b) Replica Set ➝ Replica sets ensure high availability by maintaining copies of data.
10. What is the primary benefit of scaling MongoDB with sharding? ✅ c) Increased database
availability and performance ➝ Sharding distributes data across multiple servers, reducing overload
and increasing efficiency.
1. The primary role of database users is to manage server hardware and configuration. ❌ False
(Database users interact with stored data, not manage hardware).
2. A user in MongoDB can be created using the command db.createUser() with specific roles assigned.
✅ True
3. Roles in a database are used to assign privileges and control what actions users can perform. ✅ True
4. Enforcing authentication in a database is optional and does not significantly impact security. ❌ False
(Authentication is critical for database security).
5. Role-Based Access Control (RBAC) allows different users to have different permissions based on
their roles within the organization. ✅ True
6. Data encryption ensures that sensitive information in the database is protected from unauthorized
access. ✅ True
7. Auditing system activity in a database is only necessary during the initial setup and not needed
afterward. ❌ False (Ongoing auditing is essential for security monitoring).
8. On-premises deployment of a database means that the database is hosted on the organization's
physical servers. ✅ True
9. A MongoDB sharded cluster allows for horizontal scaling by distributing data across multiple
servers. ✅ True
10. A replica set in MongoDB consists of only one primary node and no secondary nodes. ❌ False (A
replica set includes one primary node and multiple secondary nodes).
1. What is the primary responsibility of database users? ✅ Access and manipulate data, ensuring
smooth database operations.
2. Which command is used to create a new user in MongoDB? ✅ db.createUser()
javascript
db.createUser({
user: "adminUser",
pwd: "securePassword123",
roles: [{ role: "readWrite", db: "financialDB" }]
})
3. How are roles and privileges managed in a database? ✅ Using Role-Based Access Control (RBAC),
granting users permissions based on roles.
4. What is the purpose of enabling access control in a database? ✅ To prevent unauthorized actions
and improve security by restricting data access.
5. What is Role-Based Access Control (RBAC)? ✅ A security mechanism that assigns permissions to
users based on predefined roles.
6. Why is data encryption important in database security? ✅ To prevent unauthorized access to
sensitive data by encoding information.
7. What is the significance of auditing system activity in a database? ✅ Tracks changes, helps detect
unauthorized access, and improves security.
8. What does an on-premises database deployment involve? ✅ Hosting a database on physical
infrastructure owned by the organization rather than the cloud.
9. Describe the difference between a replica set and a sharded cluster in MongoDB. ✅ Replica Set:
Provides high availability using multiple copies of data. ✅ Sharded Cluster: Distributes data across
multiple servers for scalability.
10. How does sharding improve the performance of a MongoDB database? ✅ By distributing large
datasets across multiple servers, reducing query load per instance.
javascript
db.createUser({
user: "analystUser",
pwd: "securePass",
roles: [{ role: "read", db: "financialDB" }]
})
Step 2: Implement Role-Based Access Control (RBAC)
javascript
javascript
function encryptData(data) {
const cipher = crypto.createCipheriv(algorithm, key, iv);
let encrypted = cipher.update(data, "utf8", "hex");
encrypted += cipher.final("hex");
return encrypted;
}
javascript
javascript
db.setProfilingLevel(2)
🚀 Outcome: The financial company now has secure user roles, encrypted data, disaster recovery measures,
and audit tracking in place!
PHP
Learning outcome 1
I. Read the following statement related PHP programming and choose the correct letter that corresponds to
the correct answer:
II. Complete the following sentences with appropriate terms used in PHP Programming:
1. To define a function in PHP, you use the function keyword, followed by the function name and
parentheses.
2. To return a value from a PHP function, you use the return statement.
3. To call a function and pass an argument by reference, you use the & symbol before the parameter in the
function definition.
III. Read the following statement related to PHP programming and write the letter corresponding to the
correct answer:
PHP OOP
Answer Explanations
Concepts
B. The practice of hiding the internal implementation details of a class and only
B 1. Encapsulation
exposing the necessary parts of it.
A. The process of creating a new class based on an existing class, allowing the new
A 2. Inheritance
class to inherit properties and methods from the parent class.
C. The ability of different classes to be treated as instances of the same class through a
C 3. Polymorphism
common interface, even though they may behave differently.
D 4. Abstraction D. A special method that is automatically called when an object is instantiated.
Practical Assessment
Task:
DSG Ltd is a company that sells smartphones, tablets, and other digital devices. They need a simple web-based
inventory management system without using a database (using PHP arrays instead).
Solution Outline:
<?php
// Sample Product List
$products = array(
array("id" => 1, "name" => "iPhone 14", "stock" => 10),
array("id" => 2, "name" => "Samsung Galaxy Tab", "stock" => 5),
array("id" => 3, "name" => "Huawei MatePad", "stock" => 7)
);
// Display Products
echo "<h2>Product Inventory</h2>";
echo "<table border='1' cellpadding='10'>";
echo "<tr><th>ID</th><th>Name</th><th>Stock Available</th></tr>";
foreach ($products as $product) {
echo "<tr>";
echo "<td>" . $product['id'] . "</td>";
echo "<td>" . $product['name'] . "</td>";
echo "<td>" . $product['stock'] . "</td>";
echo "</tr>";
}
echo "</table>";
?>
Features:
Notes:
For a fully dynamic version, you would create forms and capture user inputs to modify the array during the
session.
No database needed.
End of Assessment
Below is a structured answer key aligned with each question for better understanding.
1. What is the primary purpose of user authentication? ✅ c) To confirm the identity of a user ➝
Authentication verifies that a user is who they claim to be.
2. Which PHP function is used to hash passwords securely? ✅ c) password_hash() ➝ password_hash()
securely hashes passwords using bcrypt or Argon2.
3. Which of the following is NOT a common role in a role-based access control system? ✅ b)
Moderator ➝ Common roles include Admin, Editor, Viewer, but "Moderator" is not standard in role-
based access control.
4. What is a common method to prevent SQL injection attacks? ✅ b) Use of prepared statements ➝
Prepared statements prevent SQL injection by separating queries from user input.
5. Which PHP function is used to verify a password against a hashed value? ✅ a) password_verify() ➝
password_verify() compares a plain text password with its hashed version.
6. What is the main difference between authentication and authorization? ✅ b) Authentication verifies
identity, while authorization determines what a user can do.
7. What is a session fixation attack? ✅ b) An attack that involves creating a fake session to impersonate
a user. ➝ Session fixation forces a user to use a predefined session ID, allowing attackers to hijack
sessions.
8. Which HTTP method is typically used for user login forms? ✅ b) POST ➝ POST requests safely
send user credentials to the server.
9. What should be done to enhance session security in PHP? ✅ a) Use session cookies with the Secure
and HttpOnly flags. ➝ This prevents session hijacking and cross-site scripting (XSS) attacks.
10. Which of the following is a common technique to protect against Cross-Site Request Forgery
(CSRF)? ✅ b) Implementing CSRF tokens ➝ CSRF tokens prevent malicious form submissions from
unauthorized sources.
11. Which of the following is a purpose of using a database connection driver in PHP? ✅ b) To enable
PHP scripts to communicate with a database server.
12. When using the PDO (PHP Data Objects) extension for database connections, which of the following
statements is true? ✅ b) PDO provides a unified API for accessing various database management
systems. ➝ PDO supports multiple database systems, making it flexible.
13. Which PHP function is used to execute an SQL query that inserts a new record into a MySQL
database using the MySQLi extension? ✅ A) MySQLi_query()
14. Which method is used to update an existing record in a database using PDO in PHP? ✅ C)
PDO::prepare()
15. Which of the following PHP functions is commonly used to prevent SQL Injection by escaping
special characters in a query string? ✅ B) MySQLi_real_escape_string() ➝ Escapes characters,
preventing SQL injection attacks.
16. To protect against Cross-Site Scripting (XSS) attacks, which function should be used to convert
special characters to HTML entities in user-generated content before outputting it to the browser?
✅ A) htmlspecialchars()
17. Which PHP function can be used to set a custom error handler that replaces the default error
handling mechanism? ✅ B) set_error_handler()
18. When an exception is thrown in PHP, which block of code is used to catch and handle the exception?
✅ A) catch
1. In a role-based access control system, the ✅ role defines what actions a user can perform within an
application.
2. To securely store user passwords in a database, you should use ✅ password_hash() to hash the
passwords before storing them.
3. The PHP function ✅ password_verify() is used to compare a plaintext password with a hashed
password.
4. When a user logs in, their authentication state is typically managed using a ✅ session.
5. To prevent unauthorized access to certain pages, you should check the user's ✅ authorization at the
beginning of each protected page.
III. Matching PHP Security Terms
Term Definition
2. Authorization ✅ d. The process of determining what actions an authenticated user can perform.
3. Session Hijacking
c. The act of taking over a user's active session.
✅
a. A security measure to prevent attacks where an attacker tricks a user into making
4. CSRF Token ✅
unwanted requests.
php
php
if (password_verify($_POST['password'], $user['password'])) {
$_SESSION['user_id'] = $user['id'];
}
Step 2: Role-Based Access Control
php
php
php
php
php
php
php
$sales = $stmt->fetchAll();
foreach ($sales as $sale) {
echo "Sale Amount: " . $sale['amount'] . "<br>";
}
🚀 Outcome: TWIGIRE MUHINZI COOPERATIVE now has a fully functional web application for
managing members, clients, products, and sales with authentication, role-based access control, and reporting
capabilities!
Below is the structured answer key aligned with each question for better understanding.
I. Multiple Choice Questions with Answers
1. Which of the following is a key advantage of using a PHP framework? ✅ C) Streamlined code
organization ➝ PHP frameworks provide structured, organized code, reducing development time.
2. Which PHP framework is known for its simplicity and speed, often used for building RESTful APIs?
✅ C) CodeIgniter ➝ CodeIgniter is a lightweight framework known for fast performance.
3. Which PHP framework uses the Eloquent ORM for database interactions? ✅ B) Laravel ➝
Eloquent ORM simplifies database queries in Laravel.
4. In Laravel, which command is used to create a new controller? ✅ A) php artisan make:controller ➝
The make:controller command generates a new controller in Laravel.
5. What does MVC stand for in the context of PHP frameworks? ✅ C) Model-View-Controller ➝
MVC is a design pattern that separates data (Model), UI (View), and logic (Controller).
1. PHP frameworks like Laravel and Symfony are designed to help developers build web applications
faster and more securely. ✅ True
2. The Zend Framework is now known as Laminas. ✅ True
3. CodeIgniter requires the use of the Eloquent ORM for database operations. ❌ False (CodeIgniter
does not require Eloquent ORM; it has its own query builder.)
4. In Laravel, middleware is used to filter HTTP requests entering your application. ✅ True
5. Symfony’s components are reusable PHP libraries that can be used independently of the full
framework. ✅ True
bash
bash
php
bash
bash
php
bash
php
Route::middleware('auth')->group(function () {
Route::get('/dashboard', function () {
return view('dashboard');
});
});
Step 6: Developing a User-Friendly Interface
php
@extends('layouts.app')
@section('content')
<h2>Donor Management</h2>
<table>
<tr>
<th>Name</th>
<th>Email</th>
<th>Donation Amount</th>
</tr>
@foreach ($donors as $donor)
<tr>
<td>{{ $donor->name }}</td>
<td>{{ $donor->email }}</td>
<td>${{ $donor->donation_amount }}</td>
</tr>
@endforeach
</table>
@endsection
html
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css
">
Step 7: Testing the Application
bash
php
🚀 Outcome: InnovateTech now has a well-structured Laravel web application that manages donor
information, fundraising events, and generates reports efficiently!
Would you like additional enhancements, such as payment gateway integration or automated donation
tracking? 🚀💻
ere is a structured answer key, aligning each question with its correct response for better understanding.
1. What should be the first step when implementing a logout feature in PHP? ✅ b) Destroy the session
➝ Destroying the session removes all session data, logging out the user properly.
2. What is the function of the require_login() function in a CMS? ✅ a) To check if a user is logged in ➝
This function ensures only authenticated users can access certain pages.
1. Sessions in a CMS can be used to maintain the logged-in state of a user across multiple pages. ✅
True
2. Sanitizing user inputs is unnecessary if your CMS has user authentication. ❌ False (Sanitization
prevents SQL injection and XSS attacks, making authentication more secure.)
3. The password_verify() function in PHP is used to compare a user's entered password with the hashed
password stored in the database. ✅ True
4. Cookies can be used to store user preferences like themes or login details, enhancing the user
experience in a CMS. ✅ True
5. To create a new admin account in a CMS, you should store the password in plain text for easy
retrieval. ❌ False (Passwords should always be hashed using password_hash() for security.)
h. Re-running previous tests after updates to ensure new code has not introduced
1. Regression Testing ✅
errors.
2. Load Testing ✅ g. Evaluating how the CMS handles multiple users accessing it simultaneously.
3. Functional Testing ✅ c. Verifying that the CMS meets the specified requirements by testing its features.
4. Performance Testing
f. Assessing how the CMS performs under various conditions, including high traffic.
✅
6. Security Testing ✅ e. Identifying vulnerabilities in the CMS, such as SQL injection or XSS attacks.
7. Unit Testing ✅ a. Testing individual components of the CMS to ensure they function correctly.
8. Usability Testing ✅ d. Ensuring the CMS is user-friendly and intuitive for users.
bash
php
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=cms_database
DB_USERNAME=root
DB_PASSWORD=securepassword
bash
bash
php
php
User::create([
'name' => 'Admin',
'email' => '[email protected]',
'password' => password_hash('securepassword', PASSWORD_BCRYPT),
'role' => 'admin'
]);
Step 3: Developing CRUD Operations for Content Management
bash
php
php
php
php
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Step 5: Testing the CMS
bash
bash
🚀 Outcome: Visionary Web Solutions now has a functional, secure, and scalable CMS that enables
administrators to manage content dynamically!
Database Development
Learning Unit 1: Perform Database Structure
1. What is the primary purpose of a database?
✅ To store, organize, and manage data efficiently. ➝ Databases allow structured data storage, easy retrieval,
and manipulation.
✅ Relational (SQL) and Non-Relational (NoSQL) ➝ Relational databases use tables, while NoSQL databases
use documents, key-values, graphs, or columns.
✅ A primary key uniquely identifies each record, while a foreign key links two tables together. ➝ Primary
keys prevent duplicate values, ensuring data integrity, while foreign keys establish relationships between tables.
✅ Normalization organizes data to reduce redundancy and improve efficiency. ➝ It divides large tables into
smaller ones while maintaining relationships.
✅ Data Manipulation Language ➝ DML commands modify data within tables without affecting the structure.
7. What are the main DML commands in SQL?
✅ INSERT, UPDATE, DELETE, SELECT ➝ These commands insert, modify, remove, and retrieve data
from tables.
sql
sql
sql
sql
sql
✅ JOIN combines rows from two or more tables based on a related column.
sql
sql
sql
✅ DELETE removes specific rows, while TRUNCATE removes all rows but keeps the structure.
Theoretical Assessment
Fill-in-the-Blank:
Practical Assessment
To build the Product Listing and Search Page for ABC Company, the following React.js concepts should be
implemented:
Search Bar: Implement a search bar that filters products by name, category, or price.
Filters: Add filters such as categories, price range, and brand.
Product Listing: Display the products in a grid or list format with relevant information such as the product
name, price, and image.
Product Details: Allow users to click on a product to view more details, including descriptions and
specifications.
State Management: Use useState and useEffect hooks to manage and update the product data
dynamically.
Routing: Use React Router to navigate between the product listing page and individual product details
pages.
Ensure that the page is responsive and provides a smooth user experience by incorporating dynamic features such as
product search, sorting, and real-time filtering.
If you need help with code snippets or further explanation on any part, feel free to ask!
4o mini
You said:
Question 1. Choose the correct alternative by circling the letter that corresponds to the answer 1. What is JSX in
React? a) A JavaScript framework b) A JavaScript XML syntax extension c) A state management library d) A CSS
library 2. Which of the following is a lifecycle method in React? a) render b) componentDidMount c) useEffect d)
setState 3. Which hook is used to manage state in functional components? a) useState b) useEffect c) useContext d)
useReducer 4. Which of the following is a valid way to pass props in React? a) Using state b) Through the
constructor c) As an attribute in JSX d) Through the render method 5. What does the Virtual DOM do? a) Stores
component states b) Provides routing in React c) Minimizes the number of DOM manipulations
ChatGPT said:
Question Answer
a) ______ in Tailwind CSS is a feature that allows you to apply styles to an element when a
Hover state
user hovers over it with their cursor.
b) You can add plugins by installing them and then including them in the plugins array of
tailwind.config.js
______
c) The ______ approach is a design strategy where you prioritize mobile users by
mobile-first
designing for smaller screens first and then progressively enhancing for larger screens.
d) Add the ______ utility to make an element bounce up and down, useful for things like
animate-bounce
“scroll down” indicators.
e) ______ is the ability to apply motion effects to elements, either using pre-defined utility
Animation
classes or custom animations.
f) You can customize the primary color by extending the ______ property in
colors
tailwind.config.js
g) Use the ______ utilities to control an element’s transition-delay. *delay- **
h) TailwindCSS provides pre-configured ______ through its breakpoint utilities like sm,
media queries
md, lg, xl, and 2xl.
i) Use ______ to allow a flex item to shrink but not grow, taking into account its initial size. flex-initial
j) In TailwindCSS, you can implement flexible grid layouts using the ______ utility class
grid
and specifying the number of columns with grid-cols-{n}.
Objective: Enhance ABC Company's ReactJS application with Tailwind CSS for modern, responsive UI.
bash
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
js
module.exports = {
content: ["./src/**/*.{js,jsx,ts,tsx}"],
theme: {
extend: {
colors: {
primary: "#0077b6",
secondary: "#00b4d8",
},
},
},
plugins: [],
};
jsx
<nav className="bg-primary flex justify-between items-center p-4">
<h1 className="text-white text-xl">ABC Company</h1>
<ul className="hidden md:flex space-x-4">
<li className="hover:text-secondary">Home</li>
<li className="hover:text-secondary">About</li>
<li className="hover:text-secondary">Contact</li>
</ul>
</nav>
✅ Grid-Based Layout
jsx
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
<div className="p-4 bg-white shadow-md">Card 1</div>
<div className="p-4 bg-white shadow-md">Card 2</div>
<div className="p-4 bg-white shadow-md">Card 3</div>
</div>
✅ Hover Effects
jsx
<button className="bg-primary hover:bg-secondary transition-all duration-300
p-4 rounded-lg">
Click Me
</button>
✅ Bounce Animation
jsx
<div className="animate-bounce text-center text-2xl">Scroll Down</div>
✅ Fade-in Animation
jsx
<div className="animate-pulse bg-gray-300 h-12 w-48"></div>
✅ Mobile-first Approach
jsx
<div className="p-4 md:p-8 lg:p-12">
<h1 className="text-2xl md:text-3xl lg:text-4xl">Welcome to ABC</h1>
</div>
jsx
<div className="md:hidden p-4 bg-secondary text-white">Mobile Menu</div>
🚀 Outcome: ABC Company now has a clean, modern ReactJS web application using Tailwind CSS with
animations, transitions, and responsive design!
Learning Outcome 5 - End Assessment
b) Changing the value of an environment variable requires restarting the development server for the changes to
take effect. → TRUE
c) Vercel supports automatic deployments from a Git repository, allowing for continuous integration. → TRUE
d) When migrating application files to a deployment platform, it's unnecessary to include configuration files like
package.json. → FALSE
e) React applications can use platform-specific options for environment variable configurations. → TRUE
f) Testing the deployed application is important to ensure that it works as expected in the production
environment. → TRUE
g) You can directly access environment variables in React without prefixing them with REACT_APP_. → FALSE
h) It is best practice to keep all environment variables in a single .env file for security purposes. → FALSE
i) After configuring DNS settings, it is unnecessary to wait for DNS propagation to take effect. → FALSE
j) You can create separate .env files for different environments (e.g., .env.development, .env.production) in a React
application. → TRUE
k) Migrating application files involves copying only the src folder from your React application. → FALSE
l) After deploying a React application, you should avoid running any performance audits to ensure the app
functions correctly. → FALSE
m) Verifying SSL settings can be done by accessing the website and checking if the URL starts with "http://" instead
of "https://". → FALSE
b) You can set environment variables in ReactJS by creating a ………………………… file in the root of your project. →
.env
c) Add an ……………………………………… to point your domain to the IP address of the server hosting your React
application. → A Record
d) Variables should be prefixed with ………………………………………… for React to recognize them → REACT_APP_
e) Use the command ………………………………… to check if your domain resolves to the correct IP address. →
nslookup
f) The ……………………………… is returned to the browser, which uses it to connect to the server. → IP address
2 → SSL → A standard security technology used to establish an encrypted link between a server and a client.
4 → FTP host → The server or system that provides the File Transfer Protocol service.
5 → CNAME Record → A type of DNS record that maps an alias name to a true or canonical domain name.
6 → Top-Level Domain → The last part of a domain name, appearing after the final dot.
7 → Root Level → The top of the hierarchy, represented by the dot (.) at the end of the domain.
8 → IP address → A unique identifier assigned to devices connected to a network using the Internet Protocol.
9 → ISP → A company that provides individuals and organizations access to the internet.
10 → Domain registrar → A company or organization that manages the reservation of Internet domain names.
Practical Assessment
ABC company is located in Kigali City. They hired a React.js developer to deploy a customer feedback system on
Vercel, with a custom domain (www.abc.com).
• Go to your domain registrar and add a CNAME record for www.abc.com pointing to yourproject.vercel.app.
• Open https://www.abc.com and ensure the site loads securely without warnings.
Data Structure(DSA)
Written Assessment
plaintext
BEGIN
DEFINE subjects[5]
DECLARE total_marks = 0
DECLARE average_marks
average_marks = total_marks / 5
Flowchart Overview
1. Start
2. Input marks for 5 subjects
3. Calculate total marks
4. Calculate average marks
5. Check if average is >= 50
o If Yes, Print "Student has passed"
o If No, Print "Student has failed"
6. End
Written Assessment
1. Which of the following is an example of a non-linear data structure? a) Linked List b) Queue c)
Stack d) Tree ✅
2. Which sorting algorithm does NOT use recursion? a) Quick Sort b) Merge Sort c) Insertion Sort ✅
d) Heap Sort
3. Which of the following operations is common to both linear and binary search? a) Sorting the data
before searching b) Comparing elements ✅ c) Splitting the data into two halves d) Reversing the
data
4. What is the best sorting algorithm to use when stability is a requirement? a) Quick Sort b) Merge
Sort ✅ c) Heap Sort d) Shell Sort
5. Which classification of sorting algorithms involves comparing elements to one another? a) By
Recursion b) By Memory Usage c) By Number of Comparisons ✅ d) By Stability
1. A binary search can be used on unsorted data. ❌ False (Binary search requires sorted data.)
2. Merge Sort is both a stable and recursive sorting algorithm. ✅ True
3. Arrays and linked lists are examples of non-linear data structures. ❌ False (They are linear data
structures.)
4. The number of swaps is a classification criterion for sorting algorithms. ✅ True
5. Time complexity measures the amount of memory an algorithm uses during execution. ❌ False
(Time complexity measures execution time, not memory usage.)
Practical Assessment
plaintext
BEGIN
DEFINE shipmentStack as an empty stack
FUNCTION push(shipment):
Add shipment to the top of shipmentStack
FUNCTION pop():
If shipmentStack is not empty:
Remove and return the top shipment
Else:
Print "No shipments to undo"
FUNCTION top():
If shipmentStack is not empty:
Return the top shipment without removing it
Else:
Print "No shipments available"
END
Explanation:
plaintext
BEGIN
FUNCTION mergeSort(arr):
IF size of arr <= 1:
RETURN arr
Divide arr into two halves
Recursively apply mergeSort to each half
Merge the sorted halves back together
RETURN sorted list
END
plaintext
BEGIN
DEFINE Node as a structure containing:
FurnitureItem
Pointer to next node
FUNCTION addItem(item):
Create a new node with item
Add node to the end of the linked list
FUNCTION removeItem(item):
Find node containing item
If found, remove it from linked list
FUNCTION traverseList():
Start from head node
Loop through linked list, printing each item
END
Dynamic allocation: Easily add and remove items as shipments vary daily.
Efficient traversal: Loop through the list to generate reports.
Written Assessment
1. The bubble sort algorithm is generally faster than quick sort for large datasets. ❌ False (Quick sort is
generally faster for large datasets due to its average-case time complexity of O(n log n) compared to
bubble sort's O(n²).)
2. Arrays and linked lists are both linear data structures. ✅ True
3. Binary search can be performed on both sorted and unsorted arrays. ❌ False (Binary search requires
a sorted array.)
4. Benchmark.js and jsPerf are tools used for testing and measuring the performance of JavaScript
code. ✅ True
5. Profiling and benchmarking tools like Benchmark.js and jsPerf help evaluate the performance of
JavaScript code. ✅ True
1. Which of the following environments can be used to run JavaScript source code? a) Browser
Developer Tools b) IDE Terminal c) Text Editor d) Both a and b ✅
2. Which of the following is a linear data structure? a) Graph b) Tree c) Linked List ✅ d) Hash Table
3. Which sorting algorithm generally has better average performance on large datasets? a) Bubble Sort
b) Quick Sort ✅ c) Insertion Sort d) Selection Sort
4. When can binary search be used? a) On unsorted data b) On sorted data ✅ c) On linked lists only d)
On any data structure
5. Which of the following tools is commonly used to profile and measure JavaScript performance? a)
Chrome DevTools b) jsPerf c) Benchmark.js d) All of the above ✅
javascript
class ShipmentStack {
constructor() {
this.stack = [];
}
push(shipment) {
this.stack.push(shipment);
console.log(`Shipment added: ${shipment}`);
}
pop() {
if (this.stack.length === 0) {
console.log("No shipments to undo.");
return;
}
let removed = this.stack.pop();
console.log(`Undo last operation, removed shipment: ${removed}`);
}
top() {
if (this.stack.length === 0) {
console.log("No shipments available.");
return;
}
console.log(`Top shipment: ${this.stack[this.stack.length - 1]}`);
}
}
// Example usage
const manager = new ShipmentStack();
manager.push("Shipment 1");
manager.push("Shipment 2");
manager.top();
manager.pop();
manager.top();
javascript
function mergeSort(arr) {
if (arr.length <= 1) {
return arr;
}
javascript
class Node {
constructor(item) {
this.item = item;
this.next = null;
}
}
class LinkedList {
constructor() {
this.head = null;
}
addItem(item) {
let newNode = new Node(item);
if (!this.head) {
this.head = newNode;
} else {
let temp = this.head;
while (temp.next) {
temp = temp.next;
}
temp.next = newNode;
}
console.log(`Added: ${item}`);
}
removeItem(item) {
if (!this.head) {
console.log("Warehouse is empty.");
return;
}
if (temp.next) {
temp.next = temp.next.next;
console.log(`Removed: ${item}`);
} else {
console.log(`${item} not found.`);
}
}
traverseList() {
let temp = this.head;
console.log("Warehouse Inventory:");
while (temp) {
console.log(temp.item);
temp = temp.next;
}
}
}
// Example usage
let warehouse = new LinkedList();
warehouse.addItem("Table");
warehouse.addItem("Chair");
warehouse.addItem("Bed");
warehouse.traverseList();
warehouse.removeItem("Chair");
warehouse.traverseList();
Dynamic allocation: Easily add and remove items as shipments vary daily.
Efficient traversal: Loop through the list to generate reports.
JavaScript
JavaScript and Web Development Assessment
Written Assessment
1. Multiple Choice Questions
i) JavaScript is a _______________ language.
a) Object-Oriented
b) High-level
c) Assembly-language
d) Object-Based
Correct answer: a) Object-Oriented
Explanation: Modern JavaScript supports object-oriented programming paradigms, including class syntax, making
"Object-Oriented" the most accurate broad description. While JavaScript has prototype-based features and can be
considered Object-Based, the contemporary view aligns more with object-oriented programming.
ii) Initialization of variables can be done by writing—________________ operator in between variable name
and operand value.
a) EQUALS
b) =
c) VALUE
d) ==
Correct answer: b) =
Explanation: The assignment operator in JavaScript is the single equals sign (=).
3. True/False Statements
i) Variable Scope determines the accessibility (visibility) of variables.
Answer: True
ii) A variable stores the data value that can be changed later.
Answer: True
iii) Any variable declared inside a block such as a function can be accessed anywhere in a program.
Answer: False
x += 5;
Copy let x = 5;
Output: --x = 4
i)
Copy let x = 5;
Output: false
j)
Copy let a = 6;
let b = 14;
result = a & b;
window.alert(result);
Sample Implementation:
<html lang="en">
<head>
<title>Simple Calculator</title>
<style>
.calculator { margin: 50px auto; width: 300px; padding: 20px; border: 1px
solid #ccc; border-radius: 8px; }
</head>
<body>
<div class="calculator">
<h2>Calculator</h2>
<div>
<button onclick="calculate('+')">Add</button>
<button onclick="calculate('-')">Subtract</button>
<button onclick="calculate('*')">Multiply</button>
<button onclick="calculate('/')">Divide</button>
</div>
<div id="result"></div>
</div>
<script>
function calculate(operator) {
const n1 = parseFloat(document.getElementById('num1').value);
const n2 = parseFloat(document.getElementById('num2').value);
let result;
if (isNaN(n1) || isNaN(n2)) {
return;
switch(operator) {
case '/':
if (n2 === 0) {
result = 'Cannot divide by zero.';
} else {
result = n1 / n2;
break;
</script>
</body>
</html>
Additional Content
Additional Theoretical Questions
a) Regular Expressions in JavaScript:
Strings can be written with ' ', " ", or ` (backticks).
Answer: True
Named function definitions do not execute automatically upon definition.
Answer: False
The * quantifier matches zero or more of the preceding element.
Answer: True
Copy var a = 1;
if (a > 10) {
document.write(10);
} else {
document.write(a);
Output: 1
c) Object Example:
mango.price = 200;
mango.sweetness = 8;
mango.howSweetAmI = function() {
document.write("Good Fruit");
};
mango.howSweetAmI();
Output:
color: yellow price: 200
Good Fruit
Answer: 1️ → B, 2️ → A, 3️ → C
Copy*
* *
* * *
* * * *
* * * * *
Sample Code:
console.log(pattern.trim());
Theoretical Assessment
a. Three Levels of Pain Points are plan, observation and Relationship. * Answer: False (While "observation" might
be part of identifying pain points, "plan" and "Relationship" are not standard, widely recognized "Levels of Pain
Points". Pain points are typically categorized based on where they occur in the user journey or what type of problem
they represent, e.g., financial, productivity, support pain points).
b. Pain points are problems that occur at the different levels of the customer experience. * Answer: True (Pain
points are indeed issues or problems that a customer or user experiences at various stages of their journey or
interaction with a product, service, or brand).
Practical Assessment
While I can understand and process these requirements, please remember that I am a text-based AI and cannot
actually perform the visual design tasks of creating wireframes or interactive prototypes in tools like Figma or
Adobe XD.
Written assessment
a) Step of UX designer’s journey are five. * Answer: False (The "steps of a UX designer's journey" isn't a
universally fixed number like five. A UX designer's activities and process involve various stages, often iterative, like
research, analysis, design, testing, implementation, etc., and the specific process can vary depending on
methodology and project).
b) User journey help user to interacts with a product and allows designers to see a product from a user’s point of
view. * Answer: True (A user journey map is a visualization tool that helps designers understand the steps a user
takes to interact with a product or service, explicitly allowing the designer to adopt the user's perspective, emotions,
and pain points throughout that experience).
c) User story and user scenario are not important during design process. * Answer: False (User stories and user
scenarios are fundamental tools in the design process. User stories capture user needs from their perspective, while
user scenarios describe specific situations in which a user interacts with the product. Both are crucial for defining
features, understanding context, and designing solutions that meet real user needs).
Q2. Complete the following sentences with the following word: creative brief, user personas, story.
a) The written definition of a UX Designer’s first visualization of the first wireframes and prototypes is story. *
(Note: This sentence is phrased somewhat unusually. A "user story" defines a user's need/goal, which informs
wireframes/prototypes. A "creative brief" outlines the project strategy. "User personas" represent the target users. If
the blank refers to a narrative that informs the initial design visualization based on a user's need, "story" (as in user
story or scenario) fits best among the options, but it's not a standard definition of the visualization itself).
b) creative brief is a document used to outline the strategy of a creative project? * Answer: creative brief
Practical assessment
Thank you for outlining the scenario and the steps involved in the practical assessment for improving the e-
commerce camping gear website for outdoor enthusiasts.
1. Which of the following is a type of user interface that uses visual elements like windows, icons, and
buttons? a) Command Line Interface (CLI) b) Graphical User Interface (GUI) c) Menu-driven User
Interface d) Voice User Interface (VUI)
o Correct Answer: b) Graphical User Interface (GUI)
2. Which user interface involves interaction through typing text commands? a) Graphical User Interface
(GUI) b) Command Line Interface (CLI) c) Touch User Interface d) Natural Language User Interface
o Correct Answer: b) Command Line Interface (CLI)
3. Which factor is NOT part of Peter Morville's User Experience Honeycomb? a) Useful b) Credible c)
Expensive d) Findable
o Correct Answer: c) Expensive (Morville's honeycomb includes Useful, Usable, Desirable,
Findable, Accessible, Credible, and Valuable).
4. What is the purpose of a creative brief in a project? a) To outline the strategy of a creative project b) To
create user personas c) To define budget planning d) To hire new staff
o Correct Answer: a) To outline the strategy of a creative project
5. What is the primary goal of usability in UI/UX design? a) To attract new users b) To ensure the product is
easy to use c) To create a visually appealing design d) To reduce development costs
o Correct Answer: b) To ensure the product is easy to use (Usability specifically focuses on the
effectiveness, efficiency, and satisfaction of users when interacting with a product).
6. Which of the following is a characteristic of a high-fidelity wireframe? a) Sketches on paper b) Detailed
and may include simple workflows and interactions c) Basic outline without much detail d) Only
includes text and no visual elements
o Correct Answer: b) Detailed and may include simple workflows and interactions (High-fidelity
wireframes are much more refined than low-fidelity ones, often created digitally and including
more detail, realistic spacing, and sometimes basic interactions).
7. A mockup typically includes all the following visual details EXCEPT: a) Colors, styles, graphics, and
typography b) Styled buttons and text c) Navigation graphics d) User interaction feedback
o Correct Answer: d) User interaction feedback (Mockups are static visual representations. User
interaction feedback (like how a button changes when clicked or an error message appears) is
demonstrated in prototypes, not mockups).
8. What is the primary goal of a prototype? a) To outline the basic structure of a page b) To test and validate
ideas before final development c) To create a static model of the page d) To organize information within
digital products
o Correct Answer: b) To test and validate ideas before final development (Prototypes allow
designers to simulate user flows and interactions to gather feedback and validate design decisions
before investing heavily in development).
9. What does the 3-click rule suggest? a) Users should receive feedback within 3 seconds b) No page should
take more than 3 clicks to access c) Usability tests should be completed in 3 stages d) Every page must
have at least 3 clickable links
o Correct Answer: b) No page should take more than 3 clicks to access (The 3-click rule is a
debated, but still referenced, guideline suggesting that users should be able to find the information
or complete the task they are looking for on a website within three clicks).
10. Answer by true if a statement is correct and false if is wrong a) In the UX design process, the analysis
phase involves creating user personas. * Answer: True (Creating user personas is typically done during the
analysis phase, after user research, as it involves synthesizing research data to represent target user types).
b) A prototype is an interactive simulation of a product designed to test the user experience. * Answer:
True (This is an accurate description of a prototype's purpose and nature in UX design).
Practical assessment
Thank you for outlining the scenario for the ABC CO MIS project. I understand the goal is to create a mockup and
prototype for a web application to manage student competition applications, including user authentication, student
application submission, administrator review/decision making, and student status checking. I also understand the
emphasis on ease of use and consistency, the suggested tool (Figma), and the time allocation (8 hours).
As with the previous practical scenario, I am a text-based AI and cannot physically create the visual mockup or
the interactive prototype using tools like Figma.
Okay, let's outline the typical steps a UX designer would take to create a mockup and prototype for the ABC CO
MIS project, based on the requirements you provided and considering the suggested tools and time frame.
Step 1: Understand the Core Requirements & Users (approx. 30-60 minutes)
Step 3: Create Mid-to High-Fidelity Mockups (in Figma) (approx. 3-4 hours)
Tool: Figma.
Process: Translate your sketches into digital mockups in Figma.
o Set up: Create a new Figma project. Define a basic color palette (even if just grayscale or a few
main colors) and typography (basic font styles).
o Design Screens: Design each of the key screens.
Layout: Implement the layout from your sketches.
UI Elements: Add standard UI components like input fields, buttons, dropdowns, tables
(for application lists), headers, footers, navigation. Use consistent styling for these
elements.
Content: Include representative text (even if placeholder like "Lorem Ipsum") and labels
for fields. For the Admin view, show examples of application data in a table.
Visual Details: Add more visual detail than sketches – use colors, specific fonts, spacing,
and ensure elements are aligned and consistent across pages. This is where you make it
look like a static representation of the final UI.
Focus: Consistency in layout, styling, and element usage. Ensure all necessary information and interaction
points (buttons, forms) are present on each screen according to the flows.
Step 4: Build the Interactive Prototype (in Figma) (approx. 1.5-2 hours)
Step 5: Review and Refine (On-going & Wrap-up - approx. 30-60 minutes)
Review: Click through your prototype yourself to ensure connections work and flows make sense. Look for
any inconsistencies in the mockups.
Refine: Make adjustments to the mockups or prototype connections as needed.
Prepare for Presentation: Organize your Figma file. Be ready to explain your design choices, the user
flows you've enabled in the prototype, and how the design addresses the project requirements for both
students and administrators, emphasizing ease of use and consistency.
Vue Js
1. Which term refers to the client-side of a web application, which is what users interact with directly in
their web browsers? A) Frontend ✅
2. Select the best term that defines a Single Page Application (SPA): A) A web application that loads a
single HTML page and dynamically updates it as the user interacts with the app ✅
3. Which command can be used to check the version of Node.js and npm installed on your computer?
A) node -v ✅ (For Node.js) C) npm -v ✅ (For npm)
4. How can you install Vue.js in your project? A) npm install vue ✅
5. Which of the following are necessary steps to run a simple JavaScript program that can add two
numbers using Node.js?? E) All of the above ✅
6. Suppose you want to create a game project named "snake game." Which command can be used to
create the project? C) vue create snake-game ✅
7. CLI stands for: a) Command Line Interface ✅
8. Which of the following is NOT a common feature of an IDE? d) Web browser ✅
9. The frontend of a web application primarily deals with: c) User interface and presentation ✅
10. In a Single Page Application (SPA): a) The entire application runs on a single HTML page. ✅
11. Vue.js is primarily a: b) Frontend framework ✅
File/Folder Description
a. src iii Main folder for source code
b. components ii Stores reusable Vue components
c. node_modules vi Installed packages and dependencies
d. App.vue iv Entry point component of a Vue.js application
e. package.json i Contains metadata about the project and dependencies
f. .gitignore v Ignored files and directories for version control
1. A framework provides a structured and reusable foundation for building applications. ✅ True
2. The cd command is used to create a new directory in the Command Prompt. ❌ False (It is used to
change directories.)
3. IDEs typically include a code editor, build tools, and debugging capabilities. ✅ True
4. The Vue.js framework is primarily used for backend development. ❌ False (Vue.js is a frontend
framework.)
5. Single Page Applications (SPAs) require page reloads for every user action. ❌ False (SPAs update
dynamically without reloading.)
6. The virtual DOM is a real-time representation of the browser's DOM. ❌ False (The virtual DOM is
an optimized in-memory representation.)
7. Vue.js follows a component-based architecture. ✅ True
8. The del command is used to list files and directories in the Command Prompt. ❌ False (It is used to
delete files.)
9. A dependency in Vue.js refers to an external library or module required by your project. ✅ True
10. The mkdir command is used to change the current directory in the Command Prompt. ❌ False (It is
used to create a new directory.)
To initialize a Vue.js project for the XYZ Rwandan Museum, follow these steps:
bash
npm install -g @vue/cli
bash
vue create rwanda-museum-game
bash
cd rwanda-museum-game
bash
npm run serve
vue
<template>
<div class="welcome-container">
<h1>Welcome to Rwanda Museum</h1>
<p>Explore the rich history of Rwanda through interactive
storytelling.</p>
</div>
</template>
<script>
export default {
name: "App"
};
</script>
<style>
.welcome-container {
text-align: center;
margin-top: 100px;
}
h1 {
font-size: 36px;
color: #2c3e50;
}
p {
font-size: 20px;
color: #34495e;
}
</style>
plaintext
ubumwe-hotel/
│── src/
│ ├── components/ # Contains reusable UI components
│ ├── views/ # Contains page components (Home, About, etc.)
│ ├── router/ # Vue Router setup
│ ├── store/ # Vuex store for state management
│ ├── assets/ # Images, fonts, and styles
│ ├── App.vue # Main application component
│ ├── main.js # Entry point for Vue app
│── public/
│ ├── index.html # Main HTML file
│── package.json # Project dependencies
│── README.md # Documentation
Setting Up the Vue Project
bash
# Install Vue CLI (if not installed)
npm install -g @vue/cli
javascript
import { createRouter, createWebHistory } from 'vue-router';
import Home from '../views/Home.vue';
import About from '../views/About.vue';
import Contact from '../views/Contact.vue';
import Registration from '../views/Registration.vue';
import NotFound from '../views/NotFound.vue';
const routes = [
{ path: '/', component: Home },
{ path: '/about', component: About },
{ path: '/contact', component: Contact },
{ path: '/registration', component: Registration },
{ path: '/:pathMatch(.*)*', component: NotFound } // 404 Page
];
vue
<template>
<div>
<h2>Register a Room</h2>
<form @submit.prevent="registerRoom">
<input type="text" v-model="roomType" placeholder="Room Type">
<input type="text" v-model="guestName" placeholder="Guest Name">
<button type="submit">Register</button>
</form>
<h3>Registered Rooms</h3>
<table>
<tr>
<th>Room Type</th>
<th>Guest Name</th>
</tr>
<tr v-for="room in rooms" :key="room.id">
<td>{{ room.roomType }}</td>
<td>{{ room.guestName }}</td>
</tr>
</table>
</div>
</template>
<script>
export default {
data() {
return {
roomType: '',
guestName: '',
rooms: []
};
},
methods: {
registerRoom() {
this.rooms.push({ id: this.rooms.length + 1, roomType: this.roomType,
guestName: this.guestName });
this.roomType = '';
this.guestName = '';
}
}
};
</script>
vue
<template>
<div>
<h2>Hotel Services</h2>
<ul>
<li v-for="service in services" :key="service.id">{{ service.name
}}</li>
</ul>
</div>
</template>
<script>
import axios from 'axios';
export default {
data() {
return {
services: []
};
},
async mounted() {
try {
const response = await axios.get('https://api.example.com/hotel-
services');
this.services = response.data;
} catch (error) {
console.error("Error fetching data:", error);
}
}
};
</script>
javascript
import { createStore } from 'vuex';
✅ Routing: Seamless navigation between pages using Vue Router ✅ State Management: Efficient management
of registration data using Vuex ✅ API Integration: Fetching and displaying dynamic data using Axios ✅ Error
Handling: 404 page to catch invalid routes
Written Assessment: Game Development & Vue.js
I. Multiple Choice Questions with Answers
1. What contributes to making a good character in games? A) Visual Appeal, Personality and
Backstory, Character Arc and Growth, Voice Acting and Dialogue ✅
2. Personality and Backstory are important elements in creating compelling characters for game
narratives. ✅ True
3. Voice acting is not necessary for engaging characters in video games. ❌ False (Voice acting enhances
character immersion and emotional impact.)
4. What are examples of alert messages commonly found in digital interfaces? B) Success Messages,
Failure Messages, Information Messages, Warning Messages ✅
5. Alert messages are used in applications solely for decorative purposes. ❌ False (They provide
important feedback and guidance to users.)
6. Warning messages are used to notify users of potential issues. ✅ True
7. Which types of keyboard inputs are commonly used in Vue.js games? B) Keyboard Input, Mouse
Input, Touch Input (for mobile devices), Game Controller Input ✅
8. Mouse Input is typically used in Vue.js games to control gameplay elements. ✅ True
9. Game Controller Input is only used for console games and not for web-based games developed with
Vue.js.. ❌ False (Game controllers can be integrated into web-based games.)
10. What are the essential elements that define a game? A) Scores, Level, Speed, Time, Target Device ✅
11. Speed is not an essential element in defining a game. ❌ False (Speed affects difficulty and player
experience.)
12. The target device can impact the design and mechanics of a game. ✅ True
13. What is the purpose of the Game HUD in video games? A) To display essential information,
feedback, and interactive elements during gameplay ✅
14. The Game HUD is only used in first-person shooter games. ❌ False (HUDs are used across various
game genres.)
15. HUD elements include health bars, score displays, and mini-maps. ✅ True
16. What are key aspects that make up game environments? A) Landscapes and Terrain, Architecture
and Structures, Natural Elements, Props and Objects ✅
17. Game environments do not affect the player's immersion. ❌ False (Environments significantly impact
immersion.)
18. Natural elements like trees and rivers contribute to the game's atmosphere. ✅ True
19. What are the steps to download and prepare different game sounds? A) Identify Sound
Requirements, Search for Sound Resources, Download Sound Assets, Organize Sound Files,
Optimize Sound Quality, Create Sound Variations ✅
20. Organizing sound files is an unnecessary step in preparing game sounds. ❌ False (Proper organization
ensures efficiency in game development.)
21. Creating sound variations can enhance the audio experience in a game. ✅ True
22. What are the essential steps to create a storyline? A) Identify the Central Theme, Develop
Characters, Outline the Plot, Establish Setting, Write Dialogue ✅
23. Establishing a setting is not important when creating a storyline. ❌ False (Setting provides context
and enhances the narrative.)
24. Writing dialogue helps in character development and advancing the plot. ✅ True
25. What role does the central theme play in a storyline? A) It serves as the foundation and guiding
concept for the narrative ✅
26. A well-developed character arc is crucial for player engagement. ✅ True
27. Game controller input is less responsive than keyboard input in Vue.js games. ❌ False
(Responsiveness depends on implementation.)
28. Information messages in applications provide users with general updates or instructions. ✅ True
29. Props and objects in game environments have no impact on gameplay mechanics. ❌ False (They
interact with gameplay mechanics.)
30. Speed adjustments in games can influence the difficulty level and player experience. ✅ True
A lone traveler embarks on an endless journey across a vast, mysterious plain. Along the way, obstacles rise from
the ground—fallen logs, crumbling rocks, and ancient ruins. To survive, the traveler must jump over each obstacle,
gaining speed and points with every successful leap.
Main Character:
Name: Akimana
Background: A young explorer seeking the legendary Lost City, rumored to be hidden beyond a
treacherous landscape.
Abilities: Quick reflexes, controlled jumps, and stamina boosts.
Game Mechanics:
Movement: Players control Akimana using arrow keys or touch input to move forward and jump over
obstacles.
Obstacles: Randomly generated logs, rocks, water pits, and fallen branches.
Scoring: Points increase with each successful jump; missing an obstacle decreases stamina.
Power-ups: Collect speed boosters and shield power-ups to avoid obstacles.
HUD Display:
Background Music: A mystical adventure soundtrack that increases in intensity as speed grows.
Jump Sound: A swift leap effect when clearing an obstacle.
Failure Sound: A falling impact noise when missing an obstacle.
Victory Sound: An achievement chime for surpassing a difficult sequence.
Game Goal:
Players must keep Akimana moving, avoiding obstacles while unraveling fragments of the Lost City's history. The
longer they survive, the more of the mystery they uncover—bringing them closer to discovering the legendary
civilization.
Here’s some Vue.js code to create a basic jumping game where a character must jump over obstacles.
Setting Up the Vue.js Project
bash
<template>
<div class="game-container">
<h1>Jumping Game</h1>
<div class="game-area">
<div class="character" :class="{ jump: isJumping }"></div>
<div class="obstacle"></div>
</div>
<button @click="startGame">Start Game</button>
<h3>Score: {{ score }}</h3>
</div>
</template>
<script>
export default {
data() {
return {
isJumping: false,
score: 0,
obstaclePosition: 300
};
},
methods: {
startGame() {
setInterval(() => {
this.score++;
this.moveObstacle();
}, 1000);
window.addEventListener("keydown", this.jump);
},
jump() {
this.isJumping = true;
setTimeout(() => {
this.isJumping = false;
}, 500);
},
moveObstacle() {
this.obstaclePosition -= 10;
if (this.obstaclePosition <= 0) this.obstaclePosition = 300;
}
}
};
</script>
<style>
.game-container {
text-align: center;
}
.game-area {
position: relative;
width: 400px;
height: 200px;
background: lightgray;
margin: auto;
overflow: hidden;
}
.character {
width: 50px;
height: 50px;
background: red;
position: absolute;
bottom: 0;
left: 50px;
transition: all 0.5s;
}
.character.jump {
bottom: 100px;
}
.obstacle {
width: 40px;
height: 40px;
background: blue;
position: absolute;
bottom: 0;
left: 300px;
}
</style>
Game Features
✅ Jump Mechanism: Players press a key to make the character jump. ✅ Moving Obstacle: The obstacle moves
toward the character. ✅ Score Counter: Tracks successful jumps. ✅ Styling: Simple animations using CSS.
Would you like additional features such as collision detection or sound effects? 🚀
yes
Great! Let's add collision detection and sound effects to enhance the game.
Updated Vue.js Jumping Game with Collision Detection and Sound Effects
Now, we'll check if the character collides with the obstacle and play sounds when jumping and failing.
Download or prepare sound effects (jump sound, collision sound) and place them in your project's assets folder:
jump.mp3
collision.mp3
Updated App.vue
vue
<template>
<div class="game-container">
<h1>Jumping Game</h1>
<div class="game-area">
<div class="character" :class="{ jump: isJumping }"></div>
<div class="obstacle" :style="{ left: obstaclePosition + 'px' }"></div>
</div>
<button @click="startGame">Start Game</button>
<h3>Score: {{ score }}</h3>
</div>
</template>
<script>
export default {
data() {
return {
isJumping: false,
score: 0,
obstaclePosition: 300,
gameInterval: null
};
},
methods: {
startGame() {
this.score = 0;
this.obstaclePosition = 300;
window.addEventListener("keydown", this.jump);
},
jump() {
this.isJumping = true;
this.playSound("jump.mp3");
setTimeout(() => {
this.isJumping = false;
}, 500);
},
moveObstacle() {
this.obstaclePosition -= 10;
if (this.obstaclePosition <= 0) this.obstaclePosition = 300;
},
checkCollision() {
if (!this.isJumping && this.obstaclePosition < 100 &&
this.obstaclePosition > 50) {
this.playSound("collision.mp3");
alert("Game Over! Final Score: " + this.score);
clearInterval(this.gameInterval);
}
},
playSound(filename) {
let sound = new Audio(require(`@/assets/${filename}`));
sound.play();
}
}
};
</script>
<style>
.game-container {
text-align: center;
}
.game-area {
position: relative;
width: 400px;
height: 200px;
background: lightgray;
margin: auto;
overflow: hidden;
}
.character {
width: 50px;
height: 50px;
background: red;
position: absolute;
bottom: 0;
left: 50px;
transition: all 0.5s;
}
.character.jump {
bottom: 100px;
}
.obstacle {
width: 40px;
height: 40px;
background: blue;
position: absolute;
bottom: 0;
}
</style>
New Features
✅ Collision Detection: If the character is not jumping when the obstacle reaches its position, the game ends. ✅
Sound Effects: Plays a jump sound when the player jumps and a collision sound when the game ends. ✅ Game
Restart: The game can be restarted without reloading.
11.
a) Containers for game stats typically include score and health. b) setInterval() in JavaScript is used to
execute a function repeatedly at specified intervals. c) To deploy a game project on Netlify, you need to connect
your project to a GitHub repository.
vue
<template>
<div class="game-container">
<h1>Jumping Game</h1>
<h3>Score: {{ score }}</h3>
<div class="game-area">
<div class="character" :class="{ jump: isJumping }"></div>
<div class="obstacle" :style="{ left: obstaclePosition + 'px' }"></div>
</div>
<button @click="startGame">Start Game</button>
</div>
</template>
<script>
export default {
data() {
return {
isJumping: false,
score: 0,
obstaclePosition: 300,
gameInterval: null
};
},
methods: {
startGame() {
this.score = 0;
this.obstaclePosition = 300;
this.gameInterval = setInterval(() => {
this.moveObstacle();
this.checkCollision();
}, 100);
window.addEventListener("keydown", this.jump);
},
jump() {
if (!this.isJumping) {
this.isJumping = true;
this.score++; // Increment score when jumping
setTimeout(() => {
this.isJumping = false;
}, 500);
}
},
moveObstacle() {
this.obstaclePosition -= 10;
if (this.obstaclePosition <= 0) this.obstaclePosition = 300;
},
checkCollision() {
if (!this.isJumping && this.obstaclePosition < 100 &&
this.obstaclePosition > 50) {
alert("Game Over! Final Score: " + this.score);
clearInterval(this.gameInterval);
}
}
}
};
</script>
<style>
.game-container {
text-align: center;
}
.game-area {
position: relative;
width: 400px;
height: 200px;
background: lightgray;
margin: auto;
overflow: hidden;
}
.character {
width: 50px;
height: 50px;
background: red;
position: absolute;
bottom: 0;
left: 50px;
transition: all 0.5s;
}
.character.jump {
bottom: 100px;
}
.obstacle {
width: 40px;
height: 40px;
background: blue;
position: absolute;
bottom: 0;
}
</style>
✅ Scoring System Added: Score increments when the player successfully jumps. ✅ Game Over Condition:
Displays the final score when a collision occurs.
bash
npm install -g netlify-cli
bash
npm run build
This creates a dist folder containing the optimized files for deployment.
1. Go to Netlify.
2. Click "New Site from Git".
3. Choose GitHub as the repository source.
4. Select your project repository.
5. Configure the build settings:
o Build Command: npm run build
o Publish Directory: dist
6. Click Deploy Site.
Step 5: Get Live URL Once deployed, Netlify provides a live URL for public access.
Final Notes
🏗 Scoring added: Players earn points when jumping successfully. 🚀 Deployment: The game is hosted on Netlify
for online access. 🎮 Playable Link: Once deployed, share the Netlify URL with players.
bash
npm install vue-router vuex axios
vue
<template>
<div class="game-container">
<h1>Jumping Game</h1>
<h3>Score: {{ score }}</h3>
<div class="game-area">
<div class="character" :class="{ jump: isJumping }"></div>
<div class="obstacle" :style="{ left: obstaclePosition + 'px' }"></div>
</div>
<button @click="startGame">Start Game</button>
<h3 v-if="gameOver">Game Over! Final Score: {{ score }}</h3>
<h3 v-if="gameOver">High Score: {{ highScore }}</h3>
<button v-if="gameOver" @click="resetGame">Restart</button>
</div>
</template>
<script>
export default {
data() {
return {
isJumping: false,
score: 0,
highScore: 0,
obstaclePosition: 300,
gameInterval: null,
gameOver: false
};
},
methods: {
startGame() {
this.score = 0;
this.obstaclePosition = 300;
this.gameOver = false;
<style>
.game-container {
text-align: center;
}
.game-area {
position: relative;
width: 400px;
height: 200px;
background: lightgray;
margin: auto;
overflow: hidden;
}
.character {
width: 50px;
height: 50px;
background: red;
position: absolute;
bottom: 0;
left: 50px;
transition: all 0.5s;
}
.character.jump {
bottom: 100px;
}
.obstacle {
width: 40px;
height: 40px;
background: blue;
position: absolute;
bottom: 0;
}
</style>
bash
npm run build
2. Connect to GitHub
3. Deploy on Netlify
1. Go to Netlify.
2. Click "New Site from Git".
3. Choose GitHub as the repository source.
4. Select your project repository.
5. Configure the build settings:
o Build Command: npm run build
o Publish Directory: dist
6. Click Deploy Site.
Final Enhancements
🏆 Leaderboard added: Track high scores. 🎭 Character animation: Improved jumping effect. ⚠️ Game Over
Screen: Prevents infinite loops. 🚀 Deployment: Hosted on Netlify for online access.
Web Development
1. What is a keyboard? B) A device used to input text and commands into a computer ✅
2. What is the most common keyboard layout in English-speaking countries? B) QWERTY ✅
3. Which key is typically found directly below the 'Q' key in a QWERTY layout? B) W ✅
4. Which keyboard layout is primarily used in France? C) AZERTY ✅
5. The primary home row keys for the left hand on a QWERTY keyboard are: A, S, D, and F. ✅
6. The key used to delete the character to the left of the cursor is called the Backspace key. ✅
7. Typing speed is typically measured in Words per minute (WPM). ✅
8. Ergonomics in typing involves developing proper posture and hand positioning to prevent strain and
injury. ✅
9. To create a capital letter, you hold down the Shift key while pressing the letter key. ✅
10. The function keys, such as F1, F2, etc., are located at the top of the keyboard. ✅
Typing
Description
Game
1. Nitro Type E A competitive racing game where your typing speed controls the speed of your car.
D An online multiplayer game where players race by typing passages from books, movies, and
2. Type Racer
songs.
3. TypingClub C Offers structured lessons and interactive games to improve typing skills.
4. ZType B A space shooting game where you destroy enemy ships by typing words.
5. Keybr A Provides typing exercises with real-time error detection and correction.
Since XYD-Ltd is an agricultural organization, a comprehensive company profile should include the following
sections:
1. Company Overview
o Name of the company
o Location (Musanze District)
o Year of establishment
o Mission and vision statements
2. Core Business & Services
o Agricultural products and services offered
o Key sectors (crop farming, livestock management, etc.)
o Sustainability practices
3. Organizational Structure
o Leadership and management team
o Departments (operations, finance, research, etc.)
4. Market & Industry Analysis
o Target market
o Competitor analysis
o Growth opportunities
5. Financial & Investment Information
o Revenue streams
o Business partnerships
o Funding sources
6. Technology & Innovations
o Digital tools used in farming
o Research & development initiatives
7. Compliance & Licensing
o RDB requirements for agricultural licensing
o Government regulations
8. Future Plans & Expansion Strategy
o Short-term and long-term goals
o Plans for expanding operations
9. Conclusion
o Summary of company values
o Final remarks
1. What is a webpage? C) A document on the World Wide Web that is identified by a unique URL ✅
2. What is a website? B) A collection of related web pages located under a single domain name ✅
3. What is a web browser? C) A software application for accessing and viewing information on the
World Wide Web ✅
4. What is a text editor? D) A tool used for writing and editing text and code ✅
5. What is a hyperlink? D) A reference or navigation element in a document that links to another
section of the same document or to another document ✅
6. Which of the following is not a web browser? C) Atom ✅
7. When installing software from a storage drive, what is the first step? B) Insert the storage drive into
the computer and locate setup ✅
8. Search Engine Optimization (SEO) refers to the practice of optimizing a website to improve its
visibility and ranking on search engine results pages (SERPs) such as Google, Bing, and Yahoo. ✅
9. Web accessibility ensures that websites and web applications can be used by people with various
disabilities. ✅
10. HTML (HyperText Markup Language) plays a crucial role in web accessibility by providing the
structural foundation that ensures content is accessible to all users, including those with disabilities.
✅
Column A Column B
1. Run Automated Tests E Scan your site with Axe DevTools for more detailed findings.
D Navigate your site using only the keyboard to ensure all interactive elements are
2. Conduct Manual Tests
accessible.
3. Perform User Testing C Recruit users with disabilities to test your site and provide feedback.
4. Validate Against
B Use the W3C Markup Validation Service to check your HTML for compliance.
Standards
5. Implement
A Re-test to ensure the issues are resolved and no new issues have been introduced.
Improvements
Since the company needs an informational website, here’s a suggested web structure:
Website Sections
1. Homepage
o Introduction to the company
o Highlights of ongoing projects
o Customer testimonials
2. About Us
o Company profile
o Mission and vision
o Leadership and team
3. Services
o Construction services offered
o Engineering capabilities
o Past projects showcase
4. Daily Activities
o Blog or news section for construction updates
o Project milestones
o Industry insights
5. Contact Us
o Contact form
o Email and phone numbers
o Physical address with location map
6. FAQs
o Common customer questions
o Payment and service terms
7. Careers
o Job openings
o Internship opportunities
1. What is the primary purpose of CSS in web development? c) To separate the content of a web page
from its presentation ✅
2. Which of the following is NOT a type of CSS? d) Exported CSS ✅
3. Which of the following methods is used to import an external CSS file within a CSS file? c) @import
✅
4. Which method is used to apply CSS to an HTML document by linking to an external stylesheet file?
c) External CSS ✅
5. Which of the following is NOT a valid value for the display property? d) inheritance ✅
6. Which of the following concepts includes margins, borders, padding, and the actual content in its
definition? c) CSS Box Model ✅
7.
a) The art and technique of arranging type to make written language legible, readable, and appealing when
displayed is known as Typography. ✅
b) There are two main groups of CSS properties that control typography style: Font properties and Text
properties. ✅
c) Use link pseudo-classes to create font styles for each link state. ✅
d) The <iframe> tag defines a rectangular region within the document in which the browser can display a
separate document, including scrollbars and borders. ✅
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FashionHub - Online Store</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>FashionHub</h1>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Shop</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</header>
<main>
<section class="banner">
<h2>Exclusive Fashion Collections</h2>
<p>Shop the latest trends in clothing and accessories!</p>
<button>Shop Now</button>
</section>
<section class="product-grid">
<div class="product">
<img src="dress.jpg" alt="Stylish Dress">
<p>Stylish Dress - $49.99</p>
</div>
<div class="product">
<img src="shirt.jpg" alt="Classic Shirt">
<p>Classic Shirt - $29.99</p>
</div>
</section>
</main>
<footer>
<p>© 2025 FashionHub. All Rights Reserved.</p>
</footer>
</body>
</html>
css
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
/* Navigation Menu */
nav ul {
list-style-type: none;
display: flex;
justify-content: space-around;
background-color: #333;
padding: 15px;
}
nav ul li a {
color: white;
text-decoration: none;
}
/* Banner Section */
.banner {
text-align: center;
padding: 50px;
background: url('banner.jpg') no-repeat center;
background-size: cover;
color: white;
}
/* Product Grid */
.product-grid {
display: flex;
flex-wrap: wrap;
justify-content: center;
padding: 20px;
}
.product {
width: 250px;
margin: 10px;
text-align: center;
}
.product-grid {
flex-direction: column;
align-items: center;
}
}
.product {
width: 100%;
}
}
768px (Tablets): Adjusts navigation and product grid for easier browsing.
480px (Smartphones): Optimizes text size and product layout for smaller screens.
Web Development
11. What is a keyboard? B) A device used to input text and commands into a computer ✅
12. What is the most common keyboard layout in English-speaking countries? B) QWERTY ✅
13. Which key is typically found directly below the 'Q' key in a QWERTY layout? B) W ✅
14. Which keyboard layout is primarily used in France? C) AZERTY ✅
15. The primary home row keys for the left hand on a QWERTY keyboard are: A, S, D, and F. ✅
16. The key used to delete the character to the left of the cursor is called the Backspace key. ✅
17. Typing speed is typically measured in Words per minute (WPM). ✅
18. Ergonomics in typing involves developing proper posture and hand positioning to prevent strain and
injury. ✅
19. To create a capital letter, you hold down the Shift key while pressing the letter key. ✅
20. The function keys, such as F1, F2, etc., are located at the top of the keyboard. ✅
Typing
Description
Game
1. Nitro Type E A competitive racing game where your typing speed controls the speed of your car.
D An online multiplayer game where players race by typing passages from books, movies, and
2. Type Racer
songs.
3. TypingClub C Offers structured lessons and interactive games to improve typing skills.
4. ZType B A space shooting game where you destroy enemy ships by typing words.
5. Keybr A Provides typing exercises with real-time error detection and correction.
Since XYD-Ltd is an agricultural organization, a comprehensive company profile should include the following
sections:
8. What is a webpage? C) A document on the World Wide Web that is identified by a unique URL ✅
9. What is a website? B) A collection of related web pages located under a single domain name ✅
10. What is a web browser? C) A software application for accessing and viewing information on the
World Wide Web ✅
11. What is a text editor? D) A tool used for writing and editing text and code ✅
12. What is a hyperlink? D) A reference or navigation element in a document that links to another
section of the same document or to another document ✅
13. Which of the following is not a web browser? C) Atom ✅
14. When installing software from a storage drive, what is the first step? B) Insert the storage drive into
the computer and locate setup ✅
11. Search Engine Optimization (SEO) refers to the practice of optimizing a website to improve its
visibility and ranking on search engine results pages (SERPs) such as Google, Bing, and Yahoo. ✅
12. Web accessibility ensures that websites and web applications can be used by people with various
disabilities. ✅
13. HTML (HyperText Markup Language) plays a crucial role in web accessibility by providing the
structural foundation that ensures content is accessible to all users, including those with disabilities.
✅
Column A Column B
1. Run Automated Tests E Scan your site with Axe DevTools for more detailed findings.
D Navigate your site using only the keyboard to ensure all interactive elements are
2. Conduct Manual Tests
accessible.
3. Perform User Testing C Recruit users with disabilities to test your site and provide feedback.
4. Validate Against
B Use the W3C Markup Validation Service to check your HTML for compliance.
Standards
5. Implement
A Re-test to ensure the issues are resolved and no new issues have been introduced.
Improvements
Since the company needs an informational website, here’s a suggested web structure:
Website Sections
8. Homepage
o Introduction to the company
o Highlights of ongoing projects
o Customer testimonials
9. About Us
o Company profile
o Mission and vision
o Leadership and team
10. Services
o Construction services offered
o Engineering capabilities
o Past projects showcase
11. Daily Activities
o Blog or news section for construction updates
o Project milestones
o Industry insights
12. Contact Us
o Contact form
o Email and phone numbers
o Physical address with location map
13. FAQs
o Common customer questions
o Payment and service terms
14. Careers
o Job openings
o Internship opportunities
7. What is the primary purpose of CSS in web development? c) To separate the content of a web page
from its presentation ✅
8. Which of the following is NOT a type of CSS? d) Exported CSS ✅
9. Which of the following methods is used to import an external CSS file within a CSS file? c) @import
✅
10. Which method is used to apply CSS to an HTML document by linking to an external stylesheet file?
c) External CSS ✅
11. Which of the following is NOT a valid value for the display property? d) inheritance ✅
12. Which of the following concepts includes margins, borders, padding, and the actual content in its
definition? c) CSS Box Model ✅
8.
a) The art and technique of arranging type to make written language legible, readable, and appealing when
displayed is known as Typography. ✅
b) There are two main groups of CSS properties that control typography style: Font properties and Text
properties. ✅
c) Use link pseudo-classes to create font styles for each link state. ✅
d) The <iframe> tag defines a rectangular region within the document in which the browser can display a
separate document, including scrollbars and borders. ✅
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FashionHub - Online Store</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>FashionHub</h1>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Shop</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</header>
<main>
<section class="banner">
<h2>Exclusive Fashion Collections</h2>
<p>Shop the latest trends in clothing and accessories!</p>
<button>Shop Now</button>
</section>
<section class="product-grid">
<div class="product">
<img src="dress.jpg" alt="Stylish Dress">
<p>Stylish Dress - $49.99</p>
</div>
<div class="product">
<img src="shirt.jpg" alt="Classic Shirt">
<p>Classic Shirt - $29.99</p>
</div>
</section>
</main>
<footer>
<p>© 2025 FashionHub. All Rights Reserved.</p>
</footer>
</body>
</html>
css
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
/* Navigation Menu */
nav ul {
list-style-type: none;
display: flex;
justify-content: space-around;
background-color: #333;
padding: 15px;
}
nav ul li a {
color: white;
text-decoration: none;
}
/* Banner Section */
.banner {
text-align: center;
padding: 50px;
background: url('banner.jpg') no-repeat center;
background-size: cover;
color: white;
}
/* Product Grid */
.product-grid {
display: flex;
flex-wrap: wrap;
justify-content: center;
padding: 20px;
}
.product {
width: 250px;
margin: 10px;
text-align: center;
}
.product-grid {
flex-direction: column;
align-items: center;
}
}
.product {
width: 100%;
}
}
768px (Tablets): Adjusts navigation and product grid for easier browsing.
480px (Smartphones): Optimizes text size and product layout for smaller screens.
Block-chain Architecture
Ideal Consensus Mechanism: Proof of Stake (PoS) ✅ Ensures secure transactions ✅ Prevents fraud with
cryptographic verification ✅ Decentralized verification for fair voting
Process:
✅ Decentralized File System → Stores large data off-chain ✅ Unique Hash-Based Identification → Ensures
immutable references ✅ Efficient Retrieval → Nodes fetch files peer-to-peer ✅ Reduces On-Chain Storage
Costs → Blockchain handles only transaction hashes, not bulk data
Diagram Overview:
+----------------------+
| Blockchain Ledger |
+----------------------+
|
---------------------------------------------
| | |
+------------+ +------------+ +------------+
| Manufacturer |-->| Distributor |----->| Retail Store |
+------------+ +------------+ +------------+
| | |
---------------------------------------------
|
+-----------------+
| Payment Gateway |
+-----------------+
Flow Explanation
✅ Smart Contracts automate transactions ✅ Blockchain ensures transparency & reduces fraud ✅ Supply
Chain entities interact securely
1. The Solidity compiler solc is used for deploying smart contracts on Ethereum. ❌ False ➝ solc is
used to compile smart contracts, but deployment is done via Ethereum clients like Hardhat, Remix, or
Truffle.
2. Arrays in Solidity can be of both fixed and dynamic size. ✅ True ➝ Solidity supports both fixed-
length and dynamic-length arrays.
3. A view function in Solidity can modify the state of a contract. ❌ False ➝ View functions only read
from the blockchain state and cannot modify it.
4. The modifier keyword in Solidity is used to define state variables. ❌ False ➝ Modifiers are used to
restrict function behavior, not define state variables.
5. The cost of storage in Ethereum increases when setting variables to zero. ❌ False ➝ Setting a
variable to zero reduces storage cost, as Ethereum refunds gas for deleted storage slots.
1. Which of the following best describes the purpose of the Ethereum Virtual Machine (EVM)? ✅ b) It
executes smart contracts and manages the state of the blockchain. ➝ The EVM ensures smart contract
execution and consensus.
2. Which of the following is an immutable keyword in Solidity that saves gas costs? ✅ b) constant ➝
Constant variables store fixed values and do not consume gas for transactions.
3. In Solidity, which operation consumes the most gas? ✅ b) Writing a new state variable ➝ Updating
storage variables costs the most gas due to permanent blockchain storage.
4. Which access modifier ensures a function can only be called from within the contract it’s defined in?
✅ b) private ➝ Private functions are only accessible within the same contract.
1. Use view and pure Functions → Reduce gas by avoiding state modifications.
2. Minimize Storage Writes → Store frequently accessed data in memory instead of storage.
3. Use Optimized Loop Structures → Minimize iterations and external contract calls.
1. Use Mappings Instead of Arrays → Mappings are more efficient than arrays for lookup operations.
2. Store Hashes Instead of Full Data → Store hashed references instead of raw values.
3. Use Off-Chain Storage → Store large datasets in IPFS or decentralized file storage, keeping only
references on-chain.
✅ Memory → Used for temporary storage; modifies data but has gas costs. ✅ CallData → Used for immutable
input data; does not modify state, making it cheaper. ✅ Optimization Strategy:
solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract TokenTransfer {
// Event to track transfers with indexed sender and receiver
event Transfer(address indexed sender, address indexed receiver, uint256
amount);
✅ Indexed Parameters → Enables fast searching in transaction logs ✅ Optimized Storage → No unnecessary
variables stored on-chain ✅ Low Gas Cost → Only emits an event, reducing transaction costs
Final Thoughts
1. Solidity supports error handling through the use of require, assert, and revert statements. ✅ True ➝
These functions help manage conditions, exceptions, and contract execution flow.
2. The modifier keyword is not used for inheritance but for altering function behavior. ✅ True ➝
Modifiers are used to restrict function execution, such as requiring authentication before a function runs.
3. ERC20 tokens are fungible, meaning they are interchangeable. ✅ True ➝ ERC20 tokens are fungible
because every token holds the same value and is interchangeable.
4. The ERC721 standard is used for Non-Fungible Tokens (NFTs), which are unique. ✅ True ➝
ERC721 is used for unique digital assets like NFTs, which differ from fungible ERC20 tokens.
5. Re-entrancy attacks occur when a function calls another contract before resolving its state, which
can lead to malicious exploits. ✅ True ➝ Re-entrancy attacks allow an attacker to repeatedly call an
external function before its state updates.
6. Ganache is a local blockchain network, not a public network like mainnet or testnet. ✅ True ➝
Ganache provides a local environment for developing and testing smart contracts.
1. Which of the following is a key feature of Solidity? ✅ b) Strong Type Checking ➝ Solidity requires
explicit type definitions, preventing unexpected behavior in smart contracts.
2. Which of the following is part of the ERC20 token standard? ✅ a) transfer() ➝ The transfer()
function moves tokens from the sender to another address.
3. Which network should you choose for deploying a smart contract in a production environment? ✅ c)
Mainnet ➝ Mainnet is Ethereum’s live blockchain used for real transactions.
4. Which third-party library can be used to secure smart contracts against overflow and underflow
attacks? ✅ a) OpenZeppelin ➝ OpenZeppelin provides Secure Smart Contract Libraries, including
SafeMath to prevent overflow errors.
solidity
function transfer(address recipient, uint256 amount) external {
require(balances[msg.sender] >= amount, "Insufficient balance");
balances[msg.sender] -= amount;
balances[recipient] += amount;
emit Transfer(msg.sender, recipient, amount);
}
solidity
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
🔹 Imports OpenZeppelin's ERC20 standard 🔹 Sets token name & symbol 🔹 Initializes token supply
✅ Deployment Steps
solidity
pragma solidity ^0.8.0;
import
"@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
struct NFT {
uint256 tokenId;
uint256 price;
address owner;
}
payable(nft.owner).transfer(msg.value);
_transfer(nft.owner, msg.sender, tokenId);
marketplace[tokenId].owner = msg.sender;
✅ NFT Minting: Allows users to create NFTs ✅ Indexed Events: Tracks minting & selling transactions ✅
Optimized Gas Usage: Efficient smart contract design
✅ Theoretical Understanding of Solidity Concepts ✅ Handling Balance Transfers with Error Management
✅ Step-by-Step ERC20 Token Deployment & Testing ✅ Comparison of NFT Standards & Optimized Smart
Contract for Marketplace
Theoretical Assessment: Web3 & Blockchain Frontend Integration
1. Which of the following is a common library used to integrate web3 applications with Ethereum smart
contracts? ✅ c) ether.js ➝ ether.js is widely used for interacting with Ethereum smart contracts from
web applications.
2. What is the purpose of MetaMask in blockchain development? ✅ b) To interact with the Ethereum
blockchain from the browser ➝ MetaMask allows users to manage wallets and send transactions via the
Ethereum network.
3. What information is required to connect a smart contract to a web3 frontend? ✅ b) Contract
address and ABI (Application Binary Interface) ➝ The contract address identifies the deployed
contract, and the ABI defines its callable functions.
4. What function does the smart contract typically provide in a decentralized crowdfunding platform?
✅ c) Handling contributions and withdrawals ➝ Smart contracts automate fund management, ensuring
fair transactions.
1. The MetaMask browser extension is required to create a wallet and interact with the Ethereum
blockchain. ✅ True
2. Once the smart contract is deployed, it is possible to update its code without redeploying it. ❌ False
➝ Smart contracts cannot be modified after deployment; changes require redeployment.
3. Connecting to a smart contract using its ABI allows interaction with the functions defined within the
contract. ✅ True
4. Test Ether from a faucet has real-world value and can be traded for goods or services. ❌ False ➝
Test Ether is only used on test networks and has no financial value.
1. In order to load balance in the MetaMask wallet, you need to access a ✅ C) faucet and request test
Ether.
2. When creating a smart contract instance in a frontend, the ✅ B) contract address and ABI are used
to establish a connection with the deployed contract.
3. To consume smart contract functions, developers use libraries like ether.js, which communicates
with the blockchain through ✅ C) JSON-RPC.
4. Once the web application is ready for production, developers must build the production bundle using
tools like ✅ B) Webpack and configure the environment variables for deployment.
✅ Tools Used:
✅ Steps Involved:
✅ Required Components:
javascript
import { ethers } from "ethers";
// Contract details
const contractAddress = "0x1234..."; // Replace with actual contract address
const contractABI = [ /* ABI JSON Array */ ];
const contract = new ethers.Contract(contractAddress, contractABI, signer);
javascript
async function contribute(amount) {
const tx = await contract.contribute({ value:
ethers.utils.parseEther(amount) });
await tx.wait();
console.log("Contribution successful!");
}
Steps Involved
Install MetaMask
Create wallet & load test Ether
Final Summary
✅ Theoretical Understanding → Blockchain Frontend Integration, MetaMask, Web3️ APIs ✅ Smart Contract
Deployment → Crowdfunding contract implemented using Solidity ✅ Frontend Integration → Web3️ application
connected to Ethereum network ✅ Practical Use Case → Crowdfunding platform deployed
Machine Learning
Theoretical Assessment: Machine Learning
1. The primary goal of machine learning is: ✅ b) To automate complex data analysis ➝ Machine
learning automates predictions and insights using data-driven models.
2. The following are types of machine learning, EXCEPT: ✅ d) Pattern Learning ➝ The three main
types are Supervised, Unsupervised, and Reinforcement Learning.
3. The first step in the machine learning life cycle is: ✅ a) Data Collection ➝ Without data, a machine
learning model cannot be trained.
4. Machine learning method that uses labeled data to train models is: ✅ b) Supervised Learning ➝
Supervised learning requires labeled data for training.
5. The main difference between Artificial Intelligence and Machine Learning is: ✅ b) ML is a subset of
AI ➝ Machine learning is a specific approach within the broader AI field.
6. The tool used for creating interactive data visualizations is: ✅ c) Plotly ➝ Plotly enables dynamic and
interactive plots in Python.
7. The following is a data cleaning technique: ✅ d) Removing duplicates ➝ Duplicate data can cause
errors in analysis and predictions.
8. "V" in Big Data refers to the speed at which data is generated: ✅ c) Velocity ➝ Velocity measures the
rapid increase in data generation.
9. A key characteristic of structured data is: ✅ b) Defined schema and organization ➝ Structured data
follows predefined schemas in databases.
10. The following are examples of unstructured data EXCEPT: ✅ c) Excel spreadsheet ➝ Excel
spreadsheets contain structured data in tabular formats.
1. Structured data ✅ refers to information organized in rows and columns in databases or spreadsheets.
2. Matplotlib ✅ is a popular data visualization library in Python for creating plots like line charts and
histograms.
3. Supervised Learning ✅ requires labeled data to make accurate predictions.
4. Box Plot ✅ is ideal for showing the distribution of numerical data by representing their quartiles and
potential outliers.
5. Normalization ✅ is essential to ensure that machine learning models do not give too much importance to
certain features with larger scales.
Follow these steps to prepare a machine learning environment to measure student performance:
bash
# Install Python (if not installed)
sudo apt update
sudo apt install python3
python
import pandas as pd
# Load dataset
df = pd.read_csv("student_performance.csv")
python
import matplotlib.pyplot as plt
import seaborn as sns
✅ Compare different visualization techniques to gain insights ✅ Use a heatmap to find correlations between
study hours and performance ✅ Avoid misleading graphs by using correct scales and labels
python
# Remove unnecessary data columns
df.drop(["student_id"], axis=1, inplace=True)
python
from sklearn.preprocessing import MinMaxScaler
print(df.head())
Final Outcome
✅ Installed and configured Python environment with ML libraries ✅ Collected and loaded student
performance dataset ✅ Applied various data visualization techniques (scatter plots, histograms, box plots,
heatmaps) ✅ Performed data cleaning, handling missing values, removing duplicates ✅ Applied
normalization to scale the data properly for better ML modeling
1. The primary purpose of Linear Regression in machine learning is: ✅ B) Predicting continuous
values ➝ Linear Regression models relationships between a dependent variable and independent variables.
2. Logistic Regression is mainly used for which type of problem? ✅ C) Classification problems ➝
Logistic Regression is used for binary classification problems, such as spam detection.
3. The primary goal of a Decision Tree in machine learning is: ✅ C) To split data based on feature
values to make decisions ➝ Decision trees make predictions by recursively splitting data based on
features.
4. The key feature of the Random Forest algorithm is: ✅ B) It builds multiple decision trees and
combines their predictions ➝ Random Forest combines multiple decision trees to improve accuracy and
reduce overfitting.
5. The main goal of Support Vector Machine (SVM) algorithm is: ✅ B) To find the hyperplane that
best separates classes ➝ SVM finds the best hyperplane for separating data into categories.
6. K-Nearest Neighbors (KNN) algorithm is used for: ✅ B) Regression and classification ➝ KNN makes
predictions based on the similarity of nearby data points.
7. The primary goal of K-Means Clustering algorithm is: ✅ B) To minimize the distance between data
points and their corresponding cluster centroid ➝ K-Means clusters data points based on similarity to
centroids.
8. Which of the following is a limitation of K-Means Clustering? ✅ B) It requires knowing the number
of clusters (K) in advance ➝ K-Means clustering requires predefining the number of clusters.
9. The main purpose of Principal Component Analysis (PCA) is: ✅ B) To reduce the dimensionality of
the dataset by transforming it into a new coordinate system ➝ PCA reduces the number of features
while preserving essential information.
10. What is the purpose of Anomaly Detection in machine learning? ✅ B) To identify rare items, events,
or observations that deviate significantly from the majority of the data ➝ Anomaly Detection helps
detect fraud, network intrusions, and rare patterns.
a) Feedforward Neural Networks ✅ 2. Processes data in one direction, commonly used for classification and
(FNNs) regression tasks
c) Convolutional Neural Networks ✅ 4. Used for image processing with convolutional layers detecting spatial
(CNNs) features
1. Regression ✅ is used to predict a continuous value based on one or more input features.
2. Clustering ✅ groups similar data points together based on their characteristics.
3. Classification ✅ is the main purpose of Logistic Regression.
4. Classification ✅ involves predicting labels from predefined categories.
1. Accuracy is the proportion of true results among the total number of cases examined. ✅ True
2. Precision is the ratio of correctly predicted positive observations to the total predicted positive
observations. ✅ True
3. Recall measures the proportion of actual positives that were correctly identified by the model. ✅
True
4. The F1 Score is the harmonic mean of Accuracy and Precision. ❌ False (F1 Score balances precision
and recall.)
5. Mean Absolute Error (MAE) measures the average of the absolute differences between predicted and
actual values. ✅ True
6. Root Mean Squared Error (RMSE) penalizes larger errors more than MAE because of the square
operation. ✅ True
7. R Squared score measures how well independent variables explain variance, and it ranges from -∞ to
1. ❌ False (R-Squared ranges from 0 to 1.)
8. Adjusted R Squared adjusts for the number of predictors in the model and prevents overfitting. ✅
True
9. Understanding independent variable contributions is important for model interpretation. ✅ True
10. Precision is more important than Recall when avoiding false negatives is critical. ❌ False (Recall is
more important in scenarios like medical diagnosis.)
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
# Load dataset
df = pd.read_csv("student_performance.csv")
# Predict results
y_pred = model.predict(X_test)
5. Visualize Predictions
python
print(f"RMSE: {rmse}")
print(f"MAE: {mae}")
print(f"R-Squared Score: {r2}")
7. Hyperparameter Tuning Using GridSearch
python
# Best parameters
print(grid_search.best_params_)
8. Apply Evaluation Metrics on Validation and Test Data
python
y_val_pred = model.predict(X_val)
y_test_pred = model.predict(X_test)
✅ Loaded dataset using Pandas, NumPy, and Scikit-Learn ✅ Split dataset into training, testing, validation
sets ✅ Trained model using Linear Regression ✅ Evaluated performance using RMSE, MAE, and R-
Squared ✅ Hyperparameter tuning applied using GridSearch ✅ Detected overfitting using R-Squared
scores
1. The primary benefit of using a web application for model deployment is: ✅ B) Real-time interaction
with users ➝ Web applications allow users to interact with models in real-time.
2. Common format for model files is: ✅ C) TensorFlow SavedModel ➝ TensorFlow’s SavedModel
format is widely used for deploying ML models.
3. API stands for: ✅ A) Application Programming Interface ➝ APIs allow communication between
applications and machine learning models.
4. Common data format used for sending input data to APIs: ✅ C) JSON ➝ JSON is a widely used
format for transmitting structured data.
5. Model deployment method NOT used in ML: ✅ C) Data scraping ➝ Data scraping collects data from
web sources but is not a model deployment method.
6. Main purpose of tracking API requests: ✅ C) To assess model performance and response times ➝
API tracking helps monitor model accuracy and efficiency.
7. When is a mobile app suitable for model deployment? ✅ B) For users requiring offline access and
notifications ➝ Mobile applications provide accessibility with offline functionality.
8. Common HTTP response code for a successful API request: ✅ B) 200 ➝ HTTP 200 means the request
was successful.
9. Crucial factor for ensuring model compatibility with the existing system: ✅ C) Programming
language and framework ➝ Compatibility ensures smooth integration with applications.
10. Primary goal of integrating the model file into an application: ✅ C) To provide predictions or
insights ➝ The model helps generate predictions or business insights.
11. Common methods for delivering predictions: ✅ D) All of the above ➝ REST APIs, Batch Processing,
and Real-time Streaming are common methods.
12. Best method for large volumes of data without immediate predictions: ✅ B) Batch Processing ➝
Batch processing processes data periodically rather than in real-time.
13. Best-suited method for real-time applications like chatbots: ✅ C) REST APIs ➝ REST APIs allow
real-time interactions between users and models.
14. Key factors in choosing a prediction delivery method: ✅ E) All of the above ➝ Latency, data volume,
security, and cost are crucial considerations.
15. Role of APIs in delivering ML predictions: ✅ A) APIs enable clients to interact with the model
programmatically. ➝ APIs allow users to send requests and receive predictions dynamically.
II. Matching Machine Learning Deployment Terms
Column A (Term) Column B (Description)
7. Model Deserialization ✅ F. Loading the saved model back into memory for inference
8. Environment Factors During Integration ✅ I. Python version, library versions, and dependencies
1. The main advantage of using a standalone program for model deployment is its ease of integration
with existing web applications. ✅ True
2. Scikit-Learn is a commonly used framework for deploying machine learning models. ✅ True
3. Monitoring performance involves tracking API requests, response times, and model accuracy. ✅
True
4. Batch processing is the only method available for deploying machine learning models. ❌ False (Real-
time streaming and REST APIs are also common.)
5. Proper formatting of predictions is unnecessary if the model is accurate. ❌ False (Formatted
predictions improve usability.)
6. Platforms offer high scalability and flexibility for deploying machine learning models. ✅ True
7. On-premise deployment provides the highest level of control over the model and its environment. ✅
True
8. Edge devices are typically used for high-latency applications where real-time processing is critical. ❌
False (Edge devices are used for low-latency applications requiring real-time predictions.)
9. Cost is a significant factor to consider when choosing a deployment method. ✅ True
10. Security is not a major concern when deploying machine learning models in the cloud. ❌ False
(Security is a critical factor when deploying models online.)
import pandas as pd
import numpy as np
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import train_test_split
import joblib
# Load dataset
df = pd.read_csv("house_prices.csv")
app = Flask(__name__)
@app.route('/predict', methods=['POST'])
def predict():
try:
# Get JSON request data
data = request.json
location_index = data["location_index"]
square_footage = data["square_footage"]
num_rooms = data["num_rooms"]
# Make prediction
prediction = model.predict([[location_index, square_footage,
num_rooms]])
except Exception as e:
return jsonify({"error": str(e)})
if __name__ == '__main__':
app.run(debug=True)
4. Test API with Sample Request
python
import requests
url = "http://127.0.0.1:5000/predict"
data = {"location_index": 3, "square_footage": 2000, "num_rooms": 4}
response = requests.post(url, json=data)
print(response.json())
5. Monitoring API Performance
python
end_time = time()
print("API Response Time:", end_time - start_time)
Final Features of the Deployment
✅ Trained house price prediction model ✅ Created API using Flask for real-time predictions ✅ Handled
errors to ensure smooth operation ✅ Tracked API performance to assess efficiency
PYTHON
1. Which of the following is a feature of Python? Answer: ✅ c) Indentation-based syntax ➝ Python uses
indentation to define blocks of code instead of curly brackets {}.
2. Python was created by: Answer: ✅ a) Guido van Rossum ➝ Guido van Rossum developed Python in
the late 1980s, and it was officially released in 1991.
3. Which Python framework is known for rapid development and scalability? Answer: ✅ b) Django ➝
Django is a full-stack web framework used for scalable applications.
4. Python can be used for: Answer: ✅ d) All of the above ➝ Python supports web development, data
analysis, machine learning, and more.
5. Which IDE is specifically designed for scientific computing? Answer: ✅ c) Spyder ➝ Spyder is built
for Python's scientific computing ecosystem, including NumPy and SciPy.
6. Python is classified as a(n): Answer: ✅ b) Interpreted language ➝ Python code is executed line by line
by the interpreter instead of being compiled.
7. What is the default file extension for Python scripts? Answer: ✅ c) .py ➝ Python scripts typically end
with .py.
8. The command to install a Python package using pip is: Answer: ✅ b) pip install package_name ➝
pip is Python’s package manager used for installing libraries.
9. Which of the following is NOT a Python web framework? Answer: ✅ c) NumPy ➝ NumPy is used for
numerical computing, not web development.
10. In Python, indentation is used to: Answer: ✅ b) Define the scope of loops and functions ➝ Proper
indentation is required for defining blocks of code in Python.
Since HHT LTD wants an online store with automated deployment and updates, follow these steps:
1. Install Python
bash
bash
bash
bash
yaml
6. Testing Deployment
bash
Summary
✅ Python Tools Installed: Environment setup, framework installation, and package management. ✅ Configured
Automatic Deployment: GitHub Actions deploys updates automatically. ✅ Testing and Hosting: Verified using
Django development server and deployment tools.
1. What is the correct syntax to create a list in Python? ✅ B) list = [1, 2, 3] ➝ Lists are defined using
square brackets [].
2. Which of the following is an immutable data type in Python? ✅ C) Tuple ➝ Tuples cannot be
modified once created.
3. What will the output of the following code be?
python
x = 5
y = 10
print(x > y)
Below is the Python implementation for the shopping cart system that stores data in a CSV file.
import csv
class ShoppingCart:
def __init__(self):
self.cart = []
def empty_cart(self):
self.cart.clear()
print("Cart is now empty.")
def display_cart(self):
if not self.cart:
print("Your cart is empty.")
else:
print("Shopping Cart Items:")
for item in self.cart:
print(f"- {item}")
# Example Usage
cart = ShoppingCart()
cart.add_item("Laptop")
cart.add_item("Headphones")
cart.display_cart()
cart.remove_item("Headphones")
cart.display_cart()
cart.save_to_csv()
cart.empty_cart()
cart.display_cart()
6. Explanation of Features
✅ Add Items: Adds products to the shopping cart ✅ Remove Items: Removes a specific product from the cart ✅
Empty Cart: Clears all items from the cart ✅ Store Data in CSV: Saves cart items in cart.csv for persistence
✅ View Cart: Displays current cart items
7. Sample Output
Added Laptop to the cart.
Added Headphones to the cart.
Shopping Cart Items:
- Laptop
- Headphones
Removed Headphones from the cart.
Shopping Cart Items:
- Laptop
Cart data saved to cart.csv
Cart is now empty.
Your cart is empty.
Final Notes
✅ Comprehensive Theoretical Assessment Answers ✅ Matching Questions for Data Types, Functions, and
Modules ✅ Complete Shopping Cart System Implementation in Python
10. Subclass F. A derived class that inherits properties from another class. ✅
II. Matching Python Libraries with Use Cases
Python Library Primary Use Case
2. The process of a class inheriting properties from another class is called inheritance . ✅
6. Data hiding is a feature of encapsulation that restricts direct access to some attributes. ✅
9. The ability to treat objects of different classes as objects of a common superclass is known as
polymorphism . ✅
10. Encapsulation is achieved when a subclass inherits methods and properties from a
superclass. ✅
Below is the implementation of the Health Management System for GIRUBUZIMA HOSPITAL using Object-
Oriented Programming (OOP) and Python libraries.
import datetime
class Patient:
def __init__(self, name, age, gender, disease):
self.__name = name # Private attribute
self.__age = age
self.__gender = gender
self.__disease = disease
self.__admission_date = datetime.datetime.now() # Timestamp
def calculate_days_since_admission(self):
return (datetime.datetime.now() - self.__admission_date).days
Step 2: Creating Specialized Classes (InPatient and OutPatient)
python
class InPatient(Patient):
def __init__(self, name, age, gender, disease, room_number):
super().__init__(name, age, gender, disease)
self.room_number = room_number
def get_details(self):
return super().get_details() + f", Room Number: {self.room_number}"
class OutPatient(Patient):
def __init__(self, name, age, gender, disease, appointment_date):
super().__init__(name, age, gender, disease)
self.appointment_date = appointment_date
def get_details(self):
return super().get_details() + f", Appointment Date:
{self.appointment_date}"
Step 3: Automating Post-Deployment Tasks Using Ansible
Ansible can automate service restarts and configuration updates. Create a playbook (deploy.yml):
yaml
bash
ansible-playbook deploy.yml
Step 4: Visualizing Patient Recovery Trends Using Matplotlib
python
# Sample Data
days = [1, 5, 10, 15, 20]
recovery_scores = [30, 50, 70, 85, 95]
✅ Encapsulation: Private patient details for data protection. ✅ Inheritance: Specialized InPatient and
OutPatient classes. ✅ Time Handling: Admission timestamps aligned with Rwanda’s timezone. ✅ Data
Analysis: Tracks recovery tren
👉 Explanation: DevOps focuses on removing silos and improving collaboration, automation, and continuous
delivery.
👉 Explanation:
👉 Explanation:
IaC allows managing servers and infrastructure through scripts or configuration files like Ansible, Terraform, etc.
iv. Which of the following is a version control system widely used in DevOps?
✅ Answer: A) Git
👉 Explanation: Git is a distributed version control system. Others like Docker and Kubernetes are used for
containers and orchestration, not version control.
Answer
Command (B) Function (C)
(A)
1. B cd To change directory
Command used to shut down the system
2. D sudo shutdown now
immediately
3. E mkdir To create directory
4. C cat Used to display contents of files
5. I sudo Run commands with superuser privileges
6. J cp Command used to copy files and directories
7. G pwd Displays the current working directory (root path)
sudo systemctl restart service-
8. F Restart system services
name
Used to install packages on Debian-based Linux
9. A sudo apt install
systems
Scenario Summary:
Rwanda Network Ltd is upgrading from a Windows Server to a Linux Server for managing web services. You're
tasked to:
bash
CopyEdit
# Step 1: Update the server
sudo apt update && sudo apt upgrade -y
Theoretical Assessment
i. Which of the following is a tool commonly used for Continuous Deployment (CD)? (a.) Jenkins b. Ansible c.
SonarQube d. Git * Explanation: Jenkins is a widely used open-source automation server that can orchestrate the
entire CD pipeline, from building and testing to deploying applications. Ansible is primarily a configuration
management and orchestration tool, SonarQube focuses on code quality, and Git is a version control system.
ii. What is the primary role of a Continuous Integration (CI) server? a. Manage code repositories (b.) Automate the
building and testing of code c. Orchestrate server deployments d. Monitor system uptime * Explanation: The core
function of a CI server is to automatically build, test, and integrate code changes from multiple developers into a
shared repository frequently.
iii. Which of the following tasks is related to Continuous Integration (CI)? a. Implementing automated rollback b.
Developing deployment scripts (c.) Setting up automated builds d. Using infrastructure as code (IaC) *
Explanation: Setting up automated builds is a fundamental practice in CI, ensuring that code changes are compiled
and packaged automatically. Automated rollback and deployment scripts are more related to CD, while IaC supports
the infrastructure needed for both CI and CD.
iv. Which tool is best suited for deployment orchestration in Continuous Delivery (CD)? a. GitLab CI (b.)
Kubernetes c. Jenkins d. Travis CI * Explanation: Kubernetes is a powerful container orchestration platform
designed for automating the deployment, scaling, and management of containerized applications, making it highly
suitable for CD. While GitLab CI, Jenkins, and Travis CI can handle deployments, Kubernetes provides more
advanced orchestration capabilities for complex deployments.
v. What does Infrastructure as Code (IaC) allow you to do? (a.) Automate deployments using scripts b. Manage code
quality c. Track software versions d. Create CI pipelines * Explanation: Infrastructure as Code (IaC) involves
managing and provisioning infrastructure using machine-readable definition files, rather than manual configuration.
This enables the automation of infrastructure deployment and management.
vi. Which of the following is NOT a task in Continuous Delivery (CD)? (a.) Configure the CI pipeline b. Perform
code quality checks c. Implement automated rollback d. Use a deployment orchestration tool * Explanation:
Configuring the CI pipeline is a prerequisite for CD but is considered part of the CI process. CD focuses on
automating the release of software to various environments after the CI process is complete.
vii. Which of the following steps would you take when implementing a Continuous Integration (CI) pipeline? a.
Configure CD pipeline (b.) Set up an automated build process c. Develop deployment scripts d. Use deployment
orchestration tools * Explanation: Setting up an automated build process is a crucial first step in implementing a CI
pipeline. The other options are more related to the CD pipeline.
viii. Which feature of Continuous Deployment (CD) helps in minimizing disruptions and errors during deployment?
(a.) Automated rollback b. Infrastructure as Code (IaC) c. Code quality checks d. Artifact management *
Explanation: Automated rollback allows the system to automatically revert to a previous stable version in case of a
failed deployment, minimizing disruptions and errors for users.
i. Describe CI and CD tools. CI (Continuous Integration) tools are designed to automate the process of building,
testing, and integrating code changes from multiple developers frequently. Examples include Jenkins, GitLab CI,
Travis CI, and CircleCI. These tools monitor code repositories, automatically trigger builds upon new commits, run
automated tests, and provide feedback on the integration process.
ii. What are the benefits of adopting DevOps approach? Adopting a DevOps approach offers numerous benefits,
including: * Faster Time to Market: Automation and streamlined processes lead to quicker software releases. *
Improved Collaboration: Breaking down silos between development and operations fosters better communication
and teamwork. * Increased Efficiency: Automation reduces manual tasks and errors, freeing up teams to focus on
innovation. * Enhanced Software Quality: Continuous testing and feedback loops lead to more stable and reliable
software. * Greater Agility: DevOps enables organizations to respond more quickly to changing market demands
and customer needs. * Reduced Operational Costs: Automation and efficient resource utilization can lower
operational expenses. * Improved Customer Satisfaction: Faster releases and higher quality software contribute to
better user experiences. * Increased Innovation: By reducing the overhead of deployments and operations, teams
can dedicate more time to developing new features.
iii. How does DevOps promote collaboration between development and operation teams? DevOps promotes
collaboration through several key principles and practices: * Shared Goals and Responsibilities: DevOps
encourages a culture where development and operations teams share common goals and are jointly responsible for
the entire software lifecycle. * Open Communication and Feedback: Regular communication, feedback loops, and
shared tools facilitate better understanding and alignment between teams. * Automation: Automating processes like
building, testing, and deployment reduces friction and dependencies between teams. * Cross-Functional Teams:
DevOps often involves organizing teams with members from both development and operations, fostering direct
collaboration. * Shared Ownership: Both teams take ownership of the entire product lifecycle, from development
to deployment and maintenance. * Empathy and Understanding: DevOps encourages team members to
understand the challenges and perspectives of their counterparts in the other team.
iv. What are the challenges that organizations might face when implementing DevOps? Implementing DevOps
can present several challenges: * Cultural Resistance: Overcoming traditional silos and resistance to change can be
difficult. * Skill Gaps: Teams may lack the necessary skills in areas like automation, cloud technologies, and cross-
functional collaboration. * Tool Sprawl and Integration: Choosing and integrating the right set of tools can be
complex and overwhelming. * Organizational Structure: Adapting the existing organizational structure to support
DevOps principles may require significant changes. * Security Concerns: Integrating security practices early in the
development lifecycle (DevSecOps) requires a shift in mindset and processes. * Measuring Success: Defining and
tracking the right metrics to demonstrate the value of DevOps can be challenging. * Initial Investment:
Implementing DevOps often requires investment in new tools, training, and infrastructure. * Maintaining
Momentum: Sustaining the DevOps transformation and ensuring continuous improvement requires ongoing effort
and commitment.
Practical Assessment
This section describes a practical scenario and doesn't require a direct answer in the same format as the theoretical
questions. However, it outlines a common set of tasks for a full-stack developer in a DevOps environment:
Stepping up the project: This likely involves understanding the project goals, architecture, and existing
infrastructure.
Containerizing the application: This would involve creating a Dockerfile to package the application and
its dependencies into a container image.
Deploying the application using a CI/CD pipeline: This would entail setting up or modifying a CI/CD
pipeline (e.g., in Jenkins, GitLab CI, or GitHub Actions) to automatically build the container image, run
tests, and deploy it to the target environment (likely using a container orchestration platform like
Kubernetes or Docker Swarm).
Performing data migration to a new database system: This would involve planning and executing a
strategy to move data from the old database to the new one, ensuring data integrity and minimal downtime.
This might involve writing migration scripts and coordinating the switchover within the deployment
pipeline.
i. What factors should be considered when selecting and installing monitoring tools?
✅ Answer:
Compatibility with infrastructure
Scalability
Real-time alerting capabilities
Integration with other tools (CI/CD, ticketing, dashboards)
Ease of use and installation
Cost and licensing model
Community or vendor support
iii. What are the different types of monitoring tools used in DevOps environments?
✅ Answer:
iv. What factors should be considered when selecting and installing monitoring tools?
✅ Answer (repetition of i):
Same as above – emphasize integration, performance impact, usability, and alerting features.
v. What is the importance of integrating feedback loops into the DevOps process?
✅ Answer:
a. Report findings should be presented in a clear and concise manner, using graphs, charts, and tables
T
where appropriate
b. Trends analysis can help identify patterns and anomalies in performance data T
c. Alerts and incidents should be documented in detail, including the time, date, and severity of the event T
Scenario:
You are tasked with setting up a monitoring environment for a web application running on cloud infrastructure.
You need to:
# Download Prometheus
wget
https://github.com/prometheus/prometheus/releases/download/v2.51.1/prometheus
-2.51.1.linux-amd64.tar.gz
# Run Prometheus
cd /etc/prometheus
./prometheus --config.file=prometheus.yml
📌 Install Grafana
bash
CopyEdit
sudo apt install -y software-properties-common
sudo add-apt-repository "deb https://packages.grafana.com/oss/deb stable
main"
sudo apt update && sudo apt install grafana -y
# Start Grafana
sudo systemctl start grafana-server
sudo systemctl enable grafana-server
Add Node Exporter to Prometheus targets for CPU, memory, and disk
Connect Grafana to Prometheus as a data source
Create dashboards to display:
o CPU usage
o Memory usage
o Web response times (via blackbox_exporter)
o Error rates (HTTP 4xx/5xx)
3. Generate Report
Project Requirement
📝 Theoretical Assessment
Data Manipulation (not clearly given) – Editing, sorting, and organizing data.
Answer: c) Cloud data – Cloud is where data is stored, not a category of data.
✅ Answer: b) Acknowledgement – It's used in formal reports like research, but not in regular data analysis
reports.
Scenario: KGD Innovation wants to attract more pet food customers using a website.
You are hired to collect, interpret, and report data in 4 hours.
1. Collect Data
2. Interpret Data
👉 Understanding: This question helps you learn key terms used in requirements analysis and communication.
b. Questionnaires are used only when analysts need ❌ Questionnaires are useful for many people due to time
info from a few people. False efficiency.
c. Gestures are not allowed during communication ❌ Gestures are part of non-verbal communication and
with customers. False help support understanding.
Visual aids like charts help make data easier to
d. Graphics may be used when interpreting data. ✅ True
understand.
✅ Confirmation of Receipt
✅ Encourages Open Communication
❌ Reduce errors in typing
❌ Encourage receiver to encode a short message
👉 Understanding: Feedback ensures the message is received and builds trust between sender and receiver.
👉 Explanation: Cloud data refers to storage location, not a data type. Types of data include:
Numerical
Categorical
Image
👉 Explanation: Data cleansing improves data quality by fixing issues like duplicates or missing values.
Question 8: Which is NOT an element of a data report?
✅ Answer: b) Acknowledgement
Introduction
Objective
Data collection methods
"Acknowledgement" is typically used in formal papers, not regular reports.
Scenario:
KGD Innovation sells pet food but has few customers due to lack of awareness. They want to build a website. You
are the analyst assigned.
How:
Interview workers and managers (e.g., what products they sell, who their customers are).
Survey nearby farmers (e.g., do they know about KGD? Would they use a website?).
Common responses and patterns (e.g., 70% of farmers don't know about KGD).
Specific needs (e.g., demand for delivery or online ordering).
Question 1:
………………… is a concise, informal description of a specific feature or functionality from the perspective of
an end user or customer.
👉 Explanation:
A user story is a brief statement that describes a feature from the perspective of the end user, typically in the
format:
As a [role], I want [goal] so that [benefit].
☑ Customer
☑ User
☑ Role
☑ Objective
☑ Benefit
✅ All the above
👉 Explanation:
All listed elements are involved in building a complete user story, especially Role, Objective, and Benefit which
form the core of user story writing.
✅ Answer: Role
👉 Explanation:
A Role is part of a user story, not a direct element of the backlog itself.
Project backlog typically includes:
Identifier
User story
Priority
(Other elements like estimates, acceptance criteria, etc.)
✅ Answer: a) Serves as a navigational aid by outlining the website's structure and helps users find
information.
👉 Explanation:
A sitemap helps both users (HTML sitemap) and search engines (XML sitemap) understand the website’s layout.
👉 Explanation:
XML sitemaps help search engines crawl and index the site.
HTML sitemaps help users navigate the site more easily.
Scenario Summary:
KABONA TSS is implementing a Student Information Management System (MIS). Requirements are already
collected. The analyst must now:
Create a sitemap
Generate a task flow
pgsql
CopyEdit
Home
├── Dashboard
│ ├── Notifications
│ └── System Status
├── Students
│ ├── Register New Student
│ ├── View All Students
│ └── Search Student
├── Classes
│ ├── Assign Students to Class
│ └── View Class List
├── Attendance
│ ├── Daily Attendance
│ └── Attendance Reports
├── Grades
│ ├── Enter Grades
│ └── View Grade Reports
├── Reports
│ ├── Student Performance
│ ├── Attendance Summary
│ └── Export to PDF/Excel
├── Settings
│ ├── User Roles
│ ├── System Configuration
│ └── Logout
text
CopyEdit
Start
↓
Login to System
↓
Navigate to “Students” → “Register New Student”
↓
Fill in student form (Name, DOB, Class, Contact Info, etc.)
↓
Validate Data
↓
Click “Save”
↓
System stores student data in the database
↓
Confirmation Message: “Student Registered Successfully”
↓
Redirect to Student List Page
↓
End
Version Control
Theoretical Assessment
5. Read the Following statement and answer by true if correct or false otherwise
a. The git add command is used to stage changes for the next commit.
o Answer: True
o Explanation: This is the primary purpose of git add.
b. The git add command can be used to stage both new files and modifications to existing files.
o Answer: True
o Explanation: git add stages changes regardless of whether the file is new (untracked) or
already tracked and modified.
c. The git commit command is used to permanently save changes to the local repository.
o Answer: True
o Explanation: Commits record the staged snapshots into the repository's history.
d. The git commit command requires a commit message to be provided.
o Answer: True
o Explanation: Git requires a message to describe the changes made in the commit, promoting
clarity and history tracking.
e. The git commit command can be used to merge branches in Git.
o Answer: False
o Explanation: The command specifically used for merging branches is git merge. While
completing a merge often automatically creates a merge commit, the git commit command
itself doesn't initiate or perform the merge operation.
Practical Assessment
This section describes a standard Git workflow scenario illustrating the commands covered in the theoretical
questions. It shows the practical application of:
Okay, here are the answers and explanations for the second set of Git assessment questions, formatted for easy
copying into a Word document.
Theoretical Assessment
1. Which of these Git client commands creates a copy of the repository and a working directory in the client’s
workspace?
2. True or False? In Git, if you want to make your local repository reflect changes that have been made in a
remote (tracked) repository, you should run the pull command.
3. Now, imagine that you have a local repository, but other team members have pushed changes into the
remote repository. What Git operation would you use to download those changes into your working copy?
a) To fetch changes from a remote repository without merging them into your local branch, you use the command
git **fetch**. * Explanation: git fetch downloads remote objects and refs but doesn't modify your local
working state. b) To fetch changes from a remote repository and merge them into your local branch, you use the
command git **pull**. * Explanation: git pull combines git fetch and git merge into one
command. c) To upload your local repository changes to a remote repository, you use the command git
**push** origin <branch-name>. * Explanation: git push sends your committed local changes to the
specified remote repository and branch. d) To see the status of your local repository, including which branch you are
on and any changes that are staged for commit, you use the command git **status**. * Explanation: git
status shows the state of the working directory and the staging area. e) To add all changes in your working
directory to the staging area, you use the command git **add .**. * Explanation: git add . stages all new,
modified, and deleted files in the current directory and its subdirectories. f) To commit your staged changes with a
message, you use the command git **commit** -m "Your commit message". * Explanation: git
commit records the staged changes into the repository history. The -m flag allows you to provide the commit
message inline. g) To create a connection to a new remote repository, you use the command git remote
**add** <name> <URL>. * Explanation: git remote add associates a name (e.g., 'origin', 'upstream') with
a remote repository's URL. h) To view the details of your remote repository connections, you use the command git
remote **-v**. * Explanation: git remote -v (verbose) lists the names of your remote connections along
with their URLs.
Practical Assessment
This scenario describes a collaborative software development workflow using Git to manage a bug fix:
1. Branching: Alex creates a separate branch (implied command: git checkout -b <branch-
name>) to work on the bug without disrupting the main codebase.
2. Committing & Pushing: Alex makes changes, commits them locally (git commit -m "..."), and
pushes the branch to the remote repository (git push origin <branch-name>) to back up the
work and make it visible to others.
3. Simulating & Merging Updates: Alex simulates client updates and merges them into the feature branch
(git merge <source-branch>), likely to test the fix against newer code or reproduce the bug under
specific conditions.
4. Collaboration (Fetching & Merging): Sarah works on related changes, pushes her branch (git push).
Alex then fetches Sarah's changes (git fetch origin <sarah-branch-name>) and merges them
into his own branch (git merge origin/<sarah-branch-name>) to integrate her contributions.
5. Git and Version Control System Assessment with Answers
6. 1. True or False
7.
a. Version control systems (VCS) track changes to files over time, enabling collaboration and version
history. - True
b. Distributed version control systems (DVCS) allow each user to have a complete copy of the repository
with its full history. - True
c. Branching in version control allows developers to work on separate features or fixes without interfering
with the main codebase. - True
d. Merging in version control combines changes from one branch or fork into another, integrating
separate lines of development. - True
e. Commits in version control systems are snapshots of the entire project at a specific point in time,
including all tracked files. - True
f. git pull fetches changes from a remote repository and merges them into the local repository. - True
g. git status displays information about the current state of the repository, such as modified files and
branch status. - True
h. git branch is used to create, list, delete, or manipulate branches in a Git repository. - True
Quality Assurance
Theoretical Assessment
Software testing is the process of evaluating and verifying that a software product or application does what it 1 is
supposed to do. It involves executing software components using manual or automated tools to evaluate one or more
properties of interest. The 2 primary goals of software testing are to identify defects (errors or bugs), ensure the
software meets specified requirements and user expectations, measure quality, and provide stakeholders with
information to make informed decisions about the software's release.
Q2. Match the following terms in column A with their corresponding descriptions column B.
Column C
Column A Column B
(Answer)
1. Description of test plan A. The process of identifying and selecting appropriate test tools B
B. A document outlining the scope, objectives, and approach for
2. Identify test tools A
testing a software product
3. Identify test techniques C. The process of creating specific test cases to execute E
D. The process of defining the criteria that will determine if a test is
4. Identify test cases C
successful or failed
E. The process of defining the specific methods and procedures that
5. Identify test criteria D
will be used to conduct testing
F. The process of assigning personnel, equipment, and other resources
6. Allocate resources F
needed for testing
G. The process of creating a timeline for completing the testing
7. Prepare Test Data I
process
8. Prepare Test Execution H. The process of creating detailed instructions for executing test
H
Scripts cases
9. Schedule test delivery I. The process of creating or obtaining data that will be used during
G
plan testing
Export to Sheets
1. Which of the following test techniques is most suitable for regression testing in a large-scale software
system?
o Correct Answer: b) Automated Testing
o Explanation: Regression testing involves re-running tests to ensure that recent code changes
haven't negatively impacted existing functionality. In large systems, this involves many repetitive
tests, making automation the most efficient and reliable approach.
2. What is the main advantage of using automated testing over manual testing?
o Correct Answer: c) Automated tests can be run repeatedly with less
effort and in less time.
o Explanation: Automation excels at executing repetitive test suites quickly and consistently,
reducing manual effort, saving time, and improving test coverage frequency, especially for
regression tests.
3. In which scenario would you typically choose parallel testing?
o Correct Answer: a) To verify that new software versions perform
consistently with the old version.
o Explanation: Parallel testing involves running two versions of a system (e.g., old and new)
simultaneously with the same inputs to compare their outputs and behaviour, ensuring the new
version maintains consistency or achieves expected changes.
Q4. Read the Following statement and answer by true if correct or false otherwise
a) Preparation of a testing environment involves setting up both hardware and software infrastructure. * Answer:
True * Explanation: A test environment requires the necessary hardware (servers, devices, network equipment) and
software (OS, databases, application builds, test tools) configured correctly. b) Hardware infrastructure is not
essential for testing as most testing is done on virtual environments. * Answer: False * Explanation: While virtual
environments are common, hardware is often essential, especially for testing hardware interaction (like medical
devices), performance under realistic loads, specific OS/device compatibility, or when virtualization doesn't
perfectly mimic the production hardware behaviour. c) Proper preparation of a testing environment helps prevent
configuration-related issues during testing. * Answer: True * Explanation: A well-defined and consistently
configured test environment minimizes the risk that test failures are due to environment setup errors rather than
actual software defects. d) Hardware and software requirements in a testing environment should always match those
in the production environment. * Answer: False * Explanation: While ideally, the test environment should closely
mirror production (especially for performance, load, and final acceptance testing), it's not always required or
feasible. Sometimes scaled-down environments are used for cost reasons, or specific configurations are needed for
certain types of testing (e.g., testing minimum requirements). The key is that the environment must be suitable for
the goals of the specific tests being run. e) Testing environments should be isolated from development environments
to avoid interference. * Answer: True * Explanation: Isolation prevents unstable code or configuration changes in
the development environment from affecting test results and ensures tests are run on a controlled, known baseline.
Q5. By using a table, differentiate Software testing tools and Hardware testing tools in software development
testing.
Practical Assessment
Here's an outline of how to approach the tasks for the healthcare technology company's hybrid system:
Introduction & Scope: Define the patient management application, its hybrid nature (integrating specific
medical devices), and what aspects (features, hardware interfaces, software modules) are in and out of
scope for this testing phase.
Test Objectives: State clear goals, e.g., verify accurate data transfer from medical devices, ensure patient
data integrity, validate application functionality meets requirements, confirm compliance with healthcare
regulations (like HIPAA), assess system performance and reliability, ensure usability for clinical staff.
Testing Strategy/Approach:
o Levels: Define unit, integration, system, and acceptance testing levels.
o Types: Specify types of testing needed: Functional, Integration (crucial for HW/SW interaction),
Performance, Security (especially for patient data), Usability, Compatibility (with specified
devices/OS), Regression, Compliance testing.
Test Environment: Detail hardware (specific medical devices or simulators, servers, workstations) and
software (OS, DB, application builds, drivers) requirements (covered further in point 2).
Test Techniques: Specify techniques (e.g., black-box, white-box, exploratory testing, equivalence
partitioning, boundary value analysis).
Tools: List intended software tools (e.g., test management tool, automation framework like
Selenium/Appium, API tester like Postman, performance tool like JMeter) and hardware tools (e.g., device
simulators, protocol analyzers, potentially oscilloscopes if debugging interfaces).
Test Deliverables: Define what documents/outputs will be produced (Test Plan itself, Test Cases, Test
Scripts, Test Data, Execution Logs, Defect Reports, Test Summary Report).
Resources: Assign roles and responsibilities (Test Lead, Testers, Developers for support).
Schedule: Outline timelines for planning, environment setup, execution cycles, and reporting.
Entry/Exit Criteria: Define conditions that must be met to start and end testing phases (e.g., build stability
for entry, critical defect count threshold for exit).
Risks & Mitigation: Identify potential risks (e.g., device availability, environment instability) and plan
mitigation strategies.
Hardware Setup:
o Procure or arrange access to the specified medical devices (or validated simulators if devices are
unavailable/costly).
o Set up necessary servers (application server, database server) with required specifications.
o Prepare client workstations matching target user configurations.
o Configure network infrastructure (connectivity between devices, servers, workstations; potentially
isolated test network).
Software Setup:
o Install and configure required operating systems, database management systems.
o Deploy the specific build/version of the patient management application to be tested.
o Install necessary drivers for medical devices.
o Install all planned software testing tools (test management, automation, performance, etc.).
Hardware Tool Setup: Connect and configure any required hardware testing tools (e.g., protocol
analyzers tapped into device communication lines).
Test Data Preparation: Generate or acquire realistic (but anonymized, respecting privacy regulations like
HIPAA) patient data and potentially simulated medical device data streams. Load this data into the test
database/environment.
Configuration & Verification: Configure application settings, user accounts, and permissions for testing.
Verify connectivity and basic operation of all components (hardware and software) before starting formal
execution. Ensure the environment is stable and baselined.
3. Execute Testing:
Test Case Execution: Run the documented test cases (manual and automated) according to the plan and
schedule.
Functional Testing: Verify the software features of the patient management application work as expected
based on requirements.
Hardware Interaction Testing: Test the integration points – data transfer from devices, commands sent to
devices, error handling for device communication failures.
Integration Testing: Test the interaction between different software modules and between the software
and hardware components.
Non-Functional Testing: Execute performance, load, stress, and security tests as defined in the plan. Test
usability with representative end-users if possible.
Defect Logging: Log any discrepancies, errors, or failures discovered during testing into a defect tracking
system with detailed steps to reproduce, expected vs. actual results, severity, and priority.
Regression Testing: After developers provide fixes, re-test the failed test cases and execute a broader
regression suite to ensure fixes didn't introduce new problems.
Reporting: Track test execution progress, defect metrics, and provide regular status reports (e.g.,
daily/weekly summaries, final test summary report). Communicate critical issues promptly.
Theoretical Assessment
Q2. Match the recommendation elements in column A to their corresponding descriptions in column B.
1. Executive Summary - B. Provides a brief overview of the report and the key points of the recommendation.
2. Problem Statement - D. Summarizes the issue or challenge that the recommendation addresses.
3. Proposed Solutions - E. Includes the main suggestions or recommendations made in the report to solve the
problem.
4. Action Plan - A. Outlines the steps and specific actions proposed to achieve desired outcomes.
5. Supporting Evidence - F. Offers data, research, or examples that back up the recommendations made in the
report.
6. Conclusion - G. Wraps up the report by reinforcing the key points and the importance of acting on the
recommendations.
7. Recommendations - C. Explains the reasons and supporting arguments for the recommended course of
action. (Note: There seems to be a slight mismatch in the original prompt's pairing for 'Recommendations'
and 'Proposed Solutions'. Standard practice often has 'Proposed Solutions' describe the options, while
'Recommendations' specifically state the chosen solution and the rationale. However, following your
provided matches: 7. Recommendations matches C. Explains the reasons and supporting arguments... and
3. Proposed Solutions matches E. Includes the main suggestions... I will adhere to your provided pairings).
Q3. What is the primary purpose of a User Acceptance Testing (UAT) report?
The primary purpose of a User Acceptance Testing (UAT) report is to provide stakeholders, particularly the end-
users or clients, with a clear and comprehensive summary of the UAT phase. It documents the results of the testing
performed by the users, highlighting whether the system meets their business requirements and is acceptable for
deployment. It captures test case execution status (passed, failed, blocked), details of any defects found, user
feedback, and ultimately provides a recommendation on whether the system is ready for production use from a user
perspective.
Q4. Who are the typical participants involved in UAT, and what roles do they play?
End Users/Client Representatives: These are the primary participants. They use the system in real-world
scenarios to validate if it meets their business needs and processes. They execute test cases, provide
feedback, and identify defects from a user's perspective.
Business Analysts: They help clarify business requirements, assist users in creating realistic test scenarios,
and ensure that the testing covers all necessary business processes. They often bridge the gap between users
and the project team.
Project Manager: Oversees the UAT process, ensures resources are available, monitors progress, and
facilitates communication between different teams. They use the UAT report to make decisions about
deployment.
QA Team: While not the primary testers in UAT, the QA team typically supports the UAT process. They
may help prepare the test environment, assist users with test execution, log defects reported by users, and
provide technical support.
Development Team: Developers are involved in fixing the defects reported during UAT. They may also
provide technical assistance or clarifications if needed.
Subject Matter Experts (SMEs): Provide in-depth knowledge about specific business processes or system
functionalities to help users and clarify requirements during testing.
Q5. How are test cases designed for UAT, and what factors are considered while creating them?
Test cases for UAT are designed from the user's perspective and are based heavily on business requirements and
real-world user scenarios.
Business Requirements: Test cases are directly derived from the documented business requirements to
ensure the system meets the intended business purpose.
User Workflows: Test cases simulate the actual steps and processes that end-users will perform when
using the system in their daily work.
Real-World Scenarios: Focus is placed on testing typical and critical scenarios that users will encounter,
including edge cases and exceptions relevant to business operations.
Usability: Test cases often implicitly or explicitly evaluate the ease of use and user experience.
Data Integrity: Testing ensures that data entered and processed by the system is accurate and consistent
from a business standpoint.
Security (from a user perspective): Testing might include verifying access controls and data privacy
based on user roles.
Integration with other systems: If the system interacts with other applications used by the business, UAT
test cases will cover these integration points.
Input from End Users: Test cases are often reviewed and refined based on feedback and input from the
actual users who will perform the testing.
Q6. What is the difference between "Passed" and "Failed" test cases in the UAT report?
Passed Test Case: A "Passed" test case means that when the steps outlined in the test case were executed,
the actual results observed in the system matched the expected results, and the system behaved as required
by the business specification for that particular scenario.
Failed Test Case: A "Failed" test case means that when the steps in the test case were executed, the actual
results observed in the system did not match the expected results. This indicates a defect, discrepancy, or an
issue where the system did not meet the business requirement or user expectation.
Q7. Why is it important to include both functional and business requirements in UAT?
Functional Requirements: Ensure that the system performs the specific technical functions it was
designed to do (e.g., a button saves data, a calculation is performed correctly). UAT verifies that these
functions work correctly from a user's operational standpoint.
Business Requirements: Ensure that the system solves the actual business problem, supports the necessary
business processes, and provides value to the organization. UAT validates that the functional features align
with the overall business goals and workflows.
Testing only functional requirements might mean the system works technically but doesn't actually help users
complete their tasks or meet business objectives. Conversely, focusing only on broad business requirements might
overlook critical functional defects that prevent the system from being used effectively. UAT bridges this gap by
ensuring the system is both functionally sound and business-relevant.
Q8. What are some common issues identified during UAT, and how are they typically resolved?
Defects/Bugs: Functional issues where the system doesn't perform as expected according to requirements.
o Resolution: These are logged as defects in a tracking system, prioritized based on severity and
business impact, and assigned to the development team for fixing.
Usability Issues: The system is difficult to navigate, understand, or use efficiently.
o Resolution: These are reported as feedback or enhancement requests. Depending on severity and
project constraints, they might be addressed immediately or deferred to a future release.
Missing Functionality: Features required by the business are not present in the system.
o Resolution: This indicates a gap in requirements or development. It requires investigation to
determine if the functionality was scoped out or missed. Resolution might involve adding the
feature (if critical and within scope) or documenting it as a future enhancement.
Incorrect Data or Data Handling: Issues with data entry, processing, storage, or reporting that don't align
with business rules.
o Resolution: Defects are logged and fixed by the development team. Data migration or correction
scripts might be needed.
Performance Issues: The system is slow or unresponsive under expected user load.
o Resolution: Requires investigation by performance engineers and developers to identify
bottlenecks and optimize the system.
Workflow Discrepancies: The system's workflow doesn't match the user's actual business process.
o Resolution: This might require system changes, process adjustments, or additional user training.
Resolution typically involves logging issues, prioritizing them, fixing defects, retesting the fixes (confirmation
testing), and potentially updating documentation or providing additional user training.
Q9. How do delays in UAT affect the overall project timeline and deployment?
Delays in UAT can significantly impact the overall project timeline and deployment:
Pushes back the Go/No-Go decision: The decision to deploy often hinges on successful UAT completion.
Delays in UAT postpone this critical decision point.
Delays Deployment: If UAT is not completed on schedule, the planned deployment date will likely be
pushed back.
Compresses Subsequent Activities: Delays in UAT can compress the time available for subsequent
phases like production deployment, user training, and post-go-live support preparation.
Increases Project Costs: Extended project timelines often lead to increased costs due to continued
resource allocation.
Impacts Business Operations: If the new system is critical for business operations, a delayed deployment
can negatively impact efficiency, revenue, or customer service.
Resource Conflicts: Delays can cause conflicts with resource availability for other projects or activities
planned after the original deployment date.
Q10. What actions should be taken after UAT if certain test cases fail?
If certain test cases fail during UAT, the following actions should be taken:
1. Document the Failure: The failed test case and the actual results must be meticulously documented in the
UAT report and the defect tracking system.
2. Log Defects: A formal defect (bug) should be created in the defect tracking system for each failure,
including steps to reproduce, actual vs. expected results, environment details, and severity level.
3. Prioritize Defects: The project team, often with input from business stakeholders, should prioritize the
defects based on their severity and business impact (e.g., critical, high, medium, low).
4. Communicate with the Development Team: The failed test cases and logged defects are communicated
to the development team for investigation and fixing.
5. Fix Defects: The development team works on resolving the identified defects based on their priority.
6. Retesting (Confirmation Testing): Once defects are fixed, the original failed test cases must be re-
executed to confirm that the fix works correctly and the test case now passes.
7. Regression Testing: Depending on the nature and location of the fixes, a subset of previously passed test
cases (regression tests) may need to be executed to ensure that the fixes haven't introduced new issues
elsewhere in the system.
8. Update UAT Report: The UAT report should be updated to reflect the status of the failed test cases and
the resolution of the defects.
9. Decision Point: Based on the number and severity of remaining open defects after retesting, the
stakeholders decide whether the system is acceptable for deployment or if further fixes and testing are
required.
Q11. What role does test data play in the success of UAT?
Realism: Using test data that closely resembles production data (while respecting privacy regulations)
allows users to test the system using familiar data structures, formats, and volumes, making the testing
more realistic and relevant to their daily work.
Coverage of Scenarios: Appropriate test data is essential to execute all designed test cases and cover
various business scenarios, including typical cases, edge cases, and error conditions.
Validation of Business Rules: Test data allows users to verify that the system correctly applies business
rules to different data inputs and outputs.
Performance Testing: Realistic volumes and types of data are needed to assess the system's performance
under expected load.
Validation of Reports and Outputs: Accurate test data is required to verify that reports, calculations, and
other system outputs are correct.
Insufficient, unrealistic, or poorly prepared test data can severely limit the effectiveness of UAT, preventing users
from thoroughly validating the system and potentially leading to critical issues being missed before deployment.
Q12. Why is it important to document the actual results alongside the expected results in UAT?
Documenting the actual results alongside the expected results in UAT is critical for several reasons:
Verification of Success/Failure: It provides the evidence to clearly determine whether a test case passed
or failed by comparing what should have happened (expected result) with what did happen (actual result).
Defect Reporting: When a test case fails, the actual result is essential information for logging a defect. It
tells developers exactly what the system did incorrectly, which is crucial for diagnosing and fixing the
issue.
Clarity and Communication: It removes ambiguity about the outcome of a test. Anyone reviewing the
UAT report or defect can understand exactly what the user observed.
Audit Trail: The documented actual results provide an audit trail of the testing performed and the observed
behavior of the system at a specific point in time.
Regression Testing Reference: If a defect is fixed and retested later, the documented actual result of the
original failure serves as a reference point.
Evidence for Go/No-Go Decision: The collection of actual results across all test cases provides the data
needed for stakeholders to make an informed decision about whether the system is ready for deployment.
4. QA teams are responsible for writing requirements and specifications. - Answer: False
7. Automated testing tools can completely replace manual testing. - Answer: False
8. QA teams should be isolated from development teams to avoid conflicts of interest. - Answer: False
9. Quality Assurance (QA) is primarily focused on preventing defects in a product or service. - Answer: True
10. The main stages of the Quality Assurance process include planning, assurance, and control. - Answer: True
11. Quality Control (QC) is a proactive process, while Quality Assurance (QA) is reactive. - Answer: False
12. ISO 9001 is a widely recognized standard for Quality Management Systems. - Answer: True
13. One of the main benefits of Quality Assurance is improved customer satisfaction. - Answer: True
14. Statistical process control (SPC) is a tool used in Quality Control, not in Quality Assurance. - Answer: True
15. Quality Assurance involves the use of methods like audits and process evaluations. - Answer: True
5. What is the purpose of documenting assumptions and constraints in an inception report analysis?
Answer: d. All of the above
Q4. What is the main difference between Quality Assurance (QA) and Quality Control (QC)?
Answer: QA is process-oriented and focuses on preventing defects, while QC is product-oriented and focuses on
identifying defects in finished products.
Practical Assessment
XYZ company is embarking on a new software development project to launch an advanced CRM system. The QA
team is responsible for ensuring the product meets both functional and non-functional requirements while
adhering to industry standards. The QA team is tasked with:
1. Implementing quality assurance processes
2. Analysing the Terms of Reference (ToR)
3. Reviewing the requirement specifications
4. Assessing the project’s inception report
System Administration
Networking and Window Server
1. Which network topology connects all devices to a single central hub? ✅ a) Star ➝ In a star topology,
all devices are connected to a central hub or switch, making troubleshooting easier.
2. What type of cable is commonly used for high-speed internet connections and has high resistance to
interference? ✅ c) Fiber optic ➝ Fiber optic cables transmit data at high speeds over long distances
and are resistant to electromagnetic interference.
3. Which network device amplifies signals to extend the range of a network? ✅ c) Repeater ➝ A
repeater strengthens signals, allowing data to travel longer distances without degradation.
4. What is the primary benefit of using fiber optic cables over copper cables? ✅ b) Higher speed and
bandwidth ➝ Fiber optics allow faster data transmission with less signal loss.
5. Which tool is used to remove the insulation from network cables? ✅ b) Stripping tool ➝ A stripping
tool is designed to remove the outer layer of network cables without damaging the wires inside.
6. In a network, what device is used to connect different network segments and route data between
them? ✅ b) Router ➝ Routers manage network traffic and connect different networks, such as LANs
to the internet.
7. What type of network cabling is suitable for outdoor installations? ✅ b) Fiber optic ➝ Fiber optic
cables are suitable for outdoor installation due to their weather resistance.
8. Which network topology requires that each device is connected to exactly two other devices? ✅ c)
Ring ➝ In a ring topology, each device has two direct neighbors, forming a circular data path.
9. Which of the following is a common connector type for twisted pair cables? ✅ a) RJ45 ➝ RJ45
connectors are used in Ethernet networks for connecting twisted pair cables.
10. What is the purpose of a network patch panel? ✅ b) To connect and organize cables ➝ Patch panels
centralize cable management, making network maintenance easier.
11. Which network topology involves all devices being connected in a straight line? ✅ c) Bus ➝ In a bus
topology, all devices share a single communication line.
12. Which of the following is a disadvantage of a bus topology? ✅ c) If one cable fails, the entire network
goes down ➝ Single-point failure can affect all connected devices in bus topology.
13. Which tool is used to test the continuity of network cables? ✅ b) Testing tool ➝ Cable testers check if
a cable is properly connected and not damaged.
14. What material is commonly used for trunking in network cable installations? ✅ b) Plastic ➝ Plastic
trunking is commonly used to organize and protect cables.
15. Which type of network cable is best suited for high-speed data transmission over long distances? ✅
c) Fiber optic ➝ Fiber optic is ideal for high-speed, long-distance data transmission.
✅ 1. Network cables with twisted pair configurations are less susceptible to interference. → True ✅ 2. Fiber
optic cables are commonly used for short-distance connections due to their high cost. → False (Fiber optic
cables are used for long-distance connections.) ✅ 3. A network hub operates by sending data to all devices
connected to it. → True ✅ 4. A switch can improve network performance by reducing data collisions. →
True ✅ 5. Coaxial cables are the most suitable for high-speed internet connections. → False (Fiber optic cables
are better for high-speed internet.) ✅ 6. The RJ45 connector is used for fiber optic cables. → False (RJ45 is
used for twisted pair cables.) ✅ 7. Cable ties are used to secure and organize cables. → True ✅ 8. Patching
refers to connecting different networks through a patch panel. → False (Patching refers to organizing cable
connections.) ✅ 9. A UPS provides backup power to network equipment during outages. → True ✅ 10.
Tagging is the process of assigning labels to network devices and cables. → True
✅ 11. A router is used to connect different networks and route data between them. → True ✅ 12. Crimping
tools are used for testing the continuity of network cables. → False (Cable testers are used for continuity
testing.) ✅ 13. The main advantage of using coaxial cables is their flexibility and ease of installation. → False
(Fiber optic and twisted pair cables are more flexible.) ✅ 14. Open-wire network installations are typically used
for outdoor aerial connections. → True ✅ 15. Fiber optic cables are resistant to electromagnetic interference.
→ True
J. Logical AND Operator ✅ 3. The subnet mask divides a network into subnets
✅ 1. Class B IP addresses have a default subnet mask of 255.255.0.0. → True ✅ 2. Static IP addresses are
assigned automatically by a DHCP server. → False (Static IPs are manually assigned.) ✅ 3. IPv6 addresses are
written in hexadecimal format. → True ✅ 4. A subnet mask of 255.255.255.240 allows for 14 usable host
addresses. → True ✅ 5. Subnetting reduces the number of available IP addresses in a network. → False
(Subnetting divides an IP range for better management.) ✅ 6. The binary equivalent of the decimal number 128
is 10000000. → True ✅ 7. CIDR allows for more flexible IP address allocation than traditional subnetting. →
True ✅ 8. A logical OR operation is used to calculate network addresses. → False (AND is used for network
address calculations.) ✅ 9. Automatic IP address assignment can occur without a DHCP server. → False
(DHCP automates IP allocation.) ✅ 10. The hostname of a network device must be unique within the
network. → True
✅ Given IP Range: 192.168.10.0/24 ✅ Office has 4 departments → Each requires a separate subnet
Subnet Calculation
Each department needs at least 30 devices: Using CIDR notation, /27 provides 32 total IPs per subnet (30
usable)
✅ Assign Hostnames
bash
bash
bash
bash
bash
✅ Physical Testing
✅ Unit Testing
✅ Integration Testing
🚀 Outcome: Fully operational network with optimized IP addressing, configured devices, and verified
connectivity!
Theoretical Assessment: Network Maintenance
Part 1: Multiple-Choice Questions with Answers
1. Which of the following is a common practice in hardware preventive maintenance for network
equipment? ✅ C) Cleaning dust from hardware components ➝ Dust buildup can cause overheating
and hardware failures.
2. What is the primary purpose of software preventive maintenance in a network environment? ✅ C)
To enhance software performance and security ➝ Regular updates prevent vulnerabilities and
optimize performance.
3. Which tool is most commonly used to check the integrity of network cables during preventive
maintenance? ✅ B) Cable tester ➝ A cable tester verifies if a cable is properly transmitting signals.
4. During preventive maintenance, why is it important to keep firmware up to date on network devices?
✅ D) To patch security vulnerabilities and improve device performance ➝ New firmware fixes bugs
and enhances device security.
5. What should be done before performing any hardware preventive maintenance on network
equipment? ✅ C) Back up the current configuration ➝ Backups ensure network settings are preserved
in case of failure.
1. What are the three main ways of reporting the outcome of a network maintenance activity? ✅
Incident Reports → Document specific issues and resolutions. ✅ Maintenance Logs → Record
scheduled or corrective maintenance actions. ✅ Network Performance Analysis → Use metrics to track
efficiency improvements.
2. Why is it important to include the tools, materials, and equipment used in a maintenance report? ✅
Ensures accuracy → Helps IT teams track repairs and replacements. ✅ Standardizes procedures →
Improves consistency for future maintenance. ✅ Facilitates budgeting → Assists in cost estimation for
upgrades.
Practical Assessment: Diagnosing & Resolving Network Issues at ABC Corp
Step 1: Identify & Diagnose the Issues
✅ Network Symptoms:
✅ Diagnostic Tools:
1. A ✅ Recursive query involves the DNS server handling the entire resolution process and returning
the final result to the client.
2. In DNS operations, ✅ Caching helps improve performance by storing recently resolved query
results.
3. Root Hints ✅ are lists of IP addresses of root DNS servers used by DNS servers to start the
resolution process.
4. An ✅ Authoritative DNS server provides definitive answers for queries about domains it is
responsible for.
5. A ✅ Zone file contains DNS resource records such as A, CNAME, and MX records for a zone.
6. The DHCP client starts the process by sending a ✅ Discover message to locate available DHCP
servers.
7. The DHCP server confirms the assignment of an IP address and provides additional configuration
settings with an ✅ Acknowledgement message.
8. The DHCP process begins with the client sending a ✅ Discover message.
9. DHCP ✅ Failover involves configuring two DHCP servers to share lease information, allowing one
server to take over if the other fails.
10. To prevent unauthorized DHCP servers from providing IP addresses, network administrators use ✅
DHCP Snooping on switches.
11. A DHCP ✅ Relay agent forwards DHCP messages between clients and servers when they are on
different subnets.
12. The DHCP relay agent operates by receiving DHCP requests from clients and ✅ Forwarding them
to the appropriate DHCP server.
✅ Install Windows Server ✅ Verify network settings & assign static IP ✅ Create administrator account &
set strong password
✅ Install AD DS Role
powershell
Install-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools
powershell
Install-ADDSForest -DomainName "bxzsolutions.local"
powershell
Install-WindowsFeature -Name DHCP -IncludeManagementTools
powershell
Install-WindowsFeature -Name DNS -IncludeManagementTools
powershell
nslookup bxzsolutions.local
Final Outcome
✅ Fully configured Active Directory for network authentication ✅ DHCP, DNS, and essential services
installed for efficient management ✅ Verified system functionality using NSLOOKUP & DHCP tests
1. Which of the following is a security group in Windows Server? ✅ d) All of the above ➝ Security
groups in Active Directory include Global, Universal, and Domain Local Groups, each serving different
purposes.
2. What is the purpose of an Organizational Unit (OU) in Active Directory? ✅ c) To organize objects
hierarchically and logically ➝ OUs help organize and manage users, computers, and groups in a
structured way.
3. Which of the following is not a common user account permission in Active Directory? ✅ d)
Administrator ➝ Permissions like Full Control, Modify, and Read/Write are common; Administrator
is a role, not a permission.
4. What is the default user account type created when a new user is added to Active Directory? ✅ d)
Domain User ➝ New users by default are Domain Users, who have basic access within the domain.
1. The Domain Admins group has full control over all objects in an Active Directory domain. ✅ True
2. You can create a new user account by copying an existing one. ✅ True
1. A(n) ✅ Organizational Unit (OU) is a collection of user accounts and other objects in Active
Directory.
2. The ✅ Member Of tab in the user account properties dialog allows you to manage group
memberships.
3. To change a user's password in Active Directory, you need to have ✅ Administrator privileges.
powershell
New-ADUser -Name "Umutoni Claudine" -GivenName "Umutoni" -Surname "Claudine"
-Department "Sales" -UserPrincipalName "[email protected]"
New-ADUser -Name "Kamali Emmanuel" -GivenName "Kamali" -Surname "Emmanuel" -
Department "IT" -UserPrincipalName "[email protected]"
New-ADUser -Name "Kanyana Viviane" -GivenName "Kanyana" -Surname "Viviane" -
Department "HR" -UserPrincipalName "[email protected]"
powershell
Set-ADAccountPassword -Identity "[email protected]" -
NewPassword (ConvertTo-SecureString "StrongP@ss123" -AsPlainText -Force)
Set-ADAccountPassword -Identity "[email protected]" -
NewPassword (ConvertTo-SecureString "SecureP@ss456" -AsPlainText -Force)
Set-ADAccountPassword -Identity "[email protected]" -
NewPassword (ConvertTo-SecureString "HRP@ss789" -AsPlainText -Force)
powershell
New-ADGroup -Name "Sales Team" -GroupScope Global -GroupCategory Security
New-ADGroup -Name "IT Support" -GroupScope Global -GroupCategory Security
powershell
Add-ADGroupMember -Identity "Sales Team" -Members "UClaudine"
Add-ADGroupMember -Identity "IT Support" -Members "KEmmanuel"
powershell
Grant-ADPermission -Identity "Sales Team" -Permission Read
Grant-ADPermission -Identity "IT Support" -Permission FullControl
powershell
New-ADOrganizationalUnit -Name "Sales" -Path
"OU=SpecialSolutions,DC=specialsolutions,DC=local"
New-ADOrganizationalUnit -Name "IT" -Path
"OU=SpecialSolutions,DC=specialsolutions,DC=local"
New-ADOrganizationalUnit -Name "Human Resources" -Path
"OU=SpecialSolutions,DC=specialsolutions,DC=local"
powershell
Move-ADObject -Identity "CN=Umutoni Claudine,DC=specialsolutions,DC=local" -
TargetPath "OU=Sales,DC=specialsolutions,DC=local"
Move-ADObject -Identity "CN=Kamali Emmanuel,DC=specialsolutions,DC=local" -
TargetPath "OU=IT,DC=specialsolutions,DC=local"
Move-ADObject -Identity "CN=Kanyana Viviane,DC=specialsolutions,DC=local" -
TargetPath "OU=Human Resources,DC=specialsolutions,DC=local"
powershell
Set-ADACL -Identity "HelpDeskTechnician" -Permissions "Reset Password"
powershell
DelegateControl -OU "Sales" -Identity "HelpDeskTechnician" -Permissions
"Create/Delete User Accounts"
DelegateControl -OU "IT" -Identity "HelpDeskTechnician" -Permissions
"Create/Delete User Accounts"
powershell
Set-ADDefaultDomainPasswordPolicy -ComplexityEnabled $true -LockoutThreshold
5 -MaxPasswordAge 90
powershell
Set-ADAccountControl -Identity "SpecialSolutionsUsers" -
PasswordComplexityRequired $true -PasswordNeverExpires $false
powershell
Enable-ADUserAudit -Identity "SpecialSolutionsUsers"
✅ Document all user accounts, permissions, and security policies ✅ Regularly audit user activities and
compliance reports ✅ Provide user training on security practices and password management
🚀 Outcome: Fully managed Active Directory with structured user access and security policies in place!
1. What is Handler Mapping in IIS? ✅ b) Assigning request handlers to specific types of requests ➝
Handler Mapping assigns request handlers for different file types (such as .aspx, .php, .html).
2. Which of the following is NOT a type of web server? ✅ c) SQLite ➝ SQLite is a database
management system, not a web server.
3. What protocol is used for secure communication between a client and a web server? ✅ c) HTTPS ➝
HTTPS encrypts communication between client and server using SSL/TLS certificates.
4. Which of the following is a benefit of using IIS? ✅ c) Tight integration with Windows and .NET ➝
IIS is optimized for Windows Server and integrates well with .NET applications.
5. Which environment variable should be set to specify the configuration file for PHP in IIS? ✅ b)
PHP_INI_DIR ➝ This variable specifies the location of the PHP configuration file (php.ini).
1. IIS can be installed on Linux-based systems. ❌ False ➝ IIS is Windows-only; Linux uses Apache or
Nginx.
2. FTP is used to transfer files securely between a client and a server. ❌ False ➝ FTP is not secure;
FTPS or SFTP should be used instead.
3. WinCache is a caching extension for PHP that can be used in IIS to improve performance. ✅ True
4. Site binding in IIS is used to define how the server listens for incoming connections, specifying the
protocol, IP address, port, and hostname. ✅ True
5. The SSL certificate is required to enable HTTP site binding in IIS. ❌ False ➝ SSL certificates are
only required for HTTPS bindings.
powershell
Install-WindowsFeature -Name Web-Server -IncludeManagementTools
powershell
iisreset
powershell
New-WebSite -Name "FFF Rwanda" -Port 80 -PhysicalPath
"C:\inetpub\wwwroot\FFF_Rwanda" -HostHeader "www.fffrwanda.site"
powershell
New-WebBinding -Name "FFF Rwanda" -IPAddress "*" -Port 443 -Protocol "https"
🚀 Outcome: FFF Ltd can now access their web application via both HTTP and HTTPS!
1. Open Server Manager → Click Manage → Select Add Roles and Features.
2. Choose Role-based or Feature-based Installation.
3. Select the server and click Next.
4. Under Server Roles, check Web Server (IIS).
5. Install required features (like CGI for PHP, IIS Management Tools).
6. Click Install.
powershell
nslookup www.fffrwanda.site
powershell
ping www.fffrwanda.site
text
http://www.fffrwanda.site
https://www.fffrwanda.site
🚀 Outcome: FFF Ltd's web application is now securely accessible via both HTTP and HTTPS!