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

Computer Science: Instructor: Komal Khalid

The document provides an overview of the structure, analysis, syllabus, topics, and suggested books for the computer science paper. It describes the two paper format with multiple choice and section questions, analyzes past question types, outlines the syllabi covering topics like programming, algorithms, and computer architecture, and lists programming reference books and languages used for development.

Uploaded by

Ayesha Pervaiz
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views

Computer Science: Instructor: Komal Khalid

The document provides an overview of the structure, analysis, syllabus, topics, and suggested books for the computer science paper. It describes the two paper format with multiple choice and section questions, analyzes past question types, outlines the syllabi covering topics like programming, algorithms, and computer architecture, and lists programming reference books and languages used for development.

Uploaded by

Ayesha Pervaiz
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 58

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
Programming Fundmentals
• Reference book:
– Dietal & Dietal
Analysis
• 2018
– 1 question (6 parts)
• 4 parts coding
• 2017
– 1 question (3 parts)
• 2 parts coding
• 2016
– 3 questions (3 parts coding)
Analysis
• Simple programming questions
Languages
• High level: Everyday English
• Assembly: intermediate between machine
AND HIGH LEVEL
• Low level/ machine language: understandable
by computers
Compilers and interpreters
• Interpreters
– Translates single high level line at once
– Slow
– Javascript, PHP
• Compilers
– Translates whole program at once
– Faster
– C++, java
C++ development environment
• Editor -> programmer writes code
• Preprocessor-> processes code -> before compilation ->
perform manipulations on preprocessor directives
->compiling other text files included
• Compilation -> translates c++ program to machine lang /
object code
• Linker -> links object code with missing functions and data
defined elsewhere
• Execution -> CPU takes program and execute one instruction
at time -> storing new data value during execution
C++ Program
• #include <iostream> // allows program to output data to
the screen
• using namespace std;
• int main() // program execution starts from this function
• {
• cout << "Hello, World!"; //output stream using header
file
• return 0; // return value
• }
Output
• Hello, World!
C++ Program
• #include <iostream> // allows program to output data to
the screen
• using namespace std;
• int main() // program execution starts from this function
• { int num= 1;
• cin>>num1;
• cout << num1;//output stream using header file
• return 0; // return value
• }
C++ Program
• Functions (definition, calling, pass by value)
• Data types
• Variables
• Conditional statements
• Loops
• switch
OOP
• Study everything about class and put one whole code
in slide and explain everything about class from there.
• Prepare n record to see time
• If OOP isnt has enough content for class start
operating sys sorting algos
• Be focused
• You can teach mix courses
• Chapter 4 and 5 see in end if time allows
• Look on pass by value and reference
OOP
• Object Oriented Programming
Inheritance
• Software reuse
• Base and derived classes
– Definition (new class use capabilities of existing class and
enhance)
– Generic and specific
– Super (set of objects) and subset (set of objects)
– Example
– Types (public, private and protected)
• Is-a relationship (triangle is-a shape)
• Objects of derived class treated as objects of base class
Inheritance
• Class can be:
– Base class (supply members)
– Derived class (inherit members)
– Or both
• Single and multiple inheritance
– 1 base class and multiple base class inheritance
Inheritance
Is-a relationship
• “an Employee is a Community-
• Member” and “a Teacher is a Faculty member.”
CommunityMember is the direct base class
• of Employee, Student and Alumnus. In addition,
CommunityMember is an indirect base
• class of all the other classes in the diagram.
• For example, an AdministratorTeacher is an
• Administrator, is a Faculty member, is an Employee and is
a CommunityMember.
CommunityMember class hierarchy
Inheritance
Is-a relationship
• “an Employee is a Community-
• Member” and “a Teacher is a Faculty member.”
CommunityMember is the direct base class
• of Employee, Student and Alumnus. In addition,
CommunityMember is an indirect base
• class of all the other classes in the diagram.
• For example, an AdministratorTeacher is an
• Administrator, is a Faculty member, is an Employee and is
a CommunityMember.
Inheritance
• Has-a relationship
– Composition
– Car has-a steering wheel
– Car has-a brake pedal
Inheritance(Activity)
• Is-a and has-a relationship
• First make inheritance hierarchy
Example
#include <iostream>
using namespace std;
// Base class
class Shape
{
public:
void setWidth(int w) {
width = w; }
void setHeight(int h) {
height = h; }
protected:
int width; int height;
};
Cont..
// Derived class
class Rectangle: public Shape {
public:
int getArea() {
return (width * height);
} };
int main(void)
{
Rectangle Rect;
Rect.setWidth(5);
Rect.setHeight(7);
// Print the area of the object.
cout << "Total area: " << Rect.getArea() << endl;
return 0;
}
Virtual functions
• Member functions
• Called by pointers
• Override base class function with derived class
function (same prototype)
– Not mandatory to override
– Can use base class function
• Want to refer to child class function by base class
pointer
• Decision taken on runtime (derived function
calling)
Virtual functions
class derived:public base
// CPP program to illustrate {
// concept of Virtual Functions public:
void print ()
#include<iostream>
{ cout<< "print derived class" <<endl; }
using namespace std;
class base void show ()
{ { cout<< "show derived class" <<endl; }
public: };
virtual void print () int main()
{ cout<< "print base class" {
<<endl; } base *bptr;
void show () derived d;
bptr = &d;
{ cout<< "show base class"
//virtual function, binded at runtime
<<endl; }
bptr->print();
};
// Non-virtual function, binded at compile time
bptr->show();
}
Overloading
• Same function name
• Perform same task
• Different signature (datatypes, no. of params, retturn
type)
• C++ lib function overloading
– Float, double and long double
• Compiler choose by fucntion call parameter
Overloading
// function square for int values
int square( int x )
{
cout << "square of integer " << x << " is ";
return x * x;
} // end function square with int argument
// function square for double values
double square( double y )
{
cout << "square of double " << y << " is ";
return y * y;
} // end function square with double argument
int main()
21 {
22 cout <<square(7) ; // calls int version
23 cout << endl;
24 cout <<square(7.5) ; // calls double version
}
Pass by value and reference
struct Datatype
• Multiple datatypes int main()
grouped in single {
user-defined datatype
   struct Point p1 = {0, 1};
   // Accesing members
struct Point of point p1
{    p1.x = 20;
   int x, y;    cout<< p1.x<< p1.y;
};    
   return 0;
}
Database Systems
• Reference book:
– Database system concepts by Abraham Silberschatz
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
Data Abstraction
• View Level:
– Front end, interface,
permissions,
– Student, faculty views
• Logical level: (what is
stored)
– Tables, relations, ER
diagram
• Physical level: (how stored)
– Files,
centralized/distributed
DB
Self study

• 26 ATM Case Study, Part 2:


• Implementing an Object-Oriented Design
• from same book

You might also like