CS521 Current Finals Subjective by MS-Team.pdf
Verified academic study resource for CS521 (Data Science Principles) under the Computer Science at Virtual University of Pakistan. This PDF document (Final-Term Solved Past Paper & Examination Pack) covers Final-Term Exam Scope (Lectures 23 to 45) spanning approximately 320 pages across 4 curriculum modules, and is indexed for student examination review with instant in-browser preview and 100% free direct download.
- Course
- CS521 – Data Science Principles
- Faculty
- Computer Science
- Format
- Type
- Final-Term
- Coverage
- Final-Term Exam Scope (Lectures 23 to 45)
- Tags
- SUBJECTIVE, CURRENT, FINALTERM
Virtual University regulations strictly require achieving at least 20% marks in the Final-Term exam paper alone (typically 12+ marks out of 60) to pass CS521, regardless of midterm scores.
What this file covers — CS521 syllabus roadmap
- Object-Oriented Paradigms: Classes & Data Abstraction — Lectures 23 to 29 (Pages 281 to 360). 16% Final-Term Marks (Core OO Concepts)
- Inheritance Hierarchies & Dynamic Polymorphism — Lectures 30 to 36 (Pages 361 to 435). 20% Final-Term Marks (Virtual Functions & V-Tables)
- Templates, Standard Library & Persistent File I/O — Lectures 37 to 41 (Pages 436 to 510). 14% Final-Term Marks (Generic Code & Streams)
- Final-Term Examination Dossier & Capstone Synthesis — Lectures 42 to 45 (Pages 511 to 585). Final-Term Exam Synthesis (Lectures 23–45 Scope)
Frequently asked questions
Where can I download CS521 Current Finals Subjective by MS-Team.pdf for free?
You can preview and download "CS521 Current Finals Subjective by MS-Team.pdf" (CS521 PDF, ~320 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs521-current-finals-subjective-by-ms-team-pdf) with 100% free high-speed downloads and zero registration requirements.
What syllabus chapters and lectures are covered in this CS521 file?
This document covers Final-Term Exam Scope (Lectures 23 to 45) across 4 distinct lecture units (Lectures 23 to 29, Lectures 30 to 36, Lectures 37 to 41, Lectures 42 to 45), featuring comprehensive definitions, solved objective questions, and examiner marking rubrics.
What is the passing criteria for CS521 under the VU 20% Two-Half Rule?
Under official Virtual University regulations, students must score at least 20% in the First Half (Quizzes, Assignments, GDBs, and Midterm combined) AND independently at least 20% in the Final-Term examination paper. Scoring under 20% in the final exam results in an automatic F grade regardless of earlier marks.
Are CS521 solved past papers and handouts verified for 2026 exams?
Yes. All CS521 materials on MIHORA VU—including Moaaz, Waqar Siddhu, and team archives—are reviewed against the current VU syllabus to help students prepare for 2026 Midterm, Final-Term, and online quiz examinations.
Inside this file
By Maha Rana
CS521 - Short Questions & Answers
Short Questions
1. Update SQL Query
UPDATE Categories SET CategoryName = 'Web' WHERE
CategoryName = 'Business';
1. Reference: Week 11, Topic 91
2. PHP Methods for:
o Removing session variable:
session_unset(); // removes all session
variables
o Destroying session:
session_destroy(); // ends the session
2. Reference: Week 13, Topic 114
3. Using $_FILES in PHP
PHP uses the $_FILES array to handle file uploads. Key steps:
o HTML form should use: enctype="multipart/form-data"
By Maha Rana
o Use $_FILES['fileInputName']['name'], ['type'],
['tmp_name'], ['error'], ['size'] for file details
o Example:
if ($_FILES['myFile']['error'] ==
UPLOAD_ERR_OK) {
move_uploaded_file($_FILES['myFile']['tmp_name'
], 'uploads/' . $_FILES['myFile']['name']);
}
Reference: Week 10, Topic 84
4. Benefits of AJAX
o Asynchronous communication with server
o Reduces page reloads
o Improves user experience
o Allows partial page updates
Reference: Week 8, Topic 72
5. What are sockets and how they differ from traditional HTML
communication
o Socket: Enables full-duplex communication between browser and
server.
o Difference:
Traditional HTTP: request-response model
Web Sockets: real-time, bi-directional communication
Reference: Week 15, Topic 134
6. Different Types of Form Validation
o Client-side (JavaScript):
Input format, required fields, data type checks
o Server-side (PHP):
Required info, correct data type, range check, regex
o Using PHP filters
filter_var($email, FILTER_VALIDATE_EMAIL);
7. Reference: Week 12, Topics 107–108
By Maha Rana
Long Questions
1. Benefits of using Transactions (with Example)
o Benefits:
Ensures data integrity
Allows rollback if an error occurs
Multiple queries act as one atomic operation
o Example:
$pdo->beginTransaction();
$pdo->query("INSERT INTO Categories
(CategoryName) VALUES ('Philosophy')");
$pdo->query("INSERT INTO Categories
(CategoryName) VALUES ('Art')");
$pdo->commit();
If error occurs, use $pdo->rollback();
Reference: Week 11, Topic 96
2. Syntax to Define Array in PHP + Types of Arrays
o Indexed Array:
$colors = array("Red", "Green", "Blue");
o Associative Array:
$ages = array("Peter"=>35, "John"=>40);
o Multidimensional Array:
$students = array(
array("Ali", 20),
array("Sara", 22)
);
3. Reference: Week 9, Topic 78
3. Difference between File Handling in PHP and Node.js
By Maha Rana
4. PHP Code for Adding Two Variables and Display Result
<?php
$a = 10;
$b = 20;
$sum = $a + $b;
echo "The sum is: " . $sum;
?>
Short Questions
1. PHP: Class Creation
class Artist {
function __construct($firstName, $lastName, $city,
$birth, $death=null) {
$this->firstName = $firstName;
$this->lastName = $lastName;
$this->birthCity = $city;
$this->birthDate = $birth;
$this->deathDate = $death;
}
}
By Maha Rana
Then instantiate using:
$picasso = new Artist("Pablo", "Picasso", "Malaga",
"Oct 25,1881", "Apr 8,1973");
2. JavaScript: File Include Syntax
<script src="filename.js"></script>
Used in HTML to include JavaScript files.
3. SQL Query with Greater Than Condition
SELECT * FROM books WHERE price > 100;
This fetches all books with price greater than 100.
4. Ways to Access Variables in JavaScript
Direct access: var a = 10; console.log(a);
Object property: obj.a
Array index: arr[0]
DOM: document.getElementById('id').value
5. Benefits of AJAX
No full page reload
Asynchronous communication
Faster response
Improved user experience
6. Node.js Usage
Runs JavaScript outside the browser
Used for server-side development
Non-blocking I/O
By Maha Rana
Used with MongoDB, Express.js
Real-world use: LinkedIn and PayPal adopted Node.js for performance and
efficiency.
✅ Long Questions
1. Types of Input Validation
Required Info: Must fill fields
Correct Data Type: Numbers, strings, emails
Correct Format: Use of regex
Range Check: e.g., age 18–60
Comparison: password == confirm password
Custom Validation: Based on logic
Validation must happen client-side (JS) & server-side (PHP)
2. PHP: Array Sum Using Loop
<?php
$nums = array(10, 20, 30, 40);
$sum = 0;
foreach($nums as $value) {
$sum += $value;
}
echo "Total sum is: " . $sum;
?>
3. JavaScript: Event Listener for Message Print
<button id="showMsg">Click Me</button>
<p id="msg"></p>
<script>
document.getElementById("showMsg").addEventListener("cl
ick", function() {
document.getElementById("msg").innerText = "You
clicked the button!";
By Maha Rana
});
</script>
Event listener helps in separating structure and behavior.
4. Define: Digital Signature
A digital signature is an electronic form of a signature that validates the
authenticity and integrity of a digital message or document.
Created using a private key
Verified using the sender’s public key
Ensures authentication, integrity, and non-repudiation
➡️ commonly used in HTTPS, e-documents, email encryption
✅ Short Questions
1. Node.js ki Working
Runs JavaScript outside the browser using Chrome V8 engine
Single-threaded, non-blocking I/O model
Used for server-side development
Can handle thousands of requests simultaneouslyMore CS521 files
- CS521 Current Midterm Subjective by MS-Team.pdf.pdf (PDF · Midterm)