You are on page 1of 10

Kulachi Hansraj Model School

Computer Science(083)
Holidays Homework

Do the following question in assignment register as well


as submit a CD having cpp files of these programs

a. SERIES (Wt. 1)
1. Write a function to generate the following series using functions passing
the required parameters:-
a. 1 + x2/2! + x3/3!.........xn/n!
b. 1+x2/3!-x3/4!.........xn/n+1!

b. MACROS(Wt. 1)
2. Write a program to define following macro/constant and their
implementation:
• Area of rectangle
• Area of square
• Area of triangle
• Constant Max = 100

STRING Manipulation (Wt. 1)


3. Write program to accept a string and display the following menu with out
using built-in functions: -
o String Length.
o Palindrome or not.
o Vowel count
o Change case.

ARRAYS & FUNCTIONS(Wt. 2)


4. Given two arrays of integers A and B of sizes M and N respectively.
Write a function named MIX() which will produce a third array named C,
such that the following sequence is followed : (HOTS)
All even numbers of A from left to right are copied into C from left to
right.
All odd numbers of A from left to right are copied into C from right to
left
All even numbers of B from left to right are copied into C from left to
right.
All odd numbers of B from left to right are copied into C from right to
left
A, B and C are passed as arguments to MIX().
e.g. : A is {3,2,1,7,6,3} and B is {9,3,5,6,2,8,10}, the resultant array C is
{2,6,6,2,8,10,5,3,9,3,7,1,3}
5. Write a function in C++ which accepts an integer array and its size as
arguments / parameters and assign the elements into a two dimensional
array of integers in the following format (HOTS)
If the array is 1, 2,3,4,5,6 If the array is 1,2,3

The resultant 2D array is given below The resultant 2D array is


1 2 3 4 5 6 given below
1 2 3 4 5 0 1 2 3
1 2 3 4 0 0 1 2 0
1 2 3 0 0 0 1 0 0
1 2 0 0 0 0
1 0 0 0 0 0

CLASSES (Wt. 3+2+1)


6. Define following class and make menu driven program to call its functions.
class array
{ int a[10];
int n;
public:
void createarray();
void showarray();
void insertion_Sort();
void selectsort();
void bubble_sort();
void Binary_search();
void Linear_search();
};
7. Define following class and make menu driven program for doing various
operations:
class arr2d
{ int a[10][10];
int m,n;
public;
void create2D( );
void show2D( );
void show2D_LOWER1( );
void show2D_LOWER2( );
void show2D_UPPER1( );
void show2D_UPPER2( );
void show_Diagonal1( );
void show_Diagonal2( );
};
Assuming the2D array to be a square matrix with odd dimensions , i.e 3x3,
5x5,7x7, etc
Example if the array content is
543
678
129
Output through the function void show_Diagonal1( ) and void show_Diagonal2( )
should be
Diagonal one : 5 7 9
Diagonal two : 3 7 1 .
Output through the function void show2D_LOWER1( ) and show2D_LOWER2( )
should be
5 3
67 7 8
129 1 2 9
Output through the function void show2D_UPPER1( ) and show2D_UPPER2( )
should be
543 543
78 67
9 1
8. Consider the following class employee
Private members:
Data members
EmpNo Integer
Name Character
Address Character
Pin code Character
Basic Salary Float
HRA Rate Float
DA Rate Float
PF Rate Float
HRA Float
DA Float
PF Float
GROSS Float
NET Float
• Calculate() to calculate HRA, DA, PF, GROSS and net salary
Public:
• Retempno() function to return empno
• Retename() function to return employee name
• Readdata() to accept employee no, name, address, pincode, Basic
salary, HRA rate, DA rate and PF rate.
Invoke function calculate() to calculate HRA, DA, PF, GROSS and net salary
• Displaydata() to display employee no, name, address, pincode, Basic
salary, HRA, DA, PF, GROSS and net salary of the employee
Display the following menu for atleast 5 employees (Array of employee
type): -
o Create. To accept data of 5 employee
o Salary statement. To display payslip of 5 employee
o Query in employee number. To accept empno and display
relevant data
o Query on employee name. To accept employee name and
display relevant data.

INHERITANCE(Wt. 1)
9. Consider the classes:
class student{
protected:
int roll;
char name[10];
public:
void read_roll();
void show_roll();
int return_roll()
{
return roll;
}
};
class test:public student
{
protected:
float unit1, unit2;
public:
void get_marks();
void show_marks();
};
class sports
{ protected:
char grade;
public:
void get_grade();
void show_grade();
};
class result : public test , public sports
{ float total;
public:
void show_result();
};

Complete the definition of above mentioned classes and write main


function for processing result of 5 students (array of result) and display
a menu:
1. Create (array of 5 result)
2. show result of all
3. Search on the basis of roll no. and display result if roll no
found
4. Exit
Networking and Communication

1.What is networking? Mention advantages of networking.


1. Expand the following terminologies:
HTML,GSM,CDMA,XML,DHTML, WLL, ISP,FTP,URL ,ARPANET, NFS, ISP, FTP ,
URL ,NIU, TCP/IP, XML, CDMA,TDMA,WLL, SMTP,NIC, CSMA/CD, NCP, STP, UTP,
MODEM, GPRS, 3G, SMS, PPP, Bps, bps, SNA, LEDs, PSTN, IMAP, POP, WWW, DGM,
RJ-45, URI, URN, MIME, FM, SLIP, VSNL, MTNL, DNS, NFS, GNU
2. Give two differences between XML and HTML.
3. Define interspaces.
4. Define and state why they are used –
a) Repeater b) Router c) Modem d) Hub e) Bridge f)Gateway g) RJ-45 h)Ethernet
card i) Switch
5. What is the purpose of using FTP? Write one difference between Telnet and FTP.
6. Describe the following in brief: (i) MOSAIC (ii) Usenet
7. Compare Optical Fiber and Coaxial transmission media.
8. Give 2 advantages and 2 disadvantages of various transmission media
9. What do you understand by the terms Cookies and Firewall?
10. Give two applications of Cyber law.
11. What is topology? Write two advantages and two disadvantages of
a. Star topology.
b. Bus Topology or Tree topology
c. Ring Topology
12. Define Circuit switching, Packet Switching, Message switching
13. What do you understand by a backbone network?
14. What is the significance of ARPANET in the network?
15. What is Network security? Give two major reasons to have network security.
16. What is the purpose of using a web browser? Name two web browsers.
17. Define the term bandwidth. Give unit of bandwidth.
18. When should switch be preferred over Hub?
19. Define protocol. Name different types of protocols
20. Define following protocols
FTP, TCP/IP , SLIP/PPP , HTTP, Datagram
21. Differentiate between LAN, MAN and WAN.
22. A company wants to form a network of their five computers to a server within the
company premises. Represent STAR , BUS and RING topologies diagrammatically for
this network.
23. What is 80-20 rule for network design?
24. Give the advantages of Email and World Wide Web services provided by Internet.
25. What is World Wide Web and what are its advantages?
26. What is the wireless computing? Compare with mobile computing.
27. What is the difference between TDMA and CDMA?
28. What is SIM card?
29. What is GSM? How it is different from CDMA?
30. What is WLL? Give 2 advantages of WLL.
31. Define: -a) 3G b)EDGE c)SMS
32. What is email? Give 2 advantages and 2 limitations of email?
33. Give structure of email.
34. Explain the email address nitiarora@gmail.com
35. How is voice mail different from chat?
36. What are the attributes of WWW?
37. Define: a) WWW b)URL c)Domain name
38. What is the difference between web browser and web server?
39. Explain elements in the URL http://www.khoj.com
40. What is website and how it is different from webpage?
41. What is web hosting? Give its type.
42. Differentiate between HTML, XML and DHTML
43. What is web scripting? What is the difference between client side scripting and server side
scripting ?
44. Which of the following is not a Client Side script:
(i) VB Script (ii) Java Script (iii) ASP (iv) PHP
45. What are viruses? How are they harmful to the computers?
46. How do viruses spread? What can be done to prevent viruses?
47. Define network security. What is its need? How can it be achieved?
48. What is open source software? Give 3 criteria for software to be called as open source.
49. Name few common open source software
50. Name the conditions which are applicable for open source software.
51. Differentiate between
a. Open source and shareware software.
b. Freeware and Shareware
c. Open Source and Proprietary software
52. Define: a)OSS b)FLOSS c)GNU d)FSF e)OSI f)W3C
53. For what purpose Mozilla is used?
54. What do you understand by the following:
a. Intellectual Property
b. Spam
c. Hacking
d. Cyber Crime
e. Cracking
f. Cookies
g. India IT Act 2000
h. Worms
i. Trojan Horses
55.
PART -II

1 King Soft Organization has set up its new center at Mumbai for its office and web based
Activities. It has 4 blocks of buildings as shown in the diagram below.

BLOCK A BLOCK B
BLOCK C BLOCK D

Center to center distance between various blocks


Block A to Block B 50 m
Block B to Block C 150 m
Block C to Block D 25 m
Block A to Block D 170 m
Block B to Block D 125 m
Block A to Block C 90 m

Number of Computers
Block A 25
Block B 50
Block C 125
Block D 10

a) Suggest a cable layout of connections between the blocks.


b) Suggest the most suitable place(i.e.block ) to house the server of this organization with a
suitable reason.
c) Suggest the placement of the following devices with justification.
a. Repeater
b. Hub/Switch
d) The organization is planning to link its front office situated in the city in a Hilly region
where cable connection is not feasible, suggest an economic way to connect it
e) Mention the economic technology to provide internet accessibility to all blocks

2 TKM Centenary public school in Kollam is setting up the network between its different
wings.
There are four wings named as Seniors (S), Kids (K), Juniors (J) and Hostel (H).
Distance between various buildings is given below:
Wing K to S 100m
Wing K to J 200m
Wing K to H 400m
Wing S to J 300m
Wing S to H 100m
Wing J to H 450m

Number of Computers
Wing K 10 Computers
Wing J 100 Computers
Wing H 50 Computers
Wing S 200 Computers

(i) Suggest a valid topology for networking the computer of all wings
(ii) Name the wing where the server to be installed. Justify your answer.
(iii)Suggest the placement of Hub or Switch in the network.
(iv) Suggest a most suitable way to connect effectively and speedy to head office in New
Delhi.
v) Suggest the placement of the following devices with justification:
(i)Repeater
(ii) Switch/Hub

3 Indian Industries has the following four buildings in Chennai.


Distance between various wings is given below:
Wing 1 to Wing 2 370m
Wing 1 to Wing 3 220m
Wing 1 to Wing 4 115m
Wing 3 to Wing 4 30m
Wing 2 to Wing 3 25m
Wing 2 to wing 4 50m

Number of Computers
Wing 1 35
Wing 2 25
Wing 3 80
Wing 4 60

i. Suggest suitable cable layouts for these buildings.


ii. Name the wing where the Server is to be installed. Justify your answer.
iii. Suggest the placement of Hub/Switch in the network.
iv. Mention an economic technology to provide Internet accessibility to all wings.

4 Hindustan Connecting World Association” is planning to start their offices in four major
cities
in India to provide regional IT infrastructure support in the field of Education & Culture. The
company has planned to set up their head office in New Delhi in three locations and have
named
their New Delhi offices as “Sales Office”, “Head Office” and “Tech Office”. The company’s
regional offices are located at “Coimbatore”, “Kolkata” and “Ahmedabad”.
A rough layout of the same is as follows:
Approximate distances between these offices as per network survey team is as follows:
PlaceFrom Place To Distance
Head Office Sales Office 10 KM
Head Office Tech Office 70 Meter
Head Office Kolkata Office 1291 KM
Head Office Ahmedabad Office 790 KM
Head Office Coimbatore Office 1952 KM
In continuation of the above, the company experts have planned to install the following
number
of computers in each of their offices:
Head Office 100
Sales Office 20
Tech Office 50
Kolkata Office 50
Ahmedabad Office 50
Coimbatore Office 50
(i) Suggest network type (out of LAN, MAN, WAN) for connecting each of the following set
of
their offices:
- Head Office and Tech Office
- Head Office and Coimbatore Office
(ii) Which device will you suggest to be procured by the company for connecting all the
computers within each of their offices out of the following devices?
- Modem
- Telephone
- Switch/ Hub
(iii) Which of the following communication media, will you suggest to be procured by the
company for connecting their local offices in New Delhi for ver effective and fast
communication?
- Ethernet Cable
- Optical Fiber
- Telephone Cable
(iv) Suggest a cable/ wiring layout for connecting the company’s local offices located in New
Delhi. Also, suggest an effective method/ technology for connecting the company’s regional
offices at “Kolkata”, “Coimbatore” and “Ahmedabad”.

You might also like