You are on page 1of 16

MASTER OF COMPUTER

APPLICATIONS
(MCA)

(2nd SEMESTER)
ASSIGNMENTS
JULY 2009 & JANUARY 2010

(MCS-021, MCS-022, MCS-023, MCS-024, MCSL-025)

SCHOOL OF COMPUTER AND INFORMATION SCIENCES


INDIRA GANDHI NATIONAL OPEN UNIVERSITY
MAIDAN GARHI, NEW DELHI – 110068

2
CONTENTS

Course Code Assignment No. Maximum Last Date of Page


Marks Submission No.

MCS-021 MCA(2)/021/Assign/0 100 15th October, 2009 3


9 (For July Session)

15th April, 2010


(For January Session)

MCS-022 MCA(2)/022/Assign/0 100 15th October, 2009 4


9 (For July Session)

15th April, 2010


(For January Session)

MCS-023 MCA(2)/023/Assign/0 100 15th October, 2009 6


9 (For July Session)

15th April, 2010


(For January Session)

MCS-024 MCA(2)/024/Assign/0 100 15th October, 2009 10


9 (For July Session)

15th April, 2010


(For January Session)

MCSL-025 MCA(2)/025/Assign/0 100 15th October, 2009 11


9 (For July Session)

15th April, 2010


(For January Session)

Important Notes
Viva-voce worth 20 Marks is compulsory for each course.
Please follow the guidelines given in the MCA Programme Guide for solving,
presentation format and submission of the assignments.

3
Course Code : MCS-021
Course Title : Data and File Structures
Assignment Number : MCA(2)/021/Assign/09
Maximum Marks : 100
Weightage : 25%
Last Dates for Submission : 15th October, 2009 (for July, 2009 session)
15th April, 2010 (for January, 2010 session)

This assignment has four questions which carry 80 marks. Answer all the questions.
Each question carries 20 marks. You may use illustrations and diagrams to
enhance the explanations. Please go through the guidelines regarding assignments
given in the Programme Guide. Ensure that you don’t copy the program from
course material or any other source. All the implementations should be in C
language.

Question 1:

How can the following operations implemented on an array so that the time taken for each of the
operations does not depend on the size of the array ‘n’:

(i) Delete the ith element of an array (1 < = i < = n)


(ii) Delete the ith element of a sorted array. The remaining array has to stay sorted.

Question 2:

Map the operations on Stacks and Queues to operations on a Deque. Explain the merits of using a
Deque to implement a Stack. Also, explain the merits of using a Deque to implement a Queue.

Question 3:

Implement a modified version of Dijkstra’s algorithm such that it finds the shortest paths
from a given vertex to all other vertices in a network.

Question 4:

Show the effect of making the following insertions into an initially empty red-black tree:
30,40,20,90,10,50,70,60,80

4
Course Code : MCS-022
Course Title : Operating System Concepts and Networking
Management
Assignment Number : MCA(2)/022/Assign/09
Maximum Marks : 100
Weightage : 25%
Last Date of Submission : 15th October, 2009 (for July, 2009 session)
15th April, 2010 (for January, 2010 session)

This assignment has five questions. Answer all questions. Rest 20 marks are for
viva voce. You may use illustrations and diagrams to enhance the explanations.
Please go through the guidelines regarding assignments given in the Programme
Guide for the format of presentation. Answer each part of the question should be
confined to about 300 words.

Question 1:
a) Describe the structure of 5 classes of IP address. Also draw the network configuration of your
study centre/organisation showings IP addresses assigned your organization by ISP. How do
these classes differ? How do you identify a particular classes?
(5 Marks)
b) How does DNS improve the name resolution?
(5 Marks)
c) What is real time OS? How it is different from the traditional OS.
(5 Marks)
Question 2:

a) Write the Linux command for the followings :

i) to display the information about LS command

ii) to sort all the files in ascending order in IGNOU directory

iii) to kill a particular process

iv) to run any process in a background

v) to list the users currently logged on to the system


(5
Marks)

b) What are the different kinds of file systems available to Linux operating system ? Discuss.
(5 Marks)
c) How would you set the IP address of a LAN card in Linux ?
(5 Marks)

5
Question 3:

(i) How do you share files, folders and drive in Window XP? Why is sharing an entire drive is
not recommended ?
(5 Marks)
(ii) Describe the role of the primary and backup domain controller in enhancing security in
windows 2000. (5 Marks)

(iii) What are the shared folders in windows and why are they used?
(5 Marks)
(iv) Write the purpose of VPN and name some VPN protocols supported in windows 2000.
(5 Marks)

Question 4:
(i) What is a Instruction Detection system (IDS)? (5 Marks)

(ii) What are the two general methods of implementing network security by firewalls?
(5 Marks)

(iii) Distinguish between Symmetric and Asymmetric Cryptography? (5 Marks)

(iv) List different types of malicious codes and describe their features.
(5 Marks)

Question 5:
i) Write a Linux Shall Script to shift all characters in a file forwarding five characters i.e. ‘a’
become ‘f’.
(5
Marks)
ii) How does information flow from the top layer to the bottom layer in the OSI model.
(5 Marks)

6
Course Code : MCS-023
Course Title : Introduction to Database Management Systems
Assignment Number : MCA(2)/023/Assign/09
Maximum Marks : 100
Weightage : 25%
Last Date of Submission : 15th October, 2009 (For July, 2009 Session)
15th April, 2010 (For January, 2010 Session)

This assignment has four questions. Answer all questions of total 80 marks. Rest 20
marks are for viva voce. You may use illustrations and diagrams to enhance
explanations. Please go through the guidelines regarding assignments given in the
Programme Guide for the format of presentation. Answer to each part of the
question should be confined to about 300 words.

Question 1: (20 Marks)

(i) List at least 8 advantages of Database Management System. Explain each of the
advantage with the help of an example each.

(ii) What are the functions of a Database Manager in a Database Management System?
Explain each of these functions with the help of an example.

(iii) Define the following term in the context of Relational Model with the help of an example
each:

a. Domain
b. Tuple
c. Relational Instance
d. Super Key and Candidate keys
e. Domain constraints
f. Entity integrity constraints
g. Key Constraint
h. Referential integrity constraints

(iv) Consider the following relations:


Student (st_ID, st_name, st_programme)
Faculty (fa_ID, fa_name, fa_programme)
Mark (st_ID, ma_subject, ma_marks)

You may assume that a student can take only one programme and a faculty is associated
with only one programme. The Mark relation represents marks of the students in various
subjects. Enter some meaningful data in the relations as above and demonstrate the use of
following relational algebraic operations. Please note that you must write the equivalent
query in English also. For example, the Union operation can be demonstrated using the
following English Query – Find a complete list of student and the faculty.

7
You may use more that one operator in a query.

a. UNION
b. INTERSECTION
c. SET DIFFERENCE
d.
e. CARTESIAN PRODUCT
f. SELECTION
g. PROJECTION
h. JOIN
i. DIVISION

(v) A Book store manages inventory of Books in its warehouse. The orders are given by the
store to the suppliers of books. On receipt of books the receipt challan is verified against
the orders. A supplier may supply part order also, however, they are expected to supply
the all the items in a specified period. Any sale of the book is also recorded in the system
and the books are reordered as per the need. A book is identified by its ISBN Number and
their can be many copies of the books available in the store at a time. An order has
unique order number. An order may be for more than one book. A supplier is identified
by a unique supplier number. List all the entities, attributes of each entities and
relationships among entities. Draw the E-R diagram for the Book store. You may use the
concept of keys, cardinality etc. in a proper way. Make and state suitable assumptions, if
any.

Question 2: (20 Marks)

(i) You have explained the concept of Referential Integrity in Question 1. Database
Modifications may also result in loss of referential integrity. How can you preserve
database integrity when database modification results in loss of Integrity? Explain it with
the help of examples. Some of the integrity problems may be caused by data redundancy.
However, many people claim redundancy is beneficial too. “ Redundancy of data is many
times beneficial” Justify the statement, also describe the situation when redundancy will
mess up the current data base status, at that instance of time what actions you will prefer
to take.

(ii) Consider the following relation for a University:


Student_Record ( ID, Name, date of birth, age, address, programme, subject code,
subject name, subject credits, teacher ID, teacher name (who taught that subject),
teacher qualification, date of evaluation of the subject, marks)
A teacher can teach many subjects. A student can enrol only for one programme at a
time. A programme may consist of a number of subjects. A student may appear for a
subject more than once.
Identify the functional dependencies in the relation given above. Normalise the relational
up to BCNF. Make suitable assumptions, if any

8
(iii) List the features of the following file organisations giving their advantages and
disadvantages:
a. Heap Files
b. Sequential file organisation
c. Indexed file organisation
d. Hashed file organisation

(iv) What is the role of secondary indexes? “Secondary Indexes are more useful than the
primary Indexes.” Is this statement true? Justify your answer using an example. What is
the need of multi-level indexes? Explain why is binary tree not used for implementing
Indexes? Explain the purpose of inverted file organisation.

(v) Given the Book Store system in problem 1 (v). Create the suitable relational design for
the E-R diagram so created. Identify all the constants on various attributes and tables.
The table should be normalised and properly structured along with field names and
constraints. You must also identify the set of possible queries and reports for the
database. On the basis of the proposed queries and reports identify what indexes would
you like to maintain for the database.

Question 3:
(20 Marks)
(i) Consider the following relations:
Teacher (te_ID, te_name, te_address)
Student (st_ID, st_name, st_programme)
Teach (te_ID, st_ID)
Perform the following operations on these tables using SQL
a. Create the three tables giving suitable domains and constraints including referential
actions.
b. Add one additional filed st_qual in the teachers table, Create a secondary index on
teacher name and drop any constraint that you have created in step (a)
c. Create a view named Student_Teacher that contains the names of student and the
teachers.

(ii) Consider the following relations:


Subjects (su_code, su_title, su_fee, su_credit)
Student (st_ID, st_name, st_programme)
Result (st_ID, su_code, dateofresult, marks)
Assume that a student needs to take the subject again if he/she gets less than 40 marks.
Now, perform the following queries using SQL:
a. Find the List of Students who has passed the subject whose title is.” Computer
Architecture”
b. Find the students of MCA programme who has taken examination of at least one
subject.
c. Create a course wise list of the student in the alphabetical order of student names
d. Calculate the total fee that is due on all the students. You may assume here that a
student has to pay fee for a course if he fails or passes in the course.

9
(iii) Explain the ‘ACID’ properties of transaction with the help of an example each. Also
explain the problems of concurrent transactions with the help of an example each.

(iv) What is a serialisable schedule? Explain with the help of an example. How does two
phase locking protocol endures a serialisable schedule? Discuss with the help of a
schedule and its precedence graph.

(v) You have designed the relations, query and reports for the store database in question 2
(v). Now, implement your design using SQL in a suitable RDBMS. Enter meaningful
data and test your queries and reports.

Question 4:

(20 Marks)

(i) What is the recovery in database system? How can you use logs to recover from a
failure? Explain with the help of an example. How can a checkpoint help in the process
of recovery? Explain this with the help of an example.

(ii) How does database security differ from database integrity? Explain with the help of an
example. Assume the results database of a University as created by you for answering
question 2 (ii), create an authorisation matrix for the result relations. Make suitable
assumptions, if any.

(iii) Why is data fragmentation needed in distributed databases? Explain the horizontal and
vertical fragmentation process with the help of examples.

(iv) What is client server computing? What are its advantages? Explain the two tier model of
client server? How is it different from 3 tier model? Explain with the help of an example.

(v) You have designed and implemented the relations, query and reports for the store
database in question 2 (v). You need to identify at least two possible transactions for the
store database system. Identify two different types of users and create access matrix for
them. Propose a suitable recovery mechanism for this database.

10
Course Code : MCS-024
Course Titlle : Object Oriented Technologies and Java
Programming
Assignment Number : MCA (1)/024/Assign/09
Assignment Marks : 100
Maximum Marks : 25%
Last Date of Submission : 15th October, 2009 (For July, 2009 Session)
15th April, 2010 (For January, 2010 Session)

There are eight questions in this assignment of total 80 marks. Rest 20 marks are for viva-voce.
Answer all the questions. While writing your programs, give appropriate comments to increase
understandability. Please go through the guidelines regarding assignments given in the
Programme Guide for the format of presentation.

Question 1 : a) What is Object Oriented Programming? Explain the advantages of Object


Oriented Programming over structured programming. (5 Marks)

b) What is encapsulation? Explain the advantages of encapsulation.


(5
Marks)

Question 2 : a) Explain why Java is platform independent. Also explain advantage of


platform independence. (5
Marks)
b) What are different relational operators in Java? Write a Java program to
explain the use of relational operators. (5 Marks)

Question 3 : a) What is variable size array? Write a program to explain the use of variable
size array in Java. (5 Marks)

b) What is need of static method? Explain why main method in Java is always
static. (5Marks)

Question 4 : a) What is inheritance? Why abstract classes are used in inheritance?


Write a program in Java to explain use of abstract class in multilevel
inheritance. (5 Marks)

b) Explain the need of package. Also explain different access rules for packages
in Java programming. (5 Marks)

11
Question 5: a) What is an exception? Explain different types of exceptions in Java.
Also explain haw an exception subclass are created, in Java.
(5 Marks)
b) Differentiate between String and String Buffer classes. Also write a
program to append a given string.
(5
Marks)

Question 6 : a) What is multithreading ? Explain how synchronization is achieved in a


multithreaded program in Java.
(5
Marks)

b) Explain how files are handled in Java ? Write a program in Java to create a
file and copy the content of an already existing file into it. (5 Marks)

Question 7: a) What is Layout Manager? Explain different layout available in Java.


(5
Marks)

b) What is socket? Explain basic networking features of Java. (5 Marks)

Question 8 : a) Explain how databases are connected to a Java program. (2 Marks)

b) Explain difference between applets and application programs. (2 Marks)

c) Explain the use of finalize() methods of Java with an example. (2 Marks)

d) Write a program in Java to show the use of checkbox and choice list
components. (2 Marks)

e) Explain the use of GET and POST methods in servlet programming.


(2 Marks)

12
Course Code : MCSL-025
Course Title : Lab Course
Assignment Number : MCA(2)/025/Assign/09
Maximum Marks : 100
Weightage : 25%
Last Date of Submission : 15th October, 2009 (For July, 2009 Session)
15th April, 2010 (For January, 2010 Session)

This assignment has four parts. Answer all questions of each part. Each part is of 10 marks.
Lab Records of each part will carry 10 Marks. Rest 20 marks are for viva voce. You may
use illustrations and diagrams to enhance the explanations. Please go through the
guidelines regarding assignments given in the Programme Guide for the format of
presentation.

PART-I: MCS-021

Question 1:

Sort the following array items using quick sort method.


65 24 56 47 35 10 90 82 31 34 11
Write an algorithm in C to implement this and find its time complexity.
(6
Marks)
Question 2:

Write an algorithm for converting an infix expression into a postfix expression using stack. Illustrate the
steps for the following expression.
(((a+b)*c) / (d+e)) (4 Marks)

Note: You must execute the program and submit the program logic, sample inputs and outputs
along with the necessary documentation for this question. Assumptions can be made wherever
necessary.
PART-II: MCS-022

13
Question 1: Show a sorted list of files in your home directory those contain the word “computer”
inside them.
(2 Marks)

Question 2: Set the execution time of a job so that it can run automatically after 15inutes.
(2 Marks)

Question 3: Create two global groups and configure so that users from both groups should be
able to access some command folder named “MYDOC”.
(3 Marks)

Question 4: When you install Modem, set the option to disable call waiting on your computer.
(3 Marks)

PART-III: MCS-023
Question 1:

“HomeCook” Private Ltd. has main products like pressure cookers, cookwares, water
purifiers, food processors etc. The company markets its products to wholesalers all over the
country and dealers sell them further to customer. The company has eight regional offices
and many sales persons are attached to regional offices. Salespersons contact dealers and
explain about products, incentives offered, training programs for wholesalers and
demonstrations for customers etc. Dealers place orders with the salespersons attached with
the regional office of their location. After receiving goods they make payments, which may
be in installments. Company would like to develop a system to monitor sales of different
products, performance of salespersons and orders from wholesalers. You are asked to create
the database of “HomeCook” Private Ltd in MS-Access, which must provide the following
functionalities:

• Query support
• Report generation
• Easy input facility for new data
• Keep details about Payment, Products, Performances, Sales etc.
• Maintain necessary details about Regional offices, Dealers, Salespersons etc.

After creating the database you must perform the following tasks:

(i) Design a report to display the daily, monthly and annual income of each region. Also,
show the profit /loss statistics.

(ii) Find out how many dealers placed the orders last year but did not made full payment
till now.

(iii) Design a report to display performance of the salespersons with their region and
dealer wise in term of sales of products.

14
(iv) Design a suitable form for storing basic information and salary details of
salespersons. Design and implement the necessary tables.

(10 Marks)

PART-IV: MCS-024

Question 1: Create a class Old which contains x and y co-ordinates as int. Define the default
constructor, parameterized constructor and void print() to print the co-ordinates. Now reuse
this class in New adding a new dimension as z of type int. Define the constructors for the
subclass and override the method void print() in the subclass. Implement main() to show
dynamic polymorphism.
(4 Marks)

Question 2:

Write a Java program to create a class that contains an array of integers containing numbers
21,22,..29 with member methods print() which prints the elements of array and reverse()
method reverses the elements of array using recursion.
(3 Marks)

(i) Write a Java program to implement the following given pattern of the numbers on the
screen:

1 2 3 4 5

1 2 3 4

1 2 3

1 2

1 (3 Marks)

15
Note: You must execute the program and submit the program logic, sample inputs and outputs
along with the necessary documentation for this question. Assumptions can be made wherever
necessary.

16

You might also like