0% found this document useful (0 votes)
75 views

Computer Science: Instructor: Komal Khalid

The document provides an overview of the computer science paper organization, analysis of question types, syllabus, and topics covered over the last 4 years for the computer science exam. It discusses the structure of Paper I and Paper II, which each have 2 parts and cover 3 subjects. It then analyzes the types of questions asked and provides details on the syllabus and topics that have been covered for each subject area.

Uploaded by

Ayesha Pervaiz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views

Computer Science: Instructor: Komal Khalid

The document provides an overview of the computer science paper organization, analysis of question types, syllabus, and topics covered over the last 4 years for the computer science exam. It discusses the structure of Paper I and Paper II, which each have 2 parts and cover 3 subjects. It then analyzes the types of questions asked and provides details on the syllabus and topics that have been covered for each subject area.

Uploaded by

Ayesha Pervaiz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 51

Computer science

Instructor: Komal Khalid


Paper Organization
• Paper I
– 2 parts
• MCQs (20 marks)
• 2 sections (80 marks)
3 subjects each

• Paper II
– 2 parts
• MCQs (20 marks)
• 2 sections (80 marks)
3 subjects each
Analysis
• Type of Questions
– Reasoning
– Coding
– Short notes
– Differences/ comparisons
– Detailed notes
– Diagrams
– Definitions
– Numericals
– Dry Run
Syllabus
• Paper I(100 marks)
1. Section-A (50 marks)
1) Introduction to Computing (theoretical)
2) Programming Fundamentals (theory + programming,
concept)
3) Object Oriented Paradigm (theory + programming,
concept)
2. Section-B (50 Marks)
1) Algorithms & Data Structures (concept + theory)
2) Software Engineering (same)
3) Compiler Construction (same)
Syllabus
• Paper-II (100 Marks)
1. Section-A (50 Marks)
1) Computer Organization & Architecture
2) Computer Communications & Networks
3) Operating Systems Concepts
2. Section-B (50 Marks)
1) Database Systems
2) Digital Image Processing
3) Web Engineering & Technologies
Topics (last 4 years)
• Expect a simplest question and a difficult one
Topics (last 4 years)
• Intro to computing
– Type of computers (supercomputers, mainframe)
– Architectures of computers (e.g. Von-Neuman)
– Virtual and physical memory functioning
– Secure from cybercrimes
– Conversions (binary, decimal etc.)
Topics (last 4 years)
• Programming fundamentals & Object Oriented
Programming
– Virtual and physical memory functioning
– Coding Programs (inheritance, loops, conditions, data type,
logic)
– Volatile and non-volatile memory difference, examples
– Designing a program for medical store (inheritance, classes and
attributes
– Dry run of programs
– Preprocessor directives
– Tree Scenario (private, protected members, virtual function
accessibility)
– Table (define is-a ,has-a relationship)
Topics (last 4 years)
• Software Engineering
– Software Models and design methods(Agile, Waterfall etc.)
• Agile dev. And issues
• Incremental methods
• Importance of design patterns in agile dev.
– Software development life cycle
• difference b/w validation and verification (2 times)
• Importance of requirement engineering
• Process of requirement sign off
• Difference between SRS doc and design doc
• Difference between white box and black box
• Unit testing process for verification
• Software testing and methodologies
– Design issues in distributed software engineering (task
allocation and partitioning)
Topics (last 4 years)
• Algorithms and data structures
– Sorting algos (theory and sort sequence)
– Hashing process
– Build tree
– Type of trees (binary etc.)
• Type of nodes
– Time complexities
– Difference between graph and trees
– Heuristic search
– Genetic algo and problem solved by it
– Dangling pointer
Topics (last 4 years)
• Compiler construction
– Modules of compiler
• Parser and lexical analyzer
• Compare with e.g. (top down parser based compiler and bottom
up parser based compiler)
• Explain code optimization methods (loop and peephole)
• DFD and ERD purpose, diagram, example
• Lexical analysis
– Regular expressions convert to finite automation
• Explain Context free grammar with examples
• Difference between lexers and parsers
• BNF grammar
• Deterministic finite automation (convert DFA to RE)
Topics (last 4 years)
• Computer comm. And networks
– Network Protocols (HTTP, TCP)
• Short notes
– Numericals
– Topologies and scenarios
– Ethernet LAN and types (function)
– Layers of TCP/IP stack
– Difference between hub, bridge, switch and router
– Network address translation
– Working of multiplexing at transport layer
Topics (last 4 years)
• Computer comm. And networks
– Difference between IPv4 and IPv6 protocols
– Routing techniques
– Error detection techinques
– Switching Techniques
– Multiplexing techniques
– Impairments in transmission medium
Topics (last 4 years)
• Computer organization and architecture
– Difference between RISC and CISC arch. (2 times)
– How digital evidences preserved from crime scene (digital
devices used these days) (2 times)
– Storage system methods
– Diagrams (instruction execution state with interrupt)
– Numericals
– Registers (functions, purpose, diagram)
– Physical drives
– Basic instruction cycle
Topics (last 4 years)
• Computer organization and architecture
– Why modern processors use more power when clock frequency
is increased
CPU registers and functionality
Difference between address, data and control bus
Function of buses in computer arch.
Topics (last 4 years)
• Operating systems
– Page Replacement Policies (differences)
– Deadlock conditions
– Process scheduling (Pros and cons of queue scheduling)
– Numericals
– Time and paged memory systems
– Algorithms for deadlock avoidance
– Process control block
– Resp of operating system kernel
– Paging
– I/O management (difference pooling and interrupts)
Topics (last 4 years)
• Operating systems
– Swapping between main and secondary memory
– Flowchart for process scheduling mechanism
– Sequential access
Topics (last 4 years)
• Database Systems
– Types of database (difference)
– Normalization
– Short notes (data, database)
– Difference between operators
– DML and DDL differencce
– Explain pattern matching
– Dependencies
– Triggers note
– ACID in DML transaction
– Keys (super, candidate)
Topics (last 4 years)
• Database Systems
– Difference between logical and physical data independence
– Difference between top down and bottom up distributed DB design
– ER model In DB design
– Scenarios
Topics (last 4 years)
• Web
Topics (last 4 years)
• DIP
• Go to past papers..
Suggested Books
S. No. Title Author
1. C++ How to Program Harvey M. Deitel and Paul J. Deitel.

2. Compilers: Principles, Techniques, and Tools Alfred V. Aho, Ravi Sethi, and
Jeffrey D. Ullman

3. Operating System Concepts Silberschatz, Galvin, and


Gagne. John
4. Operating Systems William Stallings
5. Computer Organization & Architecture William Stallings

6. Computer System Architecture M. Morris Mano

7. Computer Organization and Design: The David A. Patterson and John L. Hennessy
Hardware/ Software Interface

8. Software Engineering Ian Sommerville


9. Software Engineering A Practitioner’s Approach Roger S. Pressman

10. Data Structures and Algorithm Analysis in C++ Mark Allen Weiss

11. Computer Networking: A Top Down approach James F. Kurose and Keith W. Ross
featuring the Internet

12. Data and Computer Communications William Stallings


Suggested books
13. Computer Networks Andrew Tanenbaum
14. Fundamentals of Database Systems Ramez Elmasri and S. B

15. Database Systems Concepts Silberchatz, Abraham & Korth, Sudarshan

16. Web Services: Principles and Technology Michael Papazoglu

17. Electronic Commerce: The Second Wave, Gary P. Schneider


Ninth
Edition

18. Electronic-Commerce –A Managerial Turban, Lee, King, Chung


Perspective

19. Web Engineering Kappel, G., Proll, B. Reich, S. &


Retschitzegger
20. Styling Web Pages with CSS Tom Negrino and Dori Smith

21. PHP: The Good Parts Peter B. MacIntyre


22. Learn JavaScript Chuck Easttom
23. ADTs, Data Structures, and Problem Solving Larry R. Nayhoff
with C++
24. Digital Image Processing Gonzalez and Woods
Database Systems
• Database system
– collection of interrelated data and a set of programs that
allow users to access and modify these data.
– How data is stored and maintained
– Provide users with abstract view of data
• Database: organized collection of data (tables, relations)
• Data: single items stored in database tables organized in rows
and columns
Problems with not using database
• Large Data in files
– Problems
• Data atomicity: not same
• Redundancy : stored in 2 files
• Integrity : type problem
• Security : authorization in views
• Concurrent access anomaly: Many users modify data at
1 time with no checks
• Inconsistent : change balance in 2 files
Example:
Data Abstraction
• View Level:
– Interface, permissions
• Student, faculty views
• Logical level: (what is
stored)
– Tables, relations, ER
diagram
• Physical level: (how stored)
– Files,
centralized/distributed
DB
Databases
• Schema : overall design
• Instance: at one time values in DB
Database Models
• DB design on abstraction levels
• Relational Databases
– Tables
– Columns
– Records
• ER Model
– Entities
– Relations
• Object-Oriented Model
– OOP and Model
• encapsulation
Database Languages
• DDL:
– Define schema
• DML:
– Allows CRUD
Normalization
• Process to design Relational DB
• Normalization is the process of organizing data in a database
• eliminating redundancy and inconsistent dependency
– Redundant data wastes disk space and creates maintenance
problems
– Inconsistent dependencies can make data difficult to access because
the path to find the data may be missing or broken.
• Rules for normalization are called normal form
Normalization
• Normalization is the process of organizing data in a database
• eliminating redundancy and inconsistent dependency
– Redundant data wastes disk space and creates maintenance
problems
– Inconsistent dependencies can make data difficult to access because
the path to find the data may be missing or broken.
• Rules for normalization are called normal form
Normal form
• Unnormalized table:
– Has repeating groups (atomic values)
– Has one to many relation
First Normal form
• Eliminate repeating groups (of same attribute) in individual
tables.
• Do not put one to many side in same table
Second Normal form
• Create separate tables for sets of values that apply to
multiple records.
• Relate these tables with a foreign key.
Second Normal form
• Create separate tables for sets of values that apply to
multiple records.
• Relate these tables with a foreign key.
Third Normal form
• Eliminate fields that do not depend on the primary key.
Third Normal form
• Eliminate fields that do not depend on the primary key.
Data Structures and Algorithms
• data structures and algorithms in c++
– by GoodRich
Arrays
• collection of items stored at continuous memory locations.
• to store a large number of instances
#include <iostream>
using namespace std;
int main() {
    int arr[5];
    arr[0] = 5;
    arr[2] = -10;
      
    // this is same as arr[1] = 2
    arr[3 / 2] = 2; 
    arr[3] = arr[0];
  
    cout << arr[0] << " " << arr[1] 
    << " " << arr[2] << " " << arr[3];
    return 0;
}
Arrays
#include <stdio.h> n = n + 1;
int main() while( j >= k) {
{ LA[j+1] = LA[j];
int LA[] = {1,3,5,7,8}; j = j - 1; }
int item = 10, k = 3, n = 5; LA[k] = item;
int i = 0, j = n; printf("The array elements after
printf("The original array elements insertion :\n");
are :\n"); for(i = 0; i<n; i++)
for(i = 0; i<n; i++) { { printf("LA[%d] = %d \n", i, LA[i]);
printf("LA[%d] = %d \n", i, }
LA[i]); } }
Queues
• data structure that contains a collection of elements
• implements the FIFO mechanism i.e. the element that is inserted first is
also deleted first
Queues
#include <iostream>
using namespace std;
int queue[100], n = 100, front = - 1, rear = - 1;
void Insert() {
int val;
if (rear == n - 1) //queue full
cout<<"Queue Overflow"<<endl;
else
{ if (front == - 1)
front = 0; //index incremented
cout<<"Insert the element in queue : "<<endl;
cin>>val;
rear++; //index incremented
queue[rear] = val;//element inserted in index of rear
}}
Queues
void Delete() { void Display() {
if (front == - 1 || front > rear) if (front == - 1)
//queue empty cout<<"Queue is empty"<<endl;
{ cout<<"Queue Underflow "; Else
return ; {
} cout<<"Queue elements are : ";
else for (int i = front; i <= rear; i++)
{ cout<<queue[i]<<" ";
cout<<"Element deleted from cout<<endl;
queue is : "<< queue[front] <<endl;
}
front++;//front index moved plus 1
}
}
}
Bubble Sort
• simple sorting algorithm
• comparison-based algorithm
– each pair of adjacent elements is compared and the elements are swapped if they
are not in order
– not suitable for large data sets
void bubbleSort() {
Bubble Sort
int temp; int i,j;
bool swapped = false;
// loop through all numbers
for(i = 0; i < MAX-1; i++) {
swapped = false;
// loop through numbers falling ahead
for(j = 0; j < MAX-1-i; j++) {
printf(" Items compared: [ %d, %d ] ", list[j],list[j+1]);
// check if next number is lesser than current no
// swap the numbers.
// (Bubble up the highest number)
if(list[j] > list[j+1]) {
temp = list[j];
list[j] = list[j+1];
list[j+1] = temp;
swapped = true;
printf(" => swapped [%d, %d]\n",list[j],list[j+1]);
}
Bubble Sort
else { printf(" => not swapped\n");
}
}
// if no number was swapped that means
// array is sorted now, break the loop. if(!swapped) {
break;
}
printf("Iteration %d#: ",(i+1));
}
}
Insertion Sort
• Sorting algorithm
• pick up one element from the data set and shift the data elements to
make a place to insert back the picked up element into the data set.
• From second index compare with adjacent index i-e with 3rd, 4rth to last
index
#include <bits/stdc++.h>
Insertion Sort
using namespace std;
// A utility function to print an array of size n
/* Function to sort an array using insertion sort*/ void printArray(int arr[], int n)
void insertionSort(int arr[], int n) {
{ int i;
int i, key, j; for (i = 0; i < n; i++)
for (i = 1; i < n; i++) cout << arr[i] << " ";
{ cout << endl;
key = arr[i]; }
j = i - 1;
/* Driver code */
/* Move elements of arr[0..i-1], that are int main()
greater than key, to one position ahead {
of their current position */ int arr[] = { 12, 11, 13, 5, 6 };
while (j >= 0 && arr[j] > key) int n = sizeof(arr) / sizeof(arr[0]);
{
arr[j + 1] = arr[j]; insertionSort(arr, n);
j = j - 1; printArray(arr, n);
}
arr[j + 1] = key; return 0;
} }
}
Insertion Sort
Merge Sort
• Sorting algorithm
• Based on divide and conquer technique
• Merge sort first divides the array into equal halves
• Then combines them in a sorted manner

You might also like