Você está na página 1de 113

Icse Resource Provider

A reference source providing full length study material and project material for ICSE
students.

Jun 25, 2011

Some Common Questions Based on Topo sheets


If you get these questions, look for these points in the topo sheets and can
write these answers:
1.Mention any two features seen in the map extract which indicate the
region has seasonal rainfall. Seasonal streams/ Broken ground/open
scrub/seasonal tank/cart track motorable in dry season/narrow perennial
channel in the dry bed of the river (after looking for these features, select
any two features that you find on the topo sheet and write this way)
Ans: Open scrub and seasonal streams are two features in the map that
indicate the region has seasonal rainfall.
Rivers, steams and ponds/tanks are dry in nature.
Barren land shown in white colour also indicate that the region has
seasonal rainfall.
2.Mention any three features seen in the map extract which attract holiday
makers.(look for various tourist destinations like temple, waterfalls, lakes,
park, sunset points, etc and then write answers)
3. Which is the chief form of irrigation shown in the map extract? Give
some evidences to justify your answer.(look for perennial wells first, then
the rivers, lakes, tanks, etc and give answer. For example, if you find the
presence of many blue circles in the map, then you can write your answer
this way.)
Ans: The chief form of irrigation is perennial well-irrigation. Presence of
blue circles scattered all over the map .
4. Give one reason to explain why the steams in grid square ......... do not
join a river.
(look for sandy soil , rainfall, etc)Ans; Reasons for streams not meeting the
main river due to:* presence of sandy soil which is porous
* poor rainfall
* high rate of evaporation. (any two )
5. State two reasons for the absence of human habitation in some region of
the map extract.( check for any features that is not suitable for human
habitation like dense forest, open shrubs, steep hills, deserts, lack of
roads, etc)Ans: The region is densely forested, many streams with very

steep hills. Expensive to build roads.


6. What is the small white patch in the river?Ans: Barren island
7. What will be the main occupation of the people be in i. highlands ii.
Lowlands?i. highlands collection of forest products
ii. Lowlands - agriculture
8. Why are there no metalled roads in the mapped area?( reasons may be
many- look for dense jungles, or barren land, steep hills, or many streams
and then answer according to the features,)Ans: The area has dense
jungles, steep hills and no important settlement- steams and barren land
discourage the building of metalled roads.
9. Give evidence to prove poor rainfall in the region.
(look for features like sand dunes disappearing steams, scrub vegetation,
broken grounds, etc. If you find these features, then you write the answer
this way) Ans. The region has poor rainfall due to the
Presence of sand dunes
Presence of undefined and disappearing streams
Presence of scrub vegetation
Presence of broken grounds
10. Give two reasons for the presence of only footpaths in the green wash.
The reasons for the presence of foot-paths are:
* seep and rugged terrain makes construction of roads difficult.
* temples are the only destinations in the forested mountain region and
hence foot-paths are created by the pilgrims.
* footpaths may be created by people who depend on forest produce.
11. Why do so many contour lines so close together in the extract indicate
about the topography?(look for steep hills, or a temple in the jungle and if u
find these.................)Ans: Very steep (indicated by close contours) and hilly
(indicated by many contours) land.
12. How can we draw a climatic inference from a toposheet?
(there may be a question - what type of climate do you find in the particular
area - look for these features and then write the answers accordingly -First
of all, we should try to know which area of the toposheet belongs to. This
gives us a faint idea about the part of the country and the type of climate
prevailing there. Further, scanty amount of rainfall can be judged by seeing
dry rivers, dry tanks, sand dunes and scrubs and scanty vegetation.
Similarly dense forests indicate tropical monsoon climate.)
(If you find dry rivers, or dry tanks or sannd dunes, scrubs, scanty
vegetation, then your answer wil be)
The area experiences scanty rainfall or poor rainfall with dry weather.
(if you find dense forests, then your answer will be)

The area experinces Tropical Monsoon climate.


Questions on occupation
13. What is the occupation of the people of a particular region from an
extract of the survey map or toposheet?
(When you get a question on the occupation of the people , look for these
features. Directly from a toposheet, we cannot know about the occupation
of the residents. We can amplify the occupation by inferences provided on
the toposheet. Therefore one must know the colours and what it indicates.
For example, all of you know that yellow colour indicates agricultural land
and hence agriculutre can be major occupation. Green colour shows
forested or wooded area and this indicates that people follow in lumbering,
furniture making, carpentry and bamboo work, etc. Presence of big towns,
industrial area, railway station, etc., indicates that people must be
employed in urban services. Rest houses in hilly areas show devp of
tourism. symbols of mines, may suggest that some people are employed in
mining activities. if you find grassy area, then it indicates sheep or cattle
rearing. Settlement along roadside indicates devp of trade and commerce.
If you locate wells, tanks, canals, etc., show the cultivation of cash or
cereal crops. parks, lawns, historical monuments indicate occupations like
tourism, recreation, cultural devp, etc. So, my dear students, when you get
a question on the occupation of the people, look for these features and
write the answer accordingly. for example if you find grassy area or open
shrubs, then the occupation will be sheep and cattle rearing. I hope you got
me. )

14. What occupations do the people follow in Highland areas?


Ans: High land regions with steep slopes have the following features:

most of the slopes are unsuitable for agriculture. Pastures on the


slopes may be fit for grazing.

forestry may be a predominant economic activity in this region.

flat area over plateaus may be used for cultivation.


15. How can you judge the suitablity of land for agriculture from
toposheets? give a good reason.

a meandering river on the toposheet will indicate a lower or nil


gradient. Thus, such a plain area would be suitable for cultivation.

Dendritic or tree-like drainage pattern would confirm soft surface


suitable for agriculure wheras trellised drainage pattern suggests chalk
country, which is not much suited for cultivation.
Sand features, e.g. barkhans and disappearing streams would
indicate the dry conditions with the high temperature. These conditions are
unsuitable for agriculture.
presence of broken ground would confirm seasonal flooding. Silt
deposition by rivers is a good sign for agriculture.
network of canals, dams, tanks and tubewells will indicate intensive
use of land for agriculture.
so look for these features on the toposheet and write accordingly.
For example, which are the main occupations of the people in this area?
give reasons in support of your answer.
( if you see yellow wash, perennial wells, green colour,kilns on the
toposheet, your answer will be like this.)
Ans: Farming and forestry seem to be the two occupations in this area
because a large part of the map has yellow wash which symbolizes
cultivated area. A large number of perennial wells present in the area also
support this inference. Some part of the map shows presence of open
jungles.......(mention, south, or north, west or east) which is indicated by
green colur which suggests forestry as an important occupation there.
presence of kilns shows that lime and brick making is also an occpation of
some people.

POINTS TO REMEMEBR REGARDING OCCUPATIONS:


If you find KILN , then the occupation will be drying and baking
bricks, pottery, limestone, etc. So you write the answer this way: The
occupation is drying and baking bricks, pottery, etc due to the presence of
Kiln in the area.

if you find STONE QUARRY, then the occupation is quarring.

If you find irrigation from wells, canals or tanks, farming is the


occupation.

if you find yellow wash, agriculture is the occupation of the area.

if you dont find any source of irrigation, it means farming is likely to


be dependent on rainfall only.

mining is the occupation if you find settlements near mines or


quarries.

if you find settlements along the banks of the river, then fishing is an
occupation of that area.

if settlement is near the forest(green colour), then the people are


dependent on forest products like fruits, nuts, or leaves. there may be
primitive agriculture. so when you write the answer, write this way: people
are dependent on forest produce or foresty and may practice primitive
agriculure.

if you find large settlements, esp near the metalled roads, the
occupation can also be industries, trade, services.

in case they are headquarters of districts, taluqs, employment can


also be in administrative sector because of the presence of large number of
offices and organisations.
so please go through the toposheet properly since one question will be
definite on occupation.

16. What is the brown line in grid square ............. called? What does the
figure written aong this line indicate?
(if it is a brown line , then it is a contour. Second part of the question imagine you see figure 280 m ... then it means 280 m above sea level.)
Ans: The brown line that we find in grid square is Contour line. The line 280
m joins places 280 m above sea-level on the map.
17. What are the brown lines seen in such abundance? What do they
indicate?
(same answer as question 16)
ans: They are contour lines. They indicate lines joining places having the
same height above sea-level. Closeness of the contours indicates
mountainous topography.
17. What is a causeway? Why are there so many causeways in the map?
Ans: Causeways are land raised across streams for use as metalled road or
paths. The numerous streams crossing the metalled road are likely to flood
them.
18. Explain the term Depression in the map.
Ans: Depression is a shallow lowland in a sandy region often created by
deflation of wind.
19. Name the geographical feature represented by white patches in the
middle of the river.
Ans: The geographical feature in the middle of the river represented by
white patches is an island or rocks or stores.

20. What do the following represent in the map? i. Black broken lines ii.
Black curved lines.
i. Black broken lines indicate disappearing stream and black curved lines
indicate broken ground.

21. Name 4 methods by which relief is shown on the map.* Contour lines *
Layer Colouring/tinting * Spot height * Hill shading.
22. What is layer-tinting/colouring?
It is a method, where a colour scheme is used to show relief on the map.
23. What is cartography?
Cartography is an art and science of drawing maps, diagrams and charts.

POINTS TO REMEMBER:

RELATIVE HEIGHT OR APPROXIMATE HEIGHT: REMEMBER:-This height is


not taken from the sea level but with respect to the surrounding area. It
may be height of a dam, bridge, sand dune, or it can be depth of a well,
tank, hill, or river canal, for example 2r, 3r, 5r, 6r, etc.
Example:
3r the relative depth of the perennial lined well is 3 metres.(if 3r is written
near the symbol of perennial well. don't write height but the depth)
5r the relative height of dry tank is 5 metres ( if 5r is written near the dry
tank symbol)

16r therelative height of sand dune is 16 metres. (if 16r is written near the
symbol of sand
dunes)
8r the relative height of river bank is 8 metres (if 8r is written near the river
bank)
PLEASE NOTE: you must write the word RELATIVE HEIGHT/DEPTH
of .................................

COLOURS:
7 COLOURS are used on toposheets:
i. BLACK: Names, lines of latitudes and longitudes, broken grounds, river
banks, dry rivers, surveyed trees, heights and their numbering, railway
mines, telephone, telepgraph lines
ii. RED: Grid lines (eastings and northings) , their numbering, roads, cart
tracks, settlements, huts and other buildings.
iii. GREEN: Forested and wooded areas, scrubs, scattered trees, orchards
iv. BLUE: Water bodies containing water like wells, rivers, etc
v. YELLOW: cultivated areas
vi. BROWN: Contour lines, their numbering, form lines, all sand features
like sand dunes, sand hills, stony waste
vii. WHITE PATCHES: uncultivated and barren lands

DIRECTIONS

Directions are important for physical as well as urban features. the physical
features involve the directions of rivers, streams, and the urban cities from
one another.
When a question is asked regarding the banks of the river or direction of
the river, the following steps should be observed.
first of all, look at the spot heights to determine the slope of the land.
As you know, spot heighs are marked this way 265 289

see which spot heights are higher and where it is lower, and then you
will know which way or direction it slopes. the slope of the land may be
from north east to south west. and if you see a river , then it flows from
north-east to south-west.

to know on which side or bank of the river a place is situated (a place


may be a temple, settlement, town, etc)one has to locate the source of the
river. Having located the direction of the river, imagine yourself standing at
the source of the river f acing the main river. to your right is right bank and
to your left is left bank. SO SIMPLE, BOSS!!!

when a question is askend on directions with reference to urban


cites/settlements, remember these points.

some times the questions are asked on the direction of a city or


settlement with a reference to the other. First of all, pay attention to the
words 'FROM' a place and 'TO' a place. Imagine yourself standing on the
'FROM' PLACE and look at the TO PLACE. Use the direction arrow and
write the direction.
FEW IMPORTANT TERMS:

A. Layer Tinting: Layer tinting is a method of showing relief by color. A


different color is used for each band of elevation. Each shade of color, or
band, represents a definite elevation range. A legend is printed on the map
margin to indicate the elevation range represented by each color. However,
this method does not allow the map user to determine the exact elevation
of a specific pointonly the range.
b. Form Lines. Form lines are not measured from any datum plane. Form
lines have no standard elevation and give only a general idea of relief.

Form lines are represented on a map as dashed lines and are never labeled
with representative elevations.
c. Shaded Relief. Relief shading indicates relief by a shadow effect
achieved by tone and color that results in the darkening of one side of
terrain features, such as hills and ridges. The darker the shading, the
steeper the slope. Shaded relief is sometimes used in conjunction with
contour lines to emphasize these features.
d. Hachures. Hachures are short, broken lines used to show relief.
Hachures are sometimes used with contour lines. They do not represent
exact elevations, but are mainly used to show large, rocky outcrop areas.
Hachures are used extensively on small-scale maps to show mountain
ranges, plateaus, and mountain peaks.
e. Contour Lines. Contour lines are the most common method of showing
relief and elevation on a standard topographic map. A contour line
represents an imaginary line on the ground, above or below sea level. All
points on the contour line are at the same elevation. The elevation
represented by contour lines is the vertical distance above or below sea
level.

(1) Index. Starting at zero elevation or mean sea level, every fifth contour
line is a heavier line. These are known as index contour lines. Normally,
each index contour line is numbered at some point. This number is the
elevation of that line.
(2) Intermediate. The contour lines falling between the index contour lines
are called intermediate contour lines. These lines are finer and do not have
their elevations given. There are normally four intermediate contour lines
between index contour lines.
(3) Supplementary. These contour lines resemble dashes. They show
changes in elevation of at least one-half the contour interval. These lines
are normally found where there is very little change in elevation, such as
on fairly level terrain.

ICSE Biology Class X Solved Important Papers By Mr. M. P. Keshari

Biology - The Endocrine System (Solved)


Disable Pop up Blockers to View Solution

Question .1. Name the following :


(i) The hormone secreted by beta cells of islets of langerhans.
(ii) An endocrine gland.
(iii) The endoctine gland which produces emergency hormone.
Answer :
(i) Insulin.
(ii) Adrenal, thyroid / pituitary.
(iii) Adrenal gland.
Question .2. State true or false. Write correct statement by changing first word only. estosterone is
an androgen.
Answer :
True
Question .3. Pick the odd one out :
(i) Thyroid, adrenal, pituitary, prostate.
(ii) Cretinism, myxedema, exophthalmic goiter, scurvy.
(iii) Insulin, glugagons, diabetes insipidus, dibetes mellitus.
(iv) Insulin, bllod sugar, adrenalin, thyroxine.
(v) Oestrogen, progesterone, testosterone, prolactin.
Answer :
(i) Prostate.
(ii) Exophthalmic goiter.
(iii) Diabetes insipidus.
(iv) Blood sugar.
(v) Testosterone.

Question .4. Give the category and select the odd one out :
(i) Goitre, dwarfism, acromegaly, cataract.
(ii) ADH, TSH, NADP, ACTH.
(iii) Steroids, cortisone, testosterone, adrenalin, prolactin.
(iv) Adrenal, liver, thyroid, ptutiary.
(v) Adrenalin, penicillin, insulin, thyroxine.
Answer :

Category

Odd one

(i) Hormonal diseases

Cataract

(ii) Hormones

NADP

(iii) Hormones

Steroids

(iv) Endocrine glands

Liver

(v) Hormones

Penicillin.

Question .5. Choose :


(i) Which of the following gland has both endocrine and exocrine function (Pitutiary, thyroid,
pancreas, adrenal).
(ii) (Myxedema, simple goiter, exophthalmic goiter) is a disorder caused by excess thyroid
hormone.
Answer :
(i) Pancreas.
(ii) Exophthalmic goiter.
Close

Question .6. Complete the following table :


Gland

Secretions

Effect on Body

Oestrogen

Alpha cells of pancreas

Protruding eyes

Lachrymal

10

Gigantism

Answer :
1 Ovary.
2 Responsible for developing secondary sexual characters of females.
3 Secrete glucagons.
4 Glucagon helps to convert glycogen stored in liver to glucose.
5 Thyroid. 6 Thyroxin. 7 Tears. 8 Tears lubricate the eyes and prevent dust from entering in the eye. 9
Pitutiary gland. 10 Growth hormone (somatotropin).

Question .7. Complete the following table by filling in the blank space 1 to 8.

Name of Gland

Substance Produced

One important
function

Beta cells Islets of


Langerhans.

1. .. .

2. .

3. .. .

Adrenalin

4. .. .

5. .. .

Thyroxine

6. .

7. .

LH

8. .

Answer :
1 Insulin.

2 Regulates blood sugar level.


3- Adrenal gland.
4 Prepare the body for Flight or fight actions. 5- Thyroid gland.
6 Promotes tissue metabolism, growth and differentiation.
7 Anterior lobe of pituitary gland.
8 Stimulates ovulation, maintaenance of corpus luteum and secretion of progesterone in female and secretion of
testosterone in males.
Close

Question .8. Define endocrine gland.


Answer :
Endocrine glands are ductless glands which secretes hormones.

Question .9. Differentiate between :


(i) Diabetes mellitus and Diabetes insipidus.
(ii) Acromegaly and Myxedema.

Answer :
(i)

Diabetes mellius

Diabetes insipidus

1. It is caused by the deficiency of insulin.

1. It is caused by the deficiency of ADH.

2. Patients urine contains glucose.

2. Glucose is not present in the urine.

Acromegaly

Myxedema

Due to oversecretion of growth hormone in


adult.

Due to low secretion of thyroxine in adults.

(ii)

Close

Question .10. Answer the following questions :


(i) Name the endocrine cells present in the pancreas.
(ii) Name two hormones secreted by the above mentioned cells.
(iii) Mention on main function of each hormonenamed in (ii).

Answer :
(i) Islets of langerhans.
(ii) Insulin and glucagons.
(iii) Insulin lowers the blood glucose level. Glucagon increases the blood glucose level.

Question .11. Why people living in hilly regions usually suffer from simple goiter.
Answer :
The soil and water in hilly region is deficient in Iodine.
Close

Question .12. Name the hormones produced by the following glands. In each case state one
function of the hormone :
1. Thyroid.
2. Pancreas.
3. Adrenal medulla.
Answer :
1 Thyroid Thyroxine and calcitonin Thyroxine controls metabolic rates of carbohydrate, protein and fat.
2 Pnacrea Insulin and glucagon insulin decreases blood glucose level.
3 Adrenal medulla Adrenalin Increases heart beat and blood pressure.

Question .13. Give logic for why insulin is injected into the body of a highly diabetic patient and
not given orally ?
Answer :
Insulin is a protein. It is not given orally as it will be digested in the intestine. Thus it is injected directly into the blood.

Question .14. Write briefly about :

(i) Exophthalmic goiter (Symptoms and cause).


(ii) Diabetes mellitus (Symtoms and cause).
Answer :
(i) Exophthalmic goiter Symtoms Thyroid enlarged, eyes protrude out, high blood pressure and increase in
body temperature, patient loses weight.
Cause Exess of thyroxine secreted by thyroid gland.
(ii) Diabetes mellius Symtoms Increased thrust and urination, increased appetite, presence of glucose in urine.
Cause Under secretion of insulin.

Question .15. Given figure is the outline of the human body. Redraw the same and then place the
following organs in the correct position and label them :

Fig.
1 Thyroid gland; 2 Windpipe; 3 Diaphragm; 4 Right and left lungs; 5 Right and left
kidneys; 6 Adrenal glands.
(i) Name the hormone produced by the thyroid gland and state its function in the body.
(ii) What would a child suffer from if there was hyposecretion of this gland ?
(iii) What role does the diaphragm play in the inspiration of air. Explain briefly.
Answer :

Fig.
(i) Thyroxine. Function It controls cellular respiration / controls carbohydrate metabolism.
(ii) Cretinism.
(iii) During inhalation, the diaphragm flattens and the volume of thoracic cavity increases and during exhalation
diaphragm become dome-shaped thus decreasing the volume of thoracic cavity.

Question .16. Given below are the diagrammatic sketches of some endocrine glands. Observe the
figures and answer the following questions.

(i) Label the parts 1 to 5.


(ii) Name the hormone secreted by 2 and 5.

(iii) Which chemicals in our body are greatly affected by hormones ?


(iv) What is the chemical nature of hormones ?
(v) Name the elements related with the functioning of hormones secreted by the structure(2).
(i) 1 Larynx; 2 Left lobe of thyroid gland; 3 Trachea; 4 Oesophagus; 5 Parathyroid.
(ii) Part 2 secretes thyroxine and calcitonin. Part 5 secretes paratharmonewhich works with calcitonin in regulation
of blood calcium.
(iii) Enzymes.
(iv) Either protines or amino acids or steroids.
(v) Iodine is related with the function of gland.
Close

Biology - The Reproductive System (Solved)


Disable Pop up Blockers to View Solution

Question .1. Name :


(i) The organ in which foetus develops in a mammalian female.
(ii) The male reproductive cells of mammals.
(iii) The part of female reproductive system where fertilization takes place.
(iv) Produces male gamets in man.
(v) The fluid surrounding the developing embryo.
(vi) The structure in which testes are present in man.
(vii) The period of intrauterine development of embryo.
(viii) The canal through which testes descend into scrotum just before birth in a
huma male child.
Answer :
Solution:
(i) Uterus.
(ii) Spermatozoa / sperm.
(iii) Oviduct.
(iv) Testis.
(v) Amniotic fluid
(vi) Scrotum.
(vii) Gestation.
(viii) Inguinal canal.

Question .2. Write true or false :


(i) Zygote is the product of fusion of male and female gametes.
(ii) Tubectomy involves the cutting and tying of vas deferens in male.
(iii) Pregnancy in woman can be prevented by the method of vasectomy.

(iv) Fertilization is the product of fusion of egg nucleus and sperm nucleus.
(v) Fertilization of ova in human female occur in the vagina.
Answer :
Solution:
(i) T
(ii) F
(iii) F
(iv) T
(v) F.
Close

Question .3. Choose the correct one :


(i) Fertilization of human egg normally occurs in the (uterus, fallopian tube,
vagina).
(ii) The (epididymis, vas deferens, seminal vesicle) store sperm.
(iii) Sterlization of female involves cutting and tying the (ureter, uterus, urethra,
oviduct).
(iv) The site of fertilization in human female is (vagina, oviduct, uterus).
Answer :
Solution:
(i) Fallopian tube.
(ii) Epididymis.
(iii) Oviduct.
(iv) oviduct.

Question .4. Write in logical sequence :


(i) Implantation, ovulation, childbirth, gestation, fertilization.
(ii) Sperm duct, penis, testis, sperm, semen.

(iii) Graafian follicle, ostium, ovum, uterus, fallopian tube.


(iv) Implantation, fertilization, ovulation, gestation.
Answer :
Solution:
(i) Ovulation, fertilization, implantation, gestation, child birth.
(ii) Testis, sperms, sperm duct, semen, penis.
(iii) Graafian follicle, ovum, ostum, fallopian tube, uterus.
(iv) Ovulation, fertilization, implantation, gestation.

Q.5. Uterus : Implantation : : Fallopian tube : .


Answer :
Solution:
Fertilization.

Question .6. Give the function of :


(i) Testis.
(ii) Scrotum.
(iii) Placenta.
(iv) Acrosome.
(v) Amniotic fluid.
(vi) Amnion.
(vii) Seminiferous tubule.
Answer :
Solution:
(i) Tesis Produce sperms and male sex hormone testosterone.
(ii) Scrotum Keeps testis at a lower temperature (2C less than body temperature) and fabours maturation of
sperms.

(iii) Placenta Transfers nutrients, oxygen and antibodies from maternal blood to foetal blood and remove metabolic
wastes. It also acts as an endocrine gland.
(iv) Acrosome Entry of sperm into egg is facilitated by release of certain lysosomal enzyme by the acrosome on
the head of sperm.
(v) Amniotic fluid Protects the developing embryo from shock and injuries.
(vi) Amnion Encloses the embryo by forming amniotic cavity which is filled with clean lymph like fluid which
cushions and protects the embryo from shock.
(vii) Seminiferous tubule It is lined internally by germinal epithelium. Some of these epithelial cells functions as
spermatogonia and give rise to sperms.

Question .7. Structure and functional activity of Corpus luteum and . .


Answer :
Solution:
Secretion of progesterone.

Question .8. Pick the odd one :


(i) Larynx, pancreas, testis, ovary.
(ii) Ovary, fallopian tube, ureter, uterus.
Answer :
Solution:
(i) Larynx.
(ii) Ureter.

Question .9. Explain briefly :


Most often only one embryo is formed at a time although there are two ovaries in
women.
Answer :
Solution:
Normally only one egg matures in each ovary every alternate month. Hence most often only one embryo is formed at
a time although there are two ovaries in women.

Question . 10. What is meant by gestation period ?

Answer :
Solution:
The time interval between implantation and birth is called gestation period.

Question .11. Differentiate between :


(i) Structure of sperm and structure of ovum.
(ii) Prostate and cowpers gland (nature of secretion).
(iii) Implantation and gestation (definition).
Answer :
Solution:
(i)

Sperm

Ovum

1. It is the male gamete.

1. It is the female gamete.

2. It is produced in the testes.

2. It is produced in the Ovary.

3. It is motile, consists of head, neck, middle


piece and tail.

3. Non-motile and round in structure.

(ii)

Prostate gland

Its secretion is alkaline in nature and


neutralizes acidity in semen in male urethra
(due to previous urination) and female
reproductive tract.

(iii)

Cowpers gland

Its secretion serves as lubricant in vagina for


frictionless movement of penis during
copulation.

Implantation

It is fixing of embryo on the wall of uterus.

Gestation

It is full term of development of embryo in


uterus (about 280 days).

Question .12. Draw a diagram of human sperm and label the following parts :
head, middle piece, acrosome, mitochondria, tail.
Answer :

Question .13. The following diagram represents the ventral view of the female
reproductive system :

Fig.

(i) Label the parts indicated by guidelines 1 to 8.


(ii) How does the uterus prepare for the reception of a zygote ?
(iii) What happens to the uterus if fertilization takes place ?
(iv) What happens to the uterus if fertilization has failed to take place ?
(v) Name the fully developed part of ovary containing the ovum.

(vi) Name the organs of the female body in which the foetus develops.
(vii) Name the parts homologous to penis of male.
(viii) What is ovulation ?
(ix) Which two hormones are secreted by ovary ?
(x) How does the human embryo developing in the uterus obtain its
nourishment ?
(xi) State the function of (1) Placenta and (2) amniotic fluid.
(xii) Differentiate between identical twins and fraternal twins.
Answer :
Solution:
(i) 1. Oviduct; 2. Funnel of oviduct; 3. Ureter; 4. vagina; 5. Ovary; 6. Uterus; 7. Urinary bladder; 8. Urethra.
(ii) The wall of uterus get thickened and richly supplied with blood capillaries to receive the zygote.
(iii) The wall of the uterus further thickens and gets intensely supplied with blood capillaries and the embryo is
attached to uterine wall after 7 days of fertilization.
(iv) The endometrium breaks down and causes discharge of blood and mucus resulting in menstruation.
(v) Graafian follicle.
(vi) Uterus.
(vii) Clitoris.
(viii) The process by which the matured ova discharges from the ovary.
(ix) Oestrogen and progesterone.
(x) The foetus gets nourishment from the mothers blood through the placenta.
(xi) (1) Placenta Exchange of digested food.
(2) Amniotic fluid Protects foetus from jerk/shocks.
(xii)

Identical twin

Fraternal twin

Develop from single egg after fertilization.

Develop from two separate eggs after


fertilization.

Question .14. Given below is the outline of the cross section of the male
reproductive system :

Fig.

(i) Copy the outline onto your answersheet in pencil and label the following parts
testis, epididymis, seminal vesicles, vas deferens.
(ii) Name the hormone produced by the testis.
(iii) Why are sperms produced in large numbers ?
(iv) State the function of the seminal vesicles.
Answer :
(i)

Fig.

(ii) Testosterone.
(iii) Low count of sperms causes infertility because large number of sperms go astray.
(iv) Seminal vesicles produce a secretion which serves as a medium for the movement of sperms towards the female
oviduct.

Question .15. The diagram given below is that of a developing human foetus in
the womb. Study the same and then answer the questions that follow :

Fig.

(i) Name the parts 1 to 5 indicated by guidelines.


(ii) What term is given to the period of development of the foetus in the womb.
(iii) How many days does the foetus take to be fully developed ?
(iv) Mention two functions of the parts labelled 2 other other than its endocrine
function.
(v) Name the hormone (any one) produced by the part 2.
(vi) Name the function of part labelled 3.

Answer :
(i) 1 Umbilical cord. 2 Placenta. 3 Amniotic fluid.
4 Cervix. 5 Uterine wall.
(ii) Gestation.
(iii) 280 days.
(iv) Provides diffusion for respiratory gases between mother and foetus, removes urea produced by foetus.
(v) Progesterone.
(vi) Absorbs shocks.

Question .16. The diagram given below is one of the system in the male human
body :

Fig.

(i) Write down the name of the organ in the system.


(ii) Label guidelines 1 to 5.
(iii) Write down the functions of guideline numbered 2 and 5.
Answer :
(i) A vertical section of a testis.
(ii) 1 Spermduct (Vas deferens). 2 Epididymis.
3 Outer wall of testis (Tunica Albuginea). 4 Collecting ducts.
5 Seminiferous tubules.
(iii) Function of No. 2. (Epididymis) A tube like structure firmly attached to the testis.
The seminiferous tubules open into it through ducts. It is the chief store place of spermatozoa.
Function of No. 5. (Seminiferous tubules) Arw coiled structure involved in the formation of spermatozoa. The
seminiferous tubules form a network at the end of the testis.

Biology - Sense Organs (Solved)


Disable Pop up Blockers to View Solution

Question .1. Name the following :


(i) The eye defect caused due to the shortening of the eyeball from front to back.
(ii) The region of distinct vision in the eye.
(iii) The tube which connects the cavity of the middle ear with the throat.

(iv) The nerve which transmits impulses from the ear to the brain.
(v) The part of eye responsible for its shape.
(vi) Helps to change the focal length of the eye lens.
(vii) The opening through which light enters the eye.
(viii) The photosensitive pigment present in the rod cells in the retina.
(ix) The part of eye responsible for change in the size of the pupil.
(x) The ear ossicle in contact with oval window of inner ear.
(xi) Adjustment of eye in order to obtain a clear vision of objects at different
distances.
(xii) The cells of the retina that are sensitive to colour.
Answer :
(i) Hypermetropia.
(ii) Macula / fovca / yellow spot.
(iii) Eustachian tube.
(iv) Auditory nerve.
(v) Vitreous humour.
(vi) Ciliary muscles.
(vii) Pupil.
(viii) Rhodopsin.
(ix) Iris.
(x) Stapes.
(xi) Accomodation.
(xii) Cones.

Question .2. State true or false. Rewrite the wrong statements by changing the
words.
(i) Cones are photoreceptor cells that are sensitive to dim light.
(ii) Deafness is caused due to rupturing of pinna.
(iii) Cones are receptor cell in retina of eye sensitive to dim light.

(iv) Hypermetropia is a defect of eye caused due to eyeball being elongated.


Answer :
(i) False. Rods are photoreceptor cells that are sensitive to dim light.
(ii) False. Deafness is caused due to rupturing of tympanum.
(iii) False. Rods are receptor cells in retina of eye sensitive to dim light.
(iv) False. Myopia defect of eye is caused due to eyeball being elongated.

Question .3. Write in logical sequence :


(i) Ear ossicles, oval window, tympanum, auditory canal, cochlea.
(ii) Yellow spot, conjunctiva, pupil, comea, lens, vitreous humour, aqueous
humour.
Answer :
(i) Auditory canal, tympanum, ear ossicles, oval window, cochlea.
(ii) Conjunctiva, cornea, aqueous humour, pupil, lens, vitreous humour, yellow spot.

Question .4. Eye : Optic nerve : : Ear : .


Answer :
Auditory nerve.

Question .5. Pick the odd one and write the category.
(i) Semicircular canal, malleus, cochlea, utriculus, sacculus.
(ii) Myopia, hypermetropia, xerophthalmia, astigmatism.
Answer :
(i) Parts of inner ear. Malleus.
(ii) Disease of eye. Xerophthalmia.

Question .6. Mention two functions of the choroids coat in the eye.
Answer :
Choroids forms nutritive layer of eye. Contains iris. It prevents reflection of light inside the eye.

Question .7. Give exact location and function of :


(i) Pinna.
(ii) Ear ossicles.
(iii) Fovea.
Answer :
(i) Side of head, collects sound waves.
(ii) Middle ear, increases the magnitude of vibrations.
(iii) Axis of eye in retina, more clear and distinct image is formed.

Question .8. Structure and functional activity.


Organ of corti and .
Answer :
Hearing.

Question .9. Describe the function of :


(i) Eustachian tube.
(ii) Iris of the eye.
(iii) Ear ossicles.
Answer :
(i) It serves to adjust the pressure inside the middle ear to the change in the atmospheric pressure for normal hearing
so that the tympanum is not affected by high pressure.
(ii) The radial and circular muscles of the iris contract or relax and hence the size of the pupil is adjusted.
(iii) It transmits and increase the magnitude of vibrations to inner ear.

Question .10. Choose the correct answer :


Yellow spot and ciliary muscles are found in (eye, ear, heart).
Answer :
Eye.

Question .11. State briefly:


(i) Myopia (symptom and cause).

(ii) Tympanum (location and function).


(iii) Yellow spot (location and importance).

Answer :
(i) Myopia : It is also called short sightedness.
Symptom Near vision is clear and distant vision is blurred.
Cause Eye ball becomes too longer i.e. eye lens is too convex and hence focal length is shortened. The image of
distant object is formed in front of the retina.
(ii) Tympanum : Location It is located between external and middle ear.
Function Sound waves from outside cause tympanum to vibrate which are ultimately transmitted across the middle
ear and produce sound.
(iii) Yellow spot : Location At the back of the eye almost at the centre of the horizontal axis of the eye ball.
Importance Place the best focus of the rays of light that enters and a very clear image is seen in the normal eye.

Question .12. Differentiate between :


(i) Choriod and sclerotic layers of eye.
(ii) Dynamic balance and static balance.
(iii) Rod and cone cells.
(iv) Myopia and hypermetropia.

Answer :
(i)

Choriod

Absorb light and prevent total internal


reflection that may cause blurring of image.

Sclerotic

Provides and maintains shape of eye ball.

(ii)

Dynamic balance

The sensory cells in cristae of internal ear


are concerned with balance while body is in
motion.

Static balance

The sensory cells in ear which are located in


Maculae of vestibule are responsible for
static balance in human beings by detecting
change in the head or body at rest.
Concerned with positional balance with

respect to gravity.

(iii)

Rod cells

Cone cells

Rhodopsin

Iodopsin

Myopia

Hypermetropia

Lens too convex

Flattened condition of lens

(iv)

Question .13. What is meant by power of accommodation ? Name the muscles of


the eye responsible for the same.
Answer :
Power of accommodation is the ability of eye to see objects equally clear from various distance. Muscle Ciliary
muscles.

Question .14. Answer briefly :


(i) What is a lacrimal gland ?
(ii) In what two ways is yellow spot different from blind spot ?
(iii) Name an old age eye defect. Why is it caused ?
(iv) Mention the characteristics of the image that falls on the retina of the eye.
(v) Name the photoreceptors found in retina of eye.
Answer :
(i) Present on the lateral aspects of eye. They secrete tears which contains lysozymes which kills bacteria.
(ii)

Yellow spot

Blind spot

1. Area of best vision.

1. Area of no vision.

2. Contains maximum cone cells.

2. Contains no rod and cones.

(iii) Presbyopia.
(iv) Real, inverted and diminished.
(v) Rod and cone cells.

Question .15. Draw a labelled diagram of the inner ear. Name the parts of the inner
ear that is responsible for static balance in human beings.
Answer :

Fig.
The sensory cells in ear which are located in maculae of vestibule are responsible for static balance in human beings.

Question .16. The diagram given below represent the parts of the human ear :

Fig.

(i) Name the parts labelled 1 to 8.


(ii) What is the function of the parts marked 2 and 7 ?
(iii) Why is it harmful to use a pin or any sharp object to remove the wax from the ear ?
(iv) Give the function of ear wax.
Answer :
(i) 1 Stapes, 2 Semicircular canal, 3 Auditory nerve, 4 Cochlea,
5 Eustachian tube, 6 Ear drum or Tympanum, 7 Malleus, 8 Pinna.
(ii) Function of Part 2 It brings about the dynamic equilibrium which help to maintain body position in response to
movement.
Function of Part 7 The hammer or Malleus is fastened to the ear drum whose vibrations are transmitted through
these three bones (malleus, incus and stapes) to the membrane across the oval window. These bones act as a lever
and increases the magnitude or power of vibrations.
(iii) As the pin or any sharp object may injure the ear drum. Hence it is harmful to use pin or any sharp object and
must be avoided.
(iv) Ear vax has insect repellent properties and prevent their entry in the auditory canal. It also check the entry of dust
particles in the ear. Thus it lubricates and protects the ear drum.

Question .17. The given diagram refers to the ear of a mammal :

Fig.

I. Label the parts 1 to 10 which the guidelines point.


II. Which structure :
(i) Converts sound waves into mechanical vibrations ?
(ii) Converts vibrations into nerve impulses ?
(iii) Responds to change in position ?
(iv) Transmits impulses to the brain ?
(v) Equalizes atmospheric pressure and pressure in the ear ?

Answer :
I. 1 Cochlea, 2 Auditory nerve, 3 Semicircular canals, 4 Ear ossicles,
5 Auditory canal, 6 Pinna, 7 Ear drum, 8 Oval window or fenestra ovalis,
9 Eustachian tube, 10 Malleus or hammer.
II. (i) Ear drum.
(ii) Cochlea.
(iii) Semicircular canal.
(iv) Auditory nerve.
(v) Eustachian tube.

Question .18. Given below is the diagram of a part of the human ear :

Fig.

Study the same and then answer the questions that follow :
(i) Give the biological term for Malleus, Incus and Stapes.
(ii) Name the parts labelled A, B and C in the diagram.
(iii) State the functions of the parts labelled A and B.
(iv) Name the audio receptor region present in the part labelled A.
Answer :
(i) Ossicles.
(ii) (A) Cochlea,
(B) Semi-circular canals,
(C) Vestibular apparatus.
(iii) (A) Hearing,
(B) Dynamic balancing.
(iv) Organ of Corti.

Biology
Q. 1. Structure that forms spindle fibres
Q. 2. Basic unit of heredity
Q. 3. No. of nucleosome in 1 dna.
Q. 4. Structure formed after graafian follicle.
Q. 5. Study of population

Q. 6. Difference between birth rate and growth rate.


Q. 7. Loss of water in the form of water droplets from leaves.
Q. 8. Father of genetics
Q. 9. Who coined the name cell
Q. 10. Organelle that produces ribosome.
Q. 11. Power house of the cell.
Q. 12. Structure that provides nourishment to the developing embryo.
Q. 13. Abbreviate the following:
1.

Rubp

2.

PGA

3.

W.H.O

4.

NADP

5.

RNA

Q. 14.State true and false-:


1.

No of autosomes in human beings are 23

2.

outer layer of plant cell is cell membrane

3.

dark reaction is light dependent reaction

4.

genetic constituent of organism is genotype

5.

no of genes of tiger is 47

Biology
Q. 1. Describe how cells are structural and functional unit of life?
Q. 2. Which is the smallest cells known so far?
Q. 3. What is cell membrane?
Q. 4. What is Cytoplasm?
Q. 5. Write the difference between plant and animal cell.
Q. 6. Write the difference between cell wall and cell membrane.
Q. 7. Why new cells are needed to be produced?
Q. 8. What are the stages of cell cycle?
Q. 9. Which stage is the longest stage?
Q. 10. What produces spindle fibers in a cell of animals?
Q. 11. What initiates cell division?
Q. 12. Name the phases of cell cycle?
Q. 13. Define Mitosis?
Q. 14. Describe a cell during-

1. Prophase
2. Metaphase
3. Anaphase
4. Telophase.
Q. 15. What is Cytokinesis?
Q. 16. Write the difference between cytokinesis in plant and animal cell.
Q. 17. What is the significance of mitosis?
Q. 18. What is the significance of Meiosis?
Q. 19. Write the difference between Meiosis and Mitosis.
Q. 20. Define cell cycle.
Q. 21. Define reductional division.
Q. 22. What is DNA?
Q. 23. What is DNA finger printing?

Q. 24. What is DNA composed of?


Q. 25. What is Nucleotide?
Q. 26. What are Histones?
Q. 27. What is Centromere?
Q. 28. On the basis of centromere cell can be classified to how many groups?

Biology - Nervous System (Solved)


Question .1. Name the following :
(i) Transfers impulses from inner ear to brain.
(ii) The part of brain which is concerned with memory.
(iii) The protective covering of the brain.
(iv) The junction between two nerve cells.
(v) The fluid that is present inside and outside the brain.
(vi) Protective covering of the brain and spinal cord.
Answer :
(i) Auditory nerve.
(ii) Cerebrum.
(iii) Meninges.
(iv) Synapse.
(v) Cerebrospinal fluid.
(vi) Meninges.

Question .2. Write true or false. Insert a word if false.


(i) A reflex action is a spontaneous response to a stimulus.
Answer :
(i) True.

Question .3. Define Synapses.


Answer :
Synapse is the point of contact between terminal branches of axon of one neuron with dendrites of other neuron.

Question .4. Choose :


The dorsal root ganglion of the spinal cord contains cell bodies of (motor,
sensory, intermediate) neurons.
Answer :
Sensory.

Question .5. Write the structural and functional activity of :


(i) Cerebellum.
(ii) Myelin sheath.
(iii) Meninges.
Answer :
Solution:
(i) Controls and contributes balancing organs and muscles.
(ii) Insulation.
(iii) Protection.

Question .6. Write the function of Medulla oblongata.


Answer :
Controls heart beat, respiration and blood pressure.

Question .7.Write in logical sequence :


(i) Dorsal root ganglion, receptor, effector, ventral root ganglion, associated neuron.

Answer :
(i) Receptor, dorsal root ganglion, associated neuron, ventral root ganglion, effector.

Question .8. Differentiate between :


(i) Medulla oblongata and Cerebellum.
(ii) Cerebrum and spinal cord.
(iii) Cerebrum and Cerebellum.
(iv) Sensory and motor neuron.
(v) Sensory and motor nerve.
Answer :
(i)

Medulla oblongata

Cerebellum

Concerned with respiratory movements,


heart beat and dilation of blood vessels.

Regulates and coordinates muscular


contraction and body balance.

(ii)

Cerebrum

It contains cell bodies of neurons outside


and axons of the neurons inside.

Spinal cord

It contains axons outside and cell bodies


inside

(iii)

Cerebrum

Seat of intelligence, memory and control of


voluntary activities.

Cerebellum

Coordinates muscular activities and


maintains body balance.

(iv)

Sensory neuron

It transmits stimulus from the receptor organ


to the CNS.

Motor neuron

It transmits stimulus from the CNS to the


effector organ.

(v)

Sensory nerve

Dendrites longer than axon and made up of


unipolar neuron.

Motor nerve

Axon longer than dendrites and made up of


multipolar neuron.

Question .9. Write the category and the odd one out :
(i) Coughing, sneezing, blinking, eating.
(ii) Corpus luteum, corpus callosum, pons, cerebellum.
(iii) Pleura, pericardium, meninges, spinal cord.

(iv) Pons, cerebellum, medulla oblongata, cerebrum.


Answer :
(i) Simple reflex; eating.
(ii) Parts of brain; corpus luteum.
(iii) Protective covering; spinal cord.
(iv) Parts of hind brain; cerebrum.

Question .10. Answer briefly :


(i) What is meant by reflex action ?
(ii) State simple, conditioned reflexes or none.
Sneezing, blushing, contraction of pupil, lifting up a book, knitting without
looking, sudden application of brakes without thinking.
Answer :
(i) Reflex Action Reflex Action is the immediate, autonomic nerve mediated response to a stimulus produced at the
unconscious level without the involvement of brain for thinking.
(ii) Sneezing simple ; Blushing simple; Contraction of pupil simple; lifting up a book neither of two; Knitting
without looking conditioned; Sudden application of brakes without thinking conditioned.

Question .11. Draw a labelled diagram of a myelinated neuron.


Answer :

fig.

Question . 12. The following diagram is that of a human brain. Guidelines 1 to 5


indicate different parts of the surface of the brain and these are as follows:

Fig.

1. Frontal lobe of cerebrum.


2. Temporal lobe of cerebrum.
3. Occipital lobe of cerebrum.
4. Cerebellum.
5. Medulla oblongata.

I (i) Visual sensation can be affected.


(ii) An individual can lose the balance of the body and coordination of muscular activities.
II (1) It is concerned with the thinking.
(2) Memory and intelligence.
(5) Medulla oblongata controls heart beat, respiration and blood pressure.

Question .13. The following diagram represents the human brain as seen in an external view.
Study the same and then answer the question that follow :

Fig.

(i) Name the parts labelled 1, 2, 3 and 4.


(ii) Mention the difference in the arrangement of the nerve cells in the parts marked 1 and 4.
(iii) What is the main function of the parts marked 3 and 4.
(iv) Name the sheet of nerve fibres that connect the two halves of the part labelled 1.
(v) What is the structural and functional unit of the nervous system ?
(vi) Name the fluid that surrounds the brain. State its function.
Answer :
(i) 1. Cerebrum. 2. Cerebellum. 3. Medulla oblongata. 4. Spinal cord.
(ii) 1 cytons outside, axons inside. 2 axons outside, cytons outside.
(iii) 3 controls involuntary reflexes like respiration and circulation.
4 mediates reflex action.
(iv) Corpus callosum.
(v) Neurons/Nerve cells.
(vi) Cerebrospinal fluid. Protects the brain from shocks.

Biology - Photosynthesis (Solved)


Question .1. Name the following :
(i) The structure where photosynthesis takes place.
(ii) The part of the chloroplast where the dark reaction of photosynthesis takes place.
(iii) Plants that prepare their own food from basic raw materials.

(iv) The energy currency of the cell.


(v) The process by which green plants prepare their own food.
(vi) The product of photosynthesis.
(vii) A plant that does not perform photosynthesis.
(viii) A gas released by green plants during photosynthesis.
(ix) The raw materials needed for photosynthesis.
(x) The site of light reaction.
(xi) The substance from which oxygen is evolved during photosynthesis.
Answer :
(i) Thylakoid/grana.
(ii) Stroma.
(iii) Autotrophs.
(iv) ATP.
(v) Photosynthesis.
(vi) Glucose, water and oxygen.
(vii) Mushroom/Fungus.
(viii) Oxygen.
(ix) Carbon dioxide and water.
(x) Grana of chloroplast.
(xi) Water.

Question .2. State true or false :


(i) Photosynthesis occurs in all the cells of a plant.
(ii) Stomata is stimulated by light.
(iii) Grana helps in diffusion of gases.
(iv) Photosynthesis results in the loss of dry weight of the plant.
(v) The unit of light absorbed by the chlorophyll during photosynthesis is the proton.
(vi) Photosynthesis stops to occur at a temperature above 35 C.
(vii) Plants can be destarched by keeping in dark for 48 hours.

Answer :
(i) F
(ii) T
(iii) F
(iv) F
(v) F
(vi) T
(vii) T.

Question .3. Choose the correct alternative :


(i) A plant is kept in a dark cupboard for about 48 hours before conducting any
experiment on photosynthesis to (remove chlorophyll from leaves, remove starch from
the plant , ensure that no photosynthesis occurs, ensure that leaves are free from
starch).
(ii) The site of light reaction in the cells of a leaf is (grana, cytoplasm, stroma).
(iii) The chemical substance used to test the presence of starch in the cell of a leaf is
(cobalt chloride paper, iodine solution, Benedicts solution).
(iv) The specific function of light energy in the process of photosynthesis is to (reduce
carbon dioxide, synthesise glucose, activate chlorophyll, split water).
(v) If the rate of respiration becomes more than the rate of photosynthesis plants will
(continue to live but will not be able to store food, be killed instantly, grow more
vigorously because more energy will be available, stop growing and gradually die of
starvation).
(vi) Which one of these reaction occurs during photosynthesis ? (carbon dioxide is
reduced and water is oxidized, water is reduced and carbon dioxide is oxidized, carbon
dioxide and water both are oxidized, carbon dioxide and water both are reduced).
Answer :
(i) Ensure that leaves are free from starch.
(ii) Grana.
(iii) Iodine solution.
(iv) Activate chlorophyll.
(v) Stop growing and gradually die of starvation.
(vi) Carbon dioxide is reduced and water is oxidized.

Question .4. Give exact location and function of :


(i) Stoma,

(ii) Thylakoids,
(iii) Guard cell,
(iii) Grana.
Answer :
(i) Stoma : Location Epidermis of leaves. Function Exchange of gases for photosynthesis/respiration/loss of
water as water vapour during transpiration.
(ii) Thylakoids : Location Granum of chloroplast. Function Help in traping sun-light (photosynthesis).
(iii) Guard cell: Location Around stomata mostly under the surface of a dorsiventral leaf. Function Allow diffusion
of gases.
(iv) Grana: Location Inside chloroplast. Function Help in trapping sunlight.

Question .5. (i) Explain the following terms: Photolysis.


(ii) What is meant by photolysis of water?
Answer:
(i) Splitting of water by light in photosynthesis.
(ii) Splitting of water into hydrogen and hydroxyl ion in presence of sunlight.

Question .6. Answer the following:


(i) Name the two phases of photosynthesis.
(ii) What is the role of light in this process?
(iii) Describe any three adaptation in a green leaf for photosynthesis.
(iv) Describe an experiment to show that light is necessary for photosynthesis.
Answer :
(i) 1. Light reaction (Photolysis of water).
2. Dark reaction (CO2reduction).
(ii) Light has energy giving photons which activate and ionize chlorophyll to release electrons. The electrons (split)
ionize water molecules. This process is called photolysis.

The H+ reduces CO2 to form crbohydrates.


(iii) 1. Large surface area : The surface area of the leaves is very large due to which maximum light energy is
absorbed from the sunlight.

2. Leaf arrangement : The arrangement of leaves on the stem are in such a way that maximum surface area is
exposed to sunlight.
3. Chloroplasts : Chloroplasts containing chlorophyll are concentrated in the upper surface of the leaf which helps in
trapping maximum radiant energy from the sunlight quickly.
(iv) Aim : To demonstrate that light is necessary for photosynthesis.
Requirements : A destarched potted plant, Gangons light screen.
Procedure :
1. Gangons light screen is fixed to one of the leaves of the potted plant (destchared) as shown in figure below.
2. The plant is then fixed in light at least for 6 hours.
3. The starch test is performed.
Fig. Ans. 20 (iv)/page 38 [evergreen]
Observation : We observe that the portion of screen that allows the light to fall on leaf gives positive starch test and
the portion covered with light screen gives negative starch test.
Inference : Light is necessary for photosynthesis.

Question .7. Define :


(i) Photophosphorylation.
Answer :
(i) Conversion of low grade energy ADP into high potential chemical energy ATP is called photophosphorylation.

Question .8. Re-write the correct form of statement by inserting a suitable


word/words at right place. Do not delete any word in the statement :
(i) Destarching a plant means removing the starch from the plant.
(ii) The splitting of water molecules into hydrogen and hydroxyl ions is termed
photolysis.
Answer :
(i) Destarching the plant means removing the starch from the leaves of plant.
(ii) The splitting of water molecules into hydrogen and hydroxyl ions by light is termed photolysis.

Question .9. Re-write the terms in correct order in a logical sequence :


(i) Water molecules, oxygen, grana, hydrogen and hydroxyl ions, photons.
Answer :
(i) Photons, grana, water molecules, hydrogen and hydroxyl ions, oxygen.

Question .10. Complete the following process to show how the oxygen in the air
reaches a mesophyl cell of the leaf.
Oxygen in air Mesophyl cell.
Answer :
Oxygen in air stoma substomatal space Mesophyl cell.

Question .11. Fill in the blanks : Chloroplasts and _______.


Answer :
Photosynthesis.

Question .12. Distinguish between the following :


(i) Light reaction and Dark reaction.
(ii) Autotrophs and Heterotrophs.
(iii) Stroma and Grana.
(iv) Photosynthesis and Respiration.
(v) Chloroplast and chlorophyll.
Answer :
(i)

Light Reaction

Dark Reaction

1. Presence of light is must.

1. It does not require light.

2. It occurs in the grana of


chloroplast.

2. It occurs in the stroma of


chloroplast.

3. Its product are ATP and


NADPH2.

3. Its product are organic


compounds.

(ii)

Autotrophs

Heterotrophs

1. They can produce their own


food.

1. They can prepare their own


food.

2. They contain chlorophyll.

2. They do not contain


chlorophyll.

(iii)

Stroma of Chloroplast

Grana of Chloroplast

1. Here dark reaction takes


place.

1. Here light reaction takes


place.

2. It is a non-green granular
matrix.

2. It is a green flattened sac-like


structure.

(iv)

Photosynthesis

Respiration

1. It is an anabolic process.

1. It is a catabolic process.

2. It takes place only in


chlorophyll bearing cells.

2. It takes place in all cells.

3. Oxygen and glucose released


as end-products.

3. Carbon dioxide and water


released as end-product.

4. It takes place only in presence


of light.

4. Light is not required.

(v)

Chloroplast

Chlorophyll

1. It is an organelle of the cell.

1. It is the green pigment in


chloroplast.

2. It is living.

2. It is non-living.

Question .13. Enumerate the steps involved in testing a green leaf for the presence of
starch.
Answer :
Solution:
Step I The leaf is dipped in boiling water for a minute to kill the cells.
Step II The leaf is boiled in methylated spirit to remove chlorophyll.
Step III The leaf is put in normal water to make it soft.
Step IV Iodine solution is put which turns starch blue black.

Question .14. Write the full form of NADP and ATP.


Answer :
Solution:
NADP Nicotinamide adenine dinucleotide phosphate.
ATP Adenosine tri phosphate.

Question .15. A healthy Croton plant bearing variegated leaves was kept in a dark
cupboard to destarch it, after which it was placed in sunlight for few hours. One of the
leaves was then plucked and an outline of the leaf marking the green and non-green
regions was drawn. The leaf was then tested for starch. Using the above information,
answer the following questions:
(i) State the aim of the above experiment.
(ii) Name the chemical used for testing the presence of starch.
(iii) Why is the leaf boiled in water and alcohol before testing for the presence of starch ?
(iv) What change is seen on the leaf after the starch test ?
(v) Give the chemical equation to represent the process of syarch formation in plants.
Answer :
(i) To prove that chlorophyll is necessary for photosynthesis.
(ii) Iodine solution.
(iii) Cells are killed by boiling and chlorophyll is dissolved in alcohol.

(iv) The green parts turn blue black and non-green parts turn brown.
(v)

Question .16. A candidate in order to study the importance of certain factors in


photosynthesis, took a potted plant and kept in the dark for over 24 hours. Then in the
early hours of the morning she covered one of the leaves with black paper in the centre
only. She placed the potted plant in the sunlight for a few hours and then tested the leaf
which was covered with black paper for starch.
(i) What aspect of photosynthesis was being investigated ?
(ii) Is there any control in this experiment ? If so state the same.
(iii) Why was the plant kept in the dark before the experiment ?
(iv) Describe step by step how the candidate proceeded to test the leaf for the presence
of starch ?
Answer :
(i) To show that sunlight is necessary for photosynthesis.
(ii) Yes, the uncovered portion of the experimental leaf is the control.
(iii) To destarch the leaf.
(iv) 1. The leaf is boiled in alcohol to remove chlorophyll.
2. The leaf is washed in water to make it soft.
3. The iodine solution is added to the leaf.
The uncovered portion shows blue-black colour and the portion covered shows brown colour. This indicate that
sunlight is necessary for photosynthesis.

Question .17. Give biological reasons :


(i) A tiger owes its existence to chlorophyll.
(ii) Oxygen given out during photosynthesis comes from water.
Answer :
(i) Green plants synthesizes food by photosynthesis using chlorophyll. Tiger feed on animal which feed on green
plants. Thus they obtain their food indirectly from green plants. That is existence of tiger depends upon chlorophyll.
(ii) Due to photolysis of water oxygen is released during photosynthesis.

Question .18. (i) Fill in the blank in the following equations for two chemical reactions :

1. ______ + 12H2O C H O + ________ + ______.


2. _______ + 6O2 6 ______ + 6 _______ + Energy.
(ii) Name the two process represented by the above two reactions.
(iii) Which one of these two reactions is the support of all life on earth.
Answer :
(i)

(ii) Photosynthesis and respiration.


(iii) Photosynthesis.

Q.19. Draw a neat labeled diagram of the experimental set up to show that green
plants give out oxygen during photosynthesis.
Answer:

fig.

ICSE Computer Applications 2009


(Two Hours)

Attempt all questions from Section A and any four four questions from Section B. The
intended marks for each question are given in brackets []
Section A
Question 1:
(a) Why is a class called a factory of objects? [2]
Ans. A class is known as a factory of objects because objects are instantiated from
classes. Each object gets a copy of the instance variables present in the class. It is
like a factory producing objects.
(b) State the difference between a boolean literal and a character literal. [2]
Ans. i) A boolean literal can store one of two values true and false. A character
literal can store a single Unicode character.
ii) The memory required by a boolean literal depends on the implementation. The
memory required by a character literal is 2 bytes.
(c) What is the use and syntax of a ternary operator? [2]
Ans. The ternary operator is a decision making operator which can be used to
replace certain if else statement.
Syntax: condition ? expression1: expression2
(d) Write one word answer for the following: [2]
i) A method that converts a string to a primitive integer data type
ii) The default initial value of a boolean variable data type
Ans. i) Integer.parseInt()
ii) false
(e) State one similarity and one difference between while and for loop. [2]
Ans. A while loop contains only a condition while a for loop contains initialization,
condition and iteration.
Question 2:
(a) Write the function prototype for the function sum that takes an integer
variable (x) as its argument and returns a value of float data type. [2]
Ans.
1

public float sum(int x)

(b) What is the use of the keyword this? [2]


Ans. this refers to the object on which the method has been invoked. If an instance
variable and a local variable in a method have the same name, the local variable
hides the instance variable. The keyword this can be used to access the instance
variable as shown in the example below:
1

public class thisKeywordExample {

2
3

int a; // varaible 1

4
5
6
7
8

public void method() {


int a; // variable 2
a = 4; // varaible 1 will be changed
a = 3; // varaible 2 will be changed

9
10
11

}
}

(c) Why is a class known as a composite data type? [2]


Ans. A class is composed of instance variables which are of different data types.
hence, a class can be viewed as a composite data type which is composed of
primitive and other composite data types.
(d) Name the keyword that: [2]
i) is used for allocating memory to an array
ii) causes the control to transfer back to the method call
Ans. i) new
ii) return
(e) Differentiate between pure and impure functions. [2]
Ans. i) A pure function does not change the state of the object whereas an impure
function changes the state of the object by modifying instance variables.
ii) get functions are examples of pure functions and set functions are examples if impure
functions.
Question 3:
(a) Write an expression for
[2]
Ans. (Math.pow(a+b),n)/(Math.sqrt(3)+b)
(b) The following is a segment of a program.
1
2
3
4
5
6

x = 1;
if(n >
{
x =
y =
}

y = 1;
0)
x + 1;
y - 1;

What will be the value of x and y, if n assumes a value (i) 1 (ii) 0? [2]
Ans. i) 1 > 0 is true, so if block will be executed.
x=x+1=1+1=2
y=y1=11=0
ii) 0 > 0 is false, so if block will not be executed and therefore, the values of x and y
wont change.
x=1
y=1
(c) Analyze the following program segment and determine how many times
the body of loop will be executed (show the working). [2]
1
2
3
4
5
6

x = 5; y = 50;
while(x<=y)
{
y=y/x;
System.out.println(y);
}

Ans.
Iteration 1 :
5 <= 50 - true
printed
Iteration 2 :
5 <= 10 - true
2
printed
3
Iteration 3 :
5 <= 2 - false
1

y = y / x = 50 / 5 = 10

10 will be

y = y / x = 10 / 5 = 2

2 will be

The loop will be executed two times.


(d) When there are multiple definitions with the same function name, what
makes them different from each other? [2]
Ans. The function prototype make multiple definitions of a function different from each
other. Either the number, type or order or arguments should be different for the
functions having identical names.
Q3. (e) Given that int x[][] = { {2,4,6}, {3,5,7} };
What will be the value of x[1][0] and x[0][2] ? [2]
Ans. We can write the array as

As shown in the figure x[1][0] is 3 and x[0][2] is 6.


(f) Give the output of the following code segment when (i) opn = b (ii) opn =
x (iii) opn = a. [3]
1
2
3
4
5
6
7
8
9
10
11
12
13

switch(opn)
{
case 'a':
System.out.println("Platform Independent");
break;
case 'b':
System.out.println("Object Oriented");
case 'c':
System.out.println("Robust and Secure");
break;
default:
System.out.println("Wrong Input");
}

Ans. i) Output will be


1
2

Object Oriented
Robust and Secure

As there is no break statement for case b, statements in case c will also be printed
when opn = b.
ii) Output will be
1

Wrong Input

As x doesnt match with either a, b or c, the default statement will be executed.


iii) Output will be
1

Platform Independent

(g) Consider the following code and answer the questions that follow: [4]
1
2
3

class academic
{
int x, y;

4
5
6

void access()
{

7
8
9
10

academic student = new academic();


System.out.println("Object created");
}
}

int a, b;

i) What is the object name of class academic?


ii) Name the class variables used in the program?
iii) Write the local variables used in the program.
iv) Give the type of function used and its name.
Ans. i) student
ii) x and y
iii) a and b
iv) Type: Non Static
Name: access
Q3 (h) Convert the following segment into an equivalent do loop. [3]
1
2
3

int x,c;
for(x=10,c=20;c>10;c=c-2)
x++;

Ans.
1
2
3
4
5
6
7

int x, c;
x = 10;
c = 20;
do {
x++;
c = c - 2;
} while (c > 10);

Section B

Question 4
An electronics shop has announced the following seasonal discounts on the purchase of
certain items.

Purchase Amount in Rs.

Discount on Laptop

Discount on Desktop PC

0 25000

0.0%

5.0%

25001 57000

5.0%

7.6%

57001 100000

7.5%

10.0%

More than 100000

10.0%

15.0%

Write a program based on the above criteria to input name, address, amount of
purchase and type of purchase (L for Laptop and D for Desktop) by a customer.
Compute and print the net amount to be paid by a customer along with his name and
address. [15]
(Hint: discount = (discount rate/100)* amount of purchase
Net amount = amount of purchase discount)
Ans.
1

import java.util.Scanner;

2
3

public class Electronics {

4
5
6
7
8
9
10
11
12
13
14

public static void main(String[] args) {


Scanner scanner = new Scanner(System.in);
System.out.print("Enter name: ");
String name = scanner.nextLine();
System.out.print("Enter address: ");
String address = scanner.nextLine();
System.out.print("Enter type of purchase: ");
String type = scanner.nextLine();
System.out.print("Enter amount of purchase: ");
int amount = scanner.nextInt();

15

double discountRate = 0.0;

16

if (type.equals("L")) {

17
18
19
20
21
22
23

if (amount <= 25000) {


discountRate = 0;
} else if (amount >= 25001 && amount <= 57000) {
discountRate = 5.0;
} else if (amount >= 57001 && amount <= 100000) {
discountRate = 7.5;
} else if (amount > 100000) {

24
25
26

discountRate = 10.0;
}
} else if (type.equals("D")) {

27
28
29
30
31
32
33
34
35
36
37

double discount = (discountRate / 100) * amount;

38

double netAmount = amount - discount;

39

System.out.println("Name: " + name);

40

System.out.println("Address: " + address);

if (amount <= 25000) {


discountRate = 5.0;
} else if (amount >= 25001 && amount <= 57000) {
discountRate = 7.6;
} else if (amount >= 57001 && amount <= 100000) {
discountRate = 10.0;
} else if (amount > 100000) {
discountRate = 15.0;
}
}

41
42
43
44

System.out.println("Net Amount: " + netAmount);


}
}

Sample Output:
1
2
3
4
5
6
7

Enter name: Ram


Enter address: 12-5/6
Enter type of purchase: L
Enter amount of purchase: 200000
Name: Ram
Address: 12-5/6
Net Amount: 180000.0

Question 5:
Write a program to generate a triangle or an inverted triangle till n terms based upon
the users choice of triangle to be displayed. [15]
Example 1
Input: Type 1 for a triangle and
type 2 for an inverted triangle
1
Enter the number of terms
5
Output:
1
22
333

4444
55555
Example 2:
Input: Type 1 for a triangle and
type 2 for an inverted triangle
2
Enter the number of terms
6
Output:
666666
55555
4444
333
22
1

Ans.
1

import java.util.Scanner;

2
3

public class Traingle {

4
5

public static void main(String[] args) {

Scanner scanner = new Scanner(System.in);


System.out.print("Type 1 for a triangle and type 2 for an inverted
7
triangle: ");
8
int choice = scanner.nextInt();
9
System.out.print("Enter number of terms: ");
10
int n = scanner.nextInt();
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

if (choice == 1) {
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= i; j++) {
System.out.print(i + " ");
}
System.out.println();
}
} else if (choice == 2) {
for (int i = n; i >= 1; i--) {
for (int j = 1; j <= i; j++) {
System.out.print(i + " ");
}
System.out.println();
}
}
}

27
28

Question 6:
Write a program to input a sentence and print the number of characters found in the
longest word of the given sentence.
For example is S = India is my country then the output should be 7. [15]
Ans.
1

import java.util.Scanner;

2
3

public class LongestWord {

4
5

public static void main(String[] args) {

6
7
8
9

Scanner scanner = new Scanner(System.in);


System.out.print("Enter a sentence: ");
String sentence = scanner.nextLine();
int longest = 0;

10

int currentWordLength = 0;

11

for (int i = 0; i < sentence.length(); i++) {

12

char ch = sentence.charAt(i);

13

if (ch == ' ') {

14
15
16
17
18
19
20
21
22
23
24

if (currentWordLength > longest) {


longest = currentWordLength;
}
currentWordLength = 0;
} else {
currentWordLength++;
}
}
if (currentWordLength > longest) {
longest = currentWordLength;
}

System.out.println("The longest word has " + longest + "


characters");
26
}
27
}
25

Question 7:
Write a class to overload a function num_calc() as follows: [15]
i) void num_calc(int num, char ch) with one integer argument and one character
argument, computes the square of integer argument if choice ch is s otherwise finds
its cube.

ii) void num_calc(int a, int b, char ch) with two integer arguments and one character
argument. It computes the product of integer arguments if ch is p else adds the
integers.
iii) void num_calc(String s1, String s2) with two string arguments, which prints whether
the strings are equal or not.
Ans.
1

public class Overloading {

2
3

public void num_calc(int num, char ch) {

if (ch == 's') {

double square = Math.pow(num, 2);

System.out.println("Square is " + square);

} else {

double cube = Math.pow(num, 3);

9
10
11
12
13

System.out.println("Cube is " + cube);


}
}
public void num_calc(int a, int b, char ch) {

14

if (ch == 'p') {

15

int product = a * b;

16

System.out.println("Product is " + product);

17

} else {

18

int sum = a + b;

19
20
21
22
23

System.out.println("Sum is " + sum);


}
}
public void num_calc(String s1, String s2) {

24
25
26
27
28
29
30

if (s1.equals(s2)) {
System.out.println("Strings are same");
} else {
System.out.println("Strings are different");
}
}
}

Question 8
Write a menu driven program to access a number from the user and check whether it is
a BUZZ number or to accept any two numbers and to print the GCD of them. [15]
a) A BUZZ number is the number which either ends with 7 is is divisible by 7.
b) GCD (Greatest Common Divisor) of two integers is calculated by continued division
method. Divide the larger number by the smaller; the remainder then divides the

previous divisor. The process is repeated till the remainder is zero. The divisor then
results the GCD.
Ans.
1

import java.util.Scanner;

2
3

public class Menu {

4
5

public boolean isBuzzNumber(int num) {

int lastDigit = num % 10;

int remainder = num % 7;

if (lastDigit == 7 || remainder == 0) {

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

return true;
} else {
return false;
}
}
public int gcd(int a, int b) {
int dividend, divisor;
if (a > b) {
dividend = a;
divisor = b;
} else {
dividend = b;
divisor = a;
}
int gcd;
while (true) {
int remainder = dividend % divisor;
if (remainder == 0) {
gcd = divisor;
break;
}
dividend = divisor;
divisor = remainder;
}
return gcd;
}
public void menu() {

38
39
40
41
42

Scanner scanner = new Scanner(System.in);


System.out.println("1. Buzz Number");
System.out.println("2. GCD");
System.out.print("Enter your choice: ");

43
44
45

if (choice == 1) {
System.out.print("Enter a number: ");

int choice = scanner.nextInt();

int num = scanner.nextInt();

46
47
48
49
50
51
52
53

if (isBuzzNumber(num)) {
System.out.println(num + " is a buzz number");
} else {
System.out.println(num + " is not a buzz number");
}
} else if (choice == 2) {
System.out.print("Enter two numbers: ");
int num1 = scanner.nextInt();

54

int num2 = scanner.nextInt();

55

int gcd = gcd(num1, num2);

56

System.out.println("GCD: " + gcd);

57
58
59
60
61

} else {
System.out.println("Invalid Choice");
}
}

62

public static void main(String[] args) {

63
64
65
66
67

Menu menu = new Menu();


menu.menu();
}
}

Sample Output 1:
1
2
3
4
5

1. Buzz Number
2. GCD
Enter your choice: 1
Enter a number: 49
49 is a buzz number

Sample Output 2:
1
2
3
4
5

1.
2.
Enter
Enter

Buzz Number
GCD
your choice: 2
two numbers: 49 77
GCD: 7

Question 9
The annual examination results of 50 students in a class is tabulated as follows.

Roll no.

Subject A

Subject B

Subject C

Write a program to read the data, calculate and display the following:
a) Average mark obtained by each student.
b) Print the roll number and average marks of the students whose average mark is

above 80.
c) Print the roll number and average marks of the students whose average mark is
below 40.
Ans.
1

import java.util.Scanner;

2
3

public class StudentMarks {

4
5
6

public static void main(String[] args) {


Scanner scanner = new Scanner(System.in);

int[] rno = new int[50];

int[] subjectA = new int[50];

int[] subjectB = new int[50];

10

int[] subjectC = new int[50];

11

double[] average = new double[50];

12
13
14
15
16
17
18
19
20
21
22
23
24

for (int i = 0; i < 50; i++) {


System.out.print("Enter Roll No: ");
rno[i] = scanner.nextInt();
System.out.print("Enter marks in subject
subjectA[i] = scanner.nextInt();
System.out.print("Enter marks in subject
subjectB[i] = scanner.nextInt();
System.out.print("Enter marks in subject
subjectC[i] = scanner.nextInt();
average[i] = (subjectA[i] + subjectB[i] +

25
26
27
28
29
30
31
32
33
34
35

A: ");
B: ");
C: ");
subjectC[i]) /3.0;

}
System.out.println("Roll No - Average");
for (int i = 0; i < 50; i++) {
System.out.println(rno[i] + " - " + average[i]);
}
System.out.println("Students with average greater than 80");
for (int i = 0; i < 50; i++) {
if (average[i] > 80) {
System.out.println(rno[i] + " - " + average[i]);
}
}
System.out.println("Students with average less than 40");
for (int i = 0; i < 50; i++) {
if (average[i] < 40) {

36
37
38
39
40

Sample Output:

System.out.println(rno[i] + " - " + average[i]);


}
}
}
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

run:
Enter Roll No: 1
Enter marks in subject A: 100
Enter marks in subject B: 100
Enter marks in subject C: 97
Enter Roll No: 2
Enter marks in subject A: 10
Enter marks in subject B: 10
Enter marks in subject C: 10
Enter Roll No: 3
Enter marks in subject A: 50
Enter marks in subject B: 50
Enter marks in subject C: 50
...
Roll No - Average
1 - 99.0
2 - 10.0
3 - 50.0
...
Students with average greater than 80
1 - 99.0
Students with average less than 40
2 - 10.0
...

COMPUTER APPLICATIONS
(Theory)
Two Hours
Answers to this Paper must be written on the paper provided separately.
You will not be allowed to write during the first 15 minutes.
This time is to be spent in reading the Question Paper.
The time given at the head of the Paper is the time allowed for writing the answers.
This paper is divided into two Sections.
Attempt all questions from Section A and any four questions from Section B.
The intended marks for questions or parts of questions are given in bracket [ ]
SECTION A (40 Marks)
Question 1.
(a) Define the term Byte Code. [2]
Ans. The Java compiler compiles the source programs into an intermediate code called
the Java Byte Code which is interpreted by the Java Virtual Machine (JVM)
(b) What do you understand by type conversion? [2]
Ans. Type conversion or casting is the conversion of the data type of a literal from one
type to another. There are tow types of types of casting implicit casting and explicit
casting.
(c) Name two jump statements and their use. [2]
Ans. break and continue are the two jump statements in Java. break is used to force
early termination of a loop. continue is used to move to the next iteration of the loop
while skipping the remaining code in the current iteration.
(d) What is Exception ? Name two Exception Handling Blocks. [2]
Ans. An Exception is an error which occurs during the execution of a program. The
exception handling blocks are try, catch and finally.
(e) Write two advantages of using functions in a program. [2]
Ans. i) Function make code reusable.
ii) Functions improve modularity and facilitate easy debugging.
Question 2.
(a) State the purpose and return data type of the following String functions:
[2]
(i) indexOf ( )

(ii) compareTo ( )
Ans. i) indexOf() returns the index of the character or String passed as the parameter in
the string on which is invoked.
Return type is int.
ii) compareTo() lexicographically compares the String passed as an argument to the
String on which it is invoked.
Return type is int.
(b) What is the result stored in x, after evaluating the following expression [2]
1

int x = 5;

x = x++ * 2 + 3 * x;

Ans. x = 5 * 2 + 3 * -6
x = 10 18
x = -8
(c) Differentiate between static and non-static data members. [2]
Ans. i) static variables belong to the class and all object share a single instance of the
static variables. Non static variables belong to the objects. Each object has a copy of
these members.
ii) Static functions can access only static data members. Non static function can access
both static and non-static data members.
(d) Write the difference between length and length () functions. [2]
Ans. length is a property of an array which gives the size of the array. length () is a
function of the String class which returns the size of the String.
(e) Differentiate between private and protected visibility modifiers. [2]
Ans. private members are accessible only in the class in which they have been defined.
protected members are accessible in the class in which they have been defined as well
in the sub classes of that class.
Question 3
(a) What do you understand by data abstraction? Explain with an example.[2]
Ans. Abstraction refers to representing the essential features of a system without
considering all the details. Example: When we drive a car, we concentrate on how to
drive it without bothering ourselves on how the engine works and other things.
(b) What will be the output of the following code?
(i) [2]
1

int m=2;

int n=15;

3
4
5
6

for(int i = 1; i<5; i++)


m++; n;
System.out.println("m=" +m);
System.out.println("n="+n);

Ans.
1
2

m=1
n=14

Note that there is no semicolon at the end of the loop. So, it is an empty loop and doest
affect the values of m and n.
(ii) [2]
1

char x = 'A' ; int m;

2
3

m=(x=='a') ? 'A' : a;
System.out.println("m="+m);

Ans.
1

m=a

(c) Analyse the following program segment and determine how many times
tne
loop will be executed and what will be the output of the program segment. [2]
1

int k=1, i=2;

2
3
4

while (++i<6)
k*=i;
System.out.println(k);

Ans. Following are the iterations of the loop


1
2
3
4

3
4
5
6

<
<
<
<

6
6
6
6

-------------

k = 1 * 3 = 3
k = 3 * 4 = 15
k = 12 * 5 = 60
false

The loop will run three times and output is 60


1

(d) Give the prototype of a function check which receives a character ch and
an integer n and returns true or false. [2]
Ans.
1

public boolean function(char ch, int n)

(e) State two features of a constructor. [2]


Ans. i) A constructor has the same name as that of a class.
ii) A constructor does not have any return type.
iii) A constructor is automatically called during object creation.
(f) Write a statement each to perform the following task on a string:
(i) Extract the second last character of a word stored in the variable wd. [2]
Ans.
1

char ch = wd.charAt(wd.length()-2);

(ii) Check if the second character of a string str is in uppercase. [2]


Ans.
1 boolean result = Character.isUpperCase(str.charAt(1));

(g) What will the following functions return when executed? [2]
(j) Math.max(-17, -19)
(ii) Math.ceil(7.8)
Ans. i) -17
ii) 8.0
(h) (i) Why is an object called an instance of a class?
(ii) What is the use of the keyword import? [2]
Ans. i) An object is called an instance of a class because the objects contains a copy of
all the instance variables of the class.
ii) The import keyword is used to import classes from external packages.
SECTION B (60 Marks)
Attempt any four questions from this Section.
The answers in this Section should consist of the Programs in either Blue J environment
or any program environment with Java as the base.
Each program should be written using Variable descriptions/Mnemonic Codes such that
the logic of the program is clearly depicted.
Flow-Charts and Algorithms are not required.
Question 4.
Write a program to perform binary search on a list of integers given below, to search for
an element input by the user. If it is found display the element along with its position,
otherwise display the message Search element not found. [15]
5,7,9,11,15,20,30,45,89,97
Ans.

import java.util.Scanner;

2
3

public class BinarySearch {

4
5
6
7
8
9

public static void main(String[] args) {


int[] array = {5, 7, 9, 11, 15, 20, 30, 45, 89, 97};
Scanner scanner = new Scanner(System.in);
System.out.print("Enter the number you want to search for: ");
int target = scanner.nextInt();

10

int left = 0;

11

int right = array.length - 1;

12

int result = -1;

while (left <= right) {


int middle = (left +
right)
/
2;
if
(array[middle]
==
target) {
13
result = middle;
break;
} else if(array[middle]
> target) {
14
right = middle - 1;
15
} else {
16
left = middle + 1;
17
}
18
}
19
if (result != -1) {
20

System.out.println(target + " found at index " + result);

21
22
23
24
25

} else {
System.out.println("Search element not found");
}
}
}

Sample Output 1:
1
2

Enter the number you want to search for: 7


7 found at index 1

Sample Output 2:
1
2

Enter the number you want to search for: 34


Search element not found

Question 5
Define a class Student described as below: [15]
Data members/instance variables : name,age,m1,m2,m3 (marks in 3 subjects),
maximum, average
Member methods :
(i) A parameterized constructor to initialize the data members.
(ii) To accept the details of a student.
(iii) To compute the average and the maximum out of three marks.

(iv) To display the name, age, marks in three subjects, maximum and average.
Write a main method to create an object of a class and call the above member methods.
Ans.
1

import java.util.Scanner;

2
3

public class Student {

4
5
6

String name;

int m1, m2, m3;

int maximum;

int age;

double average;

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

public Student() {
}
public Student(String
n, int a, int marks1, int marks2, intmarks3, int max, double avg) {
name = n;
age = a;
m1 = marks1;
m2 = marks2;
m3 = marks3;
maximum = max;
average = avg;
}
public void acceptDetails() {
Scanner scanner = new Scanner(System.in);
System.out.print("Enter name: ");
name = scanner.next();
System.out.print("Enter age: ");
age = scanner.nextInt();
System.out.print("Enter marks1: ");
m1 = scanner.nextInt();
System.out.print("Enter marks2: ");
m2 = scanner.nextInt();
System.out.print("Enter marks3: ");
m3 = scanner.nextInt();
}
public void compute() {
average = (m1 + m2 + m3) / 3.0;
maximum = Math.max(m1, (Math.max(m2, m3)));
}
public void display() {

44

System.out.println("Name: " + name);

45

System.out.println("Age: " + age);

46

System.out.println("Marks1 " + m1);

47

System.out.println("Marks2 " + m2);

48

System.out.println("Marks3 " + m3);

49

System.out.println("Maximum: " + maximum);

50
51
52

System.out.println("Average: " + average);


}

53

public static void main(String[] args) {

54
55
56
57
58
59
60

Student student = new Student();


student.acceptDetails();
student.compute();
student.display();
}
}

Sample Output:
1
2
3
4
5
6
7
8
9
10
11
12

Enter name: Sai


Enter age: 20
Enter marks1: 95
Enter marks2: 100
Enter marks3: 99
Name: Sai
Age: 20
Marks1 95
Marks2 100
Marks3 99
Maximum: 100
Average: 98.0

Question 6
Shasha Travels Pvt. Ltd. gives the following discount to its customers: [15]
Ticket amount Discount
Above Rs 70000 18%
Rs 55001 to Rs 70000 16%
Rs 35001 to Rs 55000 12%
Rs 25001 to Rs 35000 10%
less than Rs 25001 2%
Write a program to input the name and ticket amount for the customer and calculate
the discount amount and net amount to be paid. Display the output in the following
format for each customer :
1 SL. NO.
2 1

Name
-

Ticket charges
-

Discount
-

Net amount
-

(Assume that there are 15 customers, first customer is given the serial no (SlNo.) 1, next
customer 2 and so on.

Ans.
1

import java.util.Scanner;

2
3

public class Travels {

4
5
6
7
8
9
10
11
12

public static void main(String[] args) {


Scanner scanner = new Scanner(System.in);
System.out.print("Enter sno: ");
int sno = scanner.nextInt();
System.out.print("Enter name: ");
String name = scanner.next();
System.out.print("Enter ticket charges: ");
int charges = scanner.nextInt();

13

int discountPercentage = 0;

14
15

if (charges > 70000) {


discountPercentage = 18;

} else if (charges >= 55001 && charges <= 70000) {


discountPercentage = 16;
} else if (charges >= 35001 && charges
16
<= 55000) {
discountPercentage = 12;
}else if (charges
>= 25001 && charges <= 35000) {
17
discountPercentage = 10;
18
} else if (charges < 25001) {
19
discountPercentage = 2;
20
}
21
double discount = discountPercentage * charges / 100.0;
22

double netAmount = charges - discount;


System.out.println("Sl. No. \t Name \t Ticket Charges \t
23
Discount \t Net Amount");
System.out.println(sno + "\t" + charges + "\t" + discount +"\t" +
netAmount);
25
}
26
}
24

Sample Output:
1
Enter sno: 3
2
Enter name: Sai
3 Enter ticket charges: 27000
4 Sl. No.
Name
Ticket Charges
5
3
27000
2700.0 24300.0

Discount

Net Amount

Question 7
Write a menu driven program to accept a number and check and display whether it is a
Prime Number or not OR an Automorphic Number or not. (Use switch-case statement).
[15]
(a) Prime number: A number is said to be a prime number if it is divisible only by 1 and
itself and not by any other number. Example: 3,5,7,11,13 etc.

(b) Automorphic number: An automorphic number is the number which is contained in


the last digit(s) of its square.
Example: 25 is an automorphic number as its square is 625 and 25 is present as the last
two digits.
Ans.
1

import java.util.Scanner;

2
3

public class Menu {

4
5
6

public boolean isPrime(int n) {


for (int i = 1; i < n; i++) {

7
8
9
10
11
12
13
14

if (n % i == 0) {
return true;
}
}
return false;
}
public boolean isAutomorphic(int n) {

15
16
17

int square = n * n;
String originalNumber = n + "";
String squareNumber = n + "";
String lastDigits = squareNumber.substring(squareNumber.length() 18
originalNumber.length(), squareNumber.length());
19
return lastDigits.equals(originalNumber);
20
}
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42

public void menu() {


Scanner scanner = new Scanner(System.in);
System.out.println("Enter 1 for prime number");
System.out.println("Enter 2 for automorphic number");
System.out.print("Enter your choice: ");
int choice = scanner.nextInt();
System.out.print("Enter a number: ");
int num = scanner.nextInt();
switch (choice) {
case 1:
boolean prime = isPrime(num);
if (prime) {
System.out.println(num + " is a prime number");
} else {
System.out.println(num + " is not a prime number");
}
break;
case 2:
boolean automorphic = isAutomorphic(num);
if (automorphic) {
System.out.println(num + " is an automorphic number");

43
44

} else {
System.out.println(num + " is not an automorphic
number");

45
46
47
48
49
50
51

}
break;
default:
System.out.println("Invalid choice");
}
}

52

public static void main(String[] args) {

53
54
55
56

Menu menu = new Menu();


menu.menu();
}
}

Sample Output 1:
1
2
3
4
5

Enter 1
Enter 2
Enter
Enter
13 is

for prime number


for automorphic number
your choice: 1
a number: 13
a prime number

Sample Output 2:
1
2
3
4
5

Enter 1 for prime number


Enter 2 for automorphic number
Enter your choice: 2
Enter a number: 25
25 is an automorphic number

Question 8.
Write a program to store 6 element in an array P, and 4 elements in an array Q and
produce a third array R, containing all elements of array P and Q. Display the resultant
array [15]
Example:
1
2
3
4
5
6
7
8
9
10
11
12

INPUT
P[]
4
6
1
2
3
10

Q []
19
23
7
8

OUTPUT
R []
4
6
1
2
3
10
19
23
7
8

Ans.
1

import java.util.Scanner;

2
3

public class ArrayStore {

4
5
6

public static void main(String[] args) {


Scanner scanner = new Scanner(System.in);

int[] p = new int[6];

int[] q = new int[4];

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

int[] r = new int[10];


System.out.print("Enter elements of array P: ");
for (int i = 0; i < 6; i++) {
p[i] = scanner.nextInt();
}
System.out.print("Enter elements of array Q: ");
for (int i = 0; i < 4; i++) {
q[i] = scanner.nextInt();
}
for (int i = 0; i < 6; i++) {
r[i] = p[i];
}
for (int i = 0; i < 4; i++) {
r[i + 6] = q[i];
}
System.out.print("Elements of array R: ");
for (int i = 0; i < 10; i++) {
System.out.print(r[i] + " ");
}
}
}

Sample Output:
1
2
3

Enter elements of array P: 4 6 1 2 3 10


Enter elements of array Q: 19 23 7 8
Elements of array R: 4 6 1 2 3 10 19 23 7 8

Question 9
Write a program to input a string in uppercase and print the frequency of each
character. [15]
1
2
3
4
5
6
7
8
9
10

INPUT : COMPUTER HARDWARE


OUTPUT :
CHARACTERS FREQUENCY
A
2
C
1
D
1
E
2
H
1
M
1
O

11
12
13
14
15

P
R
T
U
W

1
3
1
1
1

Ans.
1

import java.util.Scanner;

2
3

public class Frequency {

4
5
6
7
8
9

public static void main(String[] args) {


Scanner scanner = new Scanner(System.in);
System.out.print("Enter a String: ");
String input = scanner.nextLine();
int[] frequency = new int[26];

10

for (int i = 0; i < input.length(); i++) {

11

char ch = input.charAt(i);

12
13
14
15
16
17

if (Character.isUpperCase(ch)) {
frequency[ch - 65]++;
}
}
System.out.println("Characters Frequency");
for (int i = 0; i < 26; i++) {

18
19
20
21
22
23

if (frequency[i] != 0) {
System.out.println((char) (i + 65) + "\t" + frequency[i]);
}
}
}
}

COMPUTER APPLCATIONS
(Theory)
Two Hours
Answers to this Paper must be written on the paper provided separately.
You will not be allowed to write during the first 15 minutes.
This time is to be spent in reading the Question Paper.
The time given at the head of the Paper is the time allowed for writing the answers.
This paper is divided into two Sections.
Attempt all questions from Section A and any four questions from Section B.
The intended marks for questions or parts of questions are given in bracket [ ]
SECTION A (40 Marks)
Question 1.
(a) What is the difference between an object and a class? [2]
Ans. 1. A class is a blueprint or a prototype of a real world object. It contains instance
variables and methods whereas an object is an instance of a class.
2. A class exists in the memory of a computer while an object does not.
3. There will be only one copy of a class whereas multiple objects can be instantiated
from the same class.
(b) What does the token keyword refer to in the context of Java? Give an
example for keyword. [2]
Ans. Keywords are reserved words which convey special meanings to the compiler and
cannot be used as identifiers. Example of keywords : class, public, void, int
(c) State the difference between entry controlled loop and exit controlled
loop. [2]
Ans. In an entry controlled loop, the loop condition is checked before executing the
body of the loop. While loop and for loop are the entry controlled loops in Java.
In exit controlled loops, the loop condition is checked after executing the body of the
loop. do-while loop is the exit controlled loop in Java.
(d) What are the two ways of invoking functions? [2]
Ans. If the function is static, it can be invoked by using the class name. If the function is
non-static, an object of that class should be created and the function should be invoked
using that object.

(e) What is difference between / and % operator? [2]


Ans. / is the division operator whereas % is the modulo (remainder) operator. a / b gives
the result obtained on diving a by b whereas a % b gives the remainder obtained on
diving a by b.
Question 2.
(a) State the total size in bytes, of the arrays a [4] of char data type and p [4]
of float data type. [2]
Ans. char is two bytes. So a[4] will be 2*4=8 bytes.
float is 4 bytes. So p[4] will be 4*4=16 bytes.
(b) (i) Name the package that contains Scanner class.
(ii) Which unit of the class gets called, when the object of the class is created?
[2]
Ans. (i) java.util
(ii) Constructor
(c) Give the output of the following: [2]
1 String n = Computer Knowledge;
2 String m = Computer Applications;
3 System.out.println(n.substring (0,8). concat (m.substring(9)));
4 System.out.println(n.endsWith(e));

Ans. n.substring(0,8) gives Computer. m.substring(9) gives Applications. These two


on concatenation gives ComputerApplications. n ends with e. So, it gives true.
The output is:
1
2

ComputerApplications
true

(d) Write the output of the following: [2]


(i) System.out.println (Character.isUpperCase(R));
(ii) System.out.println(Character.toUpperCase(j));
Ans. (i) true
(ii) J
(e) What is the role of keyword void in declaring functions? [2]
Ans. void indicates that the function doesnt return any value.
Question 3

(a) Analyse the following program segment and determine how many times
the loop will be executed and what will be the output of the program segment
? [2]
1
2
3
4
5
6
7
8

int p = 200;
while(true)
{
if (p<100)
break;
p=p-20;
}
System.out.println(p);

Ans.p values changes as follows : 200, 180, 160, 140, 120, 100, 80. So, the loop
executes six times and value of p is 80.
(b) What will be the output of the following code? [2]
(i)
1
2
3

System.out.println("k= " +k);

System.out.println("j= " +j);

int k = 5, j = 9;
k += k++ ++j + k;

Ans.
1
2

k = 6
j = 10

Explanation:
k += k++ ++j + k
k = k + k++ ++j + k
k = 5 + 5 10 + 6
k=6
j = 10 as it has been incremented in the ++j operation.
(ii) [2]
1

double b = -15.6;

double a = Math.rint (Math.abs (b));

System.out.println("a= " +a);

Ans.
1

a =16.0

Maths.abs(-15.6) will give 15.6 and Math.rint(15.6) gives 16.0.

(c) Explain the concept of constructor overloading with an example . [2]


Ans. A class can have more than one constructor provided that the signatures differ.
This is known as constructor overloading.
Example:
1

class Age {

2
3

int age;

4
5
6
7
8

public Age() {
age = -1;
}

9
10
11
12

public Age(int age) {


this.age = age;
}
}

(d) Give the prototype of a function search which receives a sentence sentnc
and a word wrd and returns 1 or 0 ? [2]
Ans.
1 public boolean function ( sentence sentnc, word wrd )

or
1 public int function ( sentence sentnc, word wrd )

(e) Write an expression in Java for z = (53 + 2y ) / ( x + y) [2]


Ans.
1 z = ( 5 * Math.pow ( x, 3 ) + 2 * y ) / ( x + y )

(f) Write a statement each to perform the following task on a string: [2]
(i) Find and display the position of the last space in a string s.
(ii) Convert a number stored in a string variable x to double data type
Ans. (i) System.out.println(s.lastIndexOf( );
(ii) Double.parseDouble(x)
(g) Name the keyword that: [2]
(i) informs that an error has occurred in an input/output operation.
(ii) distinguishes between instance variable and class variables.
Ans. (i) throw
(ii) static

(h) What are library classes ? Give an example. [2]


Ans. Library classes are the predefined classes which are a part of java API. Ex: String,
Scanner
(i) Write one difference between Linear Search and Binary Search . [2]
Ans. Linear search can be used with both sorted and unsorted arrays. Binary search can
be used only with sorted arrays.
SECTION B (60 Marks)
Attempt any four questions from this Section.
The answers in this Section should consist of the Programs in either Blue J environment
or any program environment with Java as the base.
Each program should be written using Variable descriptions/Mnemonic Codes such that
the logic of the program is clearly depicted.
Flow-Charts and Algorithms are not required.
Question 4.
Define a class called mobike with the following description: [15]
Instance variables/data members: int bno to store the bikes number
int phno to store the phone number of the customer
String name to store the name of the customer
int days to store the number of days the bike is taken on rent
int charge to calculate and store the rental charge
Member methods:
void input( ) to input and store the detail of the customer.
void computer( ) to compute the rental charge
The rent for a mobike is charged on the following basis.
First five days Rs 500 per day;
Next five days Rs 400 per day
Rest of the days Rs 200 per day
void display ( ) to display the details in the following format:
Bike No. PhoneNo. No. of days Charge
Ans.
1

import java.util.Scanner;

2
3

public class mobike {

4
5

int bno;

int phno;

7
8

String name;
int days;

int charge;

10
11

public void input() {

12
13
14
15
16
17
18
19
20
21
22
23

Scanner scanner = new Scanner(System.in);


System.out.print("Enter bike number: ");
bno = scanner.nextInt();
System.out.print("Enter phone number: ");
phno = scanner.nextInt();
System.out.print("Enter your name: ");
name = scanner.next();
System.out.print("Enter number of days: ");
days = scanner.nextInt();
}
public void compute() {

24

if (days <= 5) {

25

charge = 500 * days;

26

} else if (days <= 10) {

27

charge = 5 * 500 + (days - 5) * 400;

28

} else {

29
30
31
32

charge = 5 * 500 + 5 * 400 + (days - 10) * 200;


}
}

33

public void display() {


System.out.println("Bike No. \tPhone No. \t No. of Days \t
34
Charge");
35
System.out.println(bno + "\t" + phno + "\t" + days + "\t" + charge);
36
}
37
}

Question 5.
Write a program to input and sort the weight of ten people. Sort and display them in
descending order using the selection sort technique. [15]
Ans.
1

import java.util.Scanner;

2
3

public class SelectionSort {

4
5

public void program() {

Scanner scanner = new Scanner(System.in);

7
8
9
10
11

int[] weights = new int[10];


System.out.println("Enter weights: ");
for (int i = 0; i < 10; i++) {
weights[i] = scanner.nextInt();
}

12

for (int i = 0; i < 10; i++) {

13

int highest = i;

for (int j = i + 1; j < 10; j++) {


> weights[highest]) {
15
highest = j;
16
}
17
}
18
int temp = weights[highest];
19
weights[highest] = weights[i];
20
weights[i] = temp;
21
}
22
System.out.println("Sorted weights:");
23
for (int i = 0; i < 10; i++) {
24
System.out.println(weights[i]);
25
}
26
}
27
}
14

if(weights[j]

Question 6.
Write a program to input a number and print whether the number is a special number or
not. (A number is said to be a special number, if the sum of the factorial of the digits of
the number is same as the original number). [15]
Ans.
1

import java.util.Scanner;

2
3

public class SpecialNumber {

4
5
6
7}
{
8
9
10
11
12
13
14

public int factorial(int n) {


int fact = 1;
for (int i = 1; i <= n; i++) {
fact = fact * i;
return fact;
}
public int sumOfDigita(intnum)
int sum = 0;
while (num > 0) {
int rem = num % 10;
sum = sum + rem;
num = sum / 10;
}
return sum;
}

15

public boolean isSpecial(int num) {

16

int fact = factorial(num);

17

int sum = sumOfDigita(fact);

18

if (sum == num) {

19

return true;

20

} else {

21
22

return false;

23
24

25

public void check() {

26
27
28

Scanner scanner = new Scanner(System.in);


System.out.print("Enter a number: ");
int num = scanner.nextInt();

29
30
31
32
33
34
35
36

if (isSpecial(num)) {
System.out.println("It is a special number");
} else {
System.out.println("It is not a special number");
}
}
}

Question 7
Write a program to accept a word and convert it into lowercase if it is in uppercase, and
display the new word by replacing only the vowels with the character following it. [15]
Example
Sample Input : computer
Sample Output : cpmpvtfr
Ans.
1

import java.util.Scanner;

2
3

public class StringConversion {

4
5

public static void convert() {

6
7
8
9
10
11

Scanner scanner = new Scanner(System.in);


System.out.print("Enter a String: ");
String input = scanner.next();
input = input.toLowerCase();
String answer = "";
for (int i = 0; i < input.length(); i++) {

12
13
14
15
16
17
18
19
20
21
22

char c = input.charAt(i);
if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c =='u') {
answer = answer + (char) (c + 1);
} else {
answer = answer + c;
}
}
System.out.println(answer);
}
}

Question 8.
Design a class to overload a function compare ( ) as follows: [15]
(a) void compare (int, int) to compare two integer values and print the greater of the
two integers.
(b) void compare (char, char) to compare the numeric value of two character with
higher numeric value
(c) void compare (String, String) to compare the length of the two strings and print the
longer of the two.
Ans.
1

public class Overloading {

2
3

public void compare(int a, int b) {

4
5
6
7

int max = Math.max(a, b);


System.out.println(max);

}
public void compare(char a, char b) {

9
10
11
12

char max = (char) Math.max(a, b);


System.out.println(max);
}

13

public void compare(String a, String b) {

14
15
16
17
18
19
20
21
22
23

if (a.length() > b.length()) {


System.out.println(a);
} else if (a.length() < b.length()) {
System.out.println(b);
} else {
System.out.println(a);
System.out.println(b);
}
}
}

Question 9
Write a menu driven program to perform the following . (Use switch-case statement)
[15]
(a) To print the series 0, 3, 8, 15, 24 . n terms (value of n is to be an input by the
user).
(b) To find the sum of the series given below:
S = 1/2+ 3/4 + 5/6 + 7/8 19/20
Ans.
Series 1 : The ith term is i2-1.

import java.util.Scanner;

2
3

public class Menu {

4
5

public void series1(int n) {

for (int i = 1; i <= n; i++) {

7
8
9
10
11
12

int term = i * i - 1;
System.out.print(term + " ");
}
}
public double series2(int n) {

13

double sum = 0;

14

for (int i = 1; i <= n; i++) {

15
16
17
18
19

sum = sum + (double) (2 * i - 1) / (2 * i);


}
return sum;
}

20

public void menu() {

21
22
23
24
25
26
27

Scanner scanner = new Scanner(System.in);


System.out.println("1. Print 0, 3, 8, 15, 24... n tersm");
System.out.println("2. Sum of series 1/4 + 3/4 + 7/8 + ... n
terms");
System.out.print("Enter your choice: ");
int choice = scanner.nextInt();
System.out.print("Enter n: ");
int n = scanner.nextInt();

28

switch (choice) {

29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

case 1:
series1(n);
break;
case 2:
double sum = series2(n);
System.out.println(sum);
break;
default:
System.out.println("Invalid choice");
}
}
public static void main(String[] args) {
Menu menu = new Menu();
menu.menu();
}
}

CSE Paper 2013


Class X
Subject Computer Applications
(Two Hours)
Attempt ALL questions from Section A and any FOUR questions from Section B.
The intended marks for questions or parts of questions are given in brackets [ ].
SECTION A (40 Marks)
Attempt ALL questions.
Question 1
a) What is meant by precedence of operators? [2]
Ans. Precedence of operators refers to the order in which the operators are applied to
the operands in an expression. For example, * has higher precedence than +. So, the
expression 8 + 2 * 5 will evaluate to 8 + 10 = 18
b) What is a literal? [2]
Ans. A literal is a constant data item. There are different literals like integer literals,
floating point literals and character literals.
c) State the Java concept that is implemented through:
i) a super class and a subclass.
ii) the act of representing essential features without including background
details. [2]
Ans. i) Inheritance
ii) Abstraction
d) Give a difference between constructor and method. [2]
Ans. i)A constructor has no return type which a method has a return type.
ii) The name of the constructor should be the same as that of the class while the name
of a method can be any valid identifier.
iii) A constructor is automatically called upon object creation while methods are invoked
explicitly.
e) What are the types of casting shown by the following examples? [2]
i) double x =15.2;
int y =(int) x;
ii) int x =12;
long y = x;

Ans. i) Explicit casting


ii) Implicit casting
Question 2:
a) Name any two wrapper classes. [2]
Ans. Byte, Short, Integer, Long, Float, Double, Boolean, Character
b) What is the difference between break and continue statements when they
occur in a loop. [2]
Ans. The break statement terminates the loop while the continue statements current
iteration of the loop to be skipped and continues with the next iteration.
c) Write statements to show how finding the length of a character array and
char[] differs from finding the length of a String object str. [2]
Ans. The length of a character array is found by accessing the length attribute of the
array as shown below:
char[] array = new char[7];
int lengthOfCharArray = array.length;
The length of a String object is found by invoking the length() method which returns the
length as an int.
String str = java;
int lengthOfString = str.length();
d) Name the Java keyword that: [2]
(i) indicates a method has no return type.
(ii) stores the address of the currently calling object.
Ans. i) void
ii) this
e) What is an exception? [2]
Ans. An exception is an unforeseen situation that occurs during the execution of a
program. In simpler words, they are the errors that occur during the execution of a
program. The JRE throws an Exception object to indicate an exception which contains
the information related to that exception.
Question 3:
a) Write Java statement to create an object mp4 of class digital. [2]
Ans.
1

digital mp4 = new digital();

b) State the values stored in variables str1 and str2 [2]


1
String s1 = "good";
2
String s2="world matters";
3 String str1 = s2.substring(5).replace('t','n');
4 String str2 = s1.concat(str1);

Ans. s2.substring(5) gives matters. When t is replaced with n, we get manners.


good when concatenated with world matters gives goodworld matters.
So, str1 = manners and str2 = goodworld matters.
c) What does a class encapsulate? [2]
Ans. A class encapsulated the data (instance variables) and methods.
d) Rewrite the following program segment using the if..else statement. [2]
comm =(sale>15000)?sale*5/100:0;
Ans.
1
2
3
4
5

if ( sale > 15000 ) {


comm = sale * 5 / 100;
} else {
comm = 0;
}

e) How many times will the following loop execute? What value will be
returned? [2]
1
2
3
4
5
6

int x = 2, y = 50;
do{
++x;
y-=x++;
}while(x&lt;=10);
return y;

Ans. In the first iteration, ++x will change x from 2 to 3. y-=x++ will increase x to 4.
And y becomes 50-3=47.
In the second iteration, ++x will change x from 4 to 5. y-=x++ will increase x to 6. And
y becomes 47-5=42.
In the third iteration, ++x will change x from 6 to 7. y-=x++ will increase x to 8. And y
becomes 42-7=35.
In the fourth iteration, ++x will change x from 8 to 9. y-=x++ will increase x to 10. And
y becomes 35-9=24.
In the fifth iteration, ++x will change x from 10 to 11. y-=x++ will increase x to 12. And
y becomes 24-11=13.
Now the condition x<=10 fails.
So, the loop executes five times and the value of y that will be returned is 13.

f) What is the data type that the following library functions return? [2]
i) isWhitespace(char ch)
ii) Math.random()
Ans. i) boolean
ii) double
g) Write a Java expression for ut + ft2 [2]
Ans. u * t + 0.5 * f * Math.pow ( t, 2)
h) If int n[] ={1, 2, 3, 5, 7, 9, 13, 16} what are the values of x and y? [2]
1
2

x=Math.pow(n[4],n[2]);
y=Math.sqrt(n[5]+[7]);

Ans. n[4] is 7 and n[2] is 3. So, Math.pow(7,3) is 343.0.


n[5] is 9 and n[7] is 16. So Math.sqrt(9+16) will give 5.0.
Note that pow() and sqrt() return double values and not int values.
i) What is the final value of ctr after the iteration process given below,
executes? [2]
1

int ctr=0;

for(int i=1;i&lt;=5;i++)

3
4

for(int j=1;j&lt;=5;j+=2)
++ctr;

Ans. Outer loop runs five times. For each iteration of the outer loop, the inner loop runs
3 times. So, the statement ++ctr executes 5*3=15 times and so the value of ctr will be
15.
j) Name the methods of Scanner class that: [2]
i) is used to input an integer data from standard input stream.
ii) is used to input a string data from standard input stream.
Ans. i) scanner.nextInt()
ii) scanner.next()
SECTION B (60 Marks )
Attempt any four questions from this Section.
The answers in this section should consist of the program in Blue J environment with
Java as the base. Each program should be written using Variable descriptions /
Mnemonics Codes such that the logic of the program is clearly depicted.
Flow-charts and Algorithms are not required.

Question 4:
Define a class called FruitJuice with the following description: [15]
Instance variables/data members:
int product_code stores the product code number
String flavour stores the flavor of the juice.(orange, apple, etc)
String pack_type stores the type of packaging (tetra-pack, bottle etc)
int pack_size stores package size (200ml, 400ml etc)
int product_price stores the price of the product
Member Methods:
FriuitJuice() default constructor to initialize integer data members
to zero and string data members to .
void input() to input and store the product code, flavor, pack type,
pack size and product price.
void discount() to reduce the product price by 10.
void display() to display the product code, flavor, pack type,
pack size and product price.
Ans.
1

import java.util.Scanner;

2
3

public class FruitJuice {

4
5
6
7
8
9

int product_code;
String flavour;
String pack_type;
int pack_size;
int product_price;

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

public FruitJuice() {
product_code = 0;
flavour = "";
pack_type = "";
pack_size = 0;
product_price = 0;
}
public void input() {
Scanner scanner = new Scanner(System.in);
System.out.print("Enter product code: ");
product_code = scanner.nextInt();
System.out.print("Enter flavour: ");
flavour = scanner.next();
System.out.print("Enter pack type: ");
pack_type = scanner.next();
System.out.print("Enter pack size: ");
pack_size = scanner.nextInt();

29
30
31
32

System.out.print("Enter product price: ");


product_price = scanner.nextInt();
}

33

public void discount() {

34
35
36

product_price = (int) (0.9 * product_price);


}

37

public void display() {

38

System.out.println("Product Code: " + product_code);

39

System.out.println("Flavour: " + flavour);

40

System.out.println("Pack Type: " + pack_type);

41

System.out.println("Pack Size: " + pack_size);

42
43
44

System.out.println("Product Price: " + product_price);


}
}

Question 5:
The International Standard Book Number (ISBN) is a unique numeric book identifier
which is printed on every book. The ISBN is based upon a 10-digit code. The ISBN is
legal if:
1xdigit1 + 2xdigit2 + 3xdigit3 + 4xdigit4 + 5xdigit5 + 6xdigit6 + 7xdigit7 + 8xdigit8 +
9xdigit9 + 10xdigit10 is divisible by 11.
Example: For an ISBN 1401601499
Sum=11 + 24 + 30 + 41 + 56 + 60 + 71 + 84 + 99 + 109 = 253
which is divisible by 11.
Write a program to:
(i) input the ISBN code as a 10-digit integer.
(ii) If the ISBN is not a 10-digit integer, output the message Illegal ISBN and terminate
the program.
(iii) If the number is 10-digit, extract the digits of the number and compute the sum as
explained above.
If the sum is divisible by 11, output the message, Legal ISBN. If the sum is not
divisible by 11, output the message, Illegal ISBN. [15]
Ans.
1

import java.util.Scanner;

2
3

public class ISBN {

4
5
6
7
8

public static void main(String[] args) {


Scanner scanner = new Scanner(System.in);
System.out.print("Enter ISBN code: ");
int isbnInteger = scanner.nextInt();

9
10
11
12

String isbn = isbnInteger + "";


if (isbn.length() != 10) {
System.out.println("Ilegal ISBN");
} else {

13

int sum = 0;

14

for (int i = 0; i < 10; i++) {

15
16
17
18
19
20
21
22
23
24
25

int digit = Integer.parseInt(isbn.charAt(i) + "");


sum = sum + (digit * (i + 1));
}
if (sum % 11 == 0) {
System.out.println("Legal ISBN");
} else {
System.out.println("Illegal ISBN");
}
}
}
}

Question 6:
Write a program that encodes a word into Piglatin. To translate word into Piglatin word,
convert the word into uppercase and then place the first vowel of the original word as
the start of the new word along with the remaining alphabets. The alphabets present
before the vowel being shifted towards the end followed by AY.
Sample Input(1): London Sample Output(1): ONDONLAY
Sample Input(2): Olympics Sample Output(2): OLYMPICSAY [15]
Ans.
1

import java.util.Scanner;

2
3

public class Piglatin {

4
5
6
7
8
9
10
11
12
13

public static void main(String[] args) {


Scanner scanner = new Scanner(System.in);
System.out.print("Enter a String: ");
String input = scanner.next();
input = input.toUpperCase();
String piglatin = "";
boolean vowelFound = false;
for (int i = 0; i < input.length(); i++) {
char c = input.charAt(i);

if ((c == 'A' || c == 'E' || c == 'I' || c == 'O' || c =='U')


&& !vowelFound) {
15
piglatin = c + piglatin;
16
vowelFound = true;
17
} else {
18
piglatin = piglatin + c;
19
}
20
}
14

21
22
23
24

piglatin = piglatin + "AY";


System.out.println("Piglatin word is " + piglatin);
}
}

Question 7:
Write a program to input 10 integer elements in an array and sort them
In descending order using bubble sort technique. [15]
Ans.
1

import java.util.Scanner;

2
3

public class BubbleSort {

4
5

public static void main(String[] args) {

6
7
8

Scanner scanner = new Scanner(System.in);


System.out.println("Enter ten numbers:");

9
10
11
12

for (int i = 0; i < 10; i++) {


numbers[i] = scanner.nextInt();
}

int[] numbers = new int[10];

13
14
15
16
17
18
19
20
21
22
23
24
25
26

for (int i = 0; i < 10; i++) {


for (int j = 0; j < 10 - i - 1; j++) {
if (numbers[j] < numbers[j + 1]) {
int temp = numbers[j];
numbers[j] = numbers[j + 1];
numbers[j + 1] = temp;
}
}
}
System.out.println("Sorted Numbers:");
for (int i = 0; i < 10; i++) {
System.out.println(numbers[i]);
}
}
}

Question 8:
Design a class to overload a function series() as follows: [15]
(i) double series(double n) with one double argument and
returns the sum of the series.
sum = 1/1 + 1/2 + 1/3 + .. 1/n
(ii) double series(double a, double n) with two double arguments
and returns the sum of the series.
sum = 1/a2 + 4/a5 + 7/a8 + 10/a11 .. to n terms
Ans.

public class Overload {

2
3

public double series(double n) {

double sum = 0;

for (int i = 1; i <= n; i++) {

6
7
8
9
10
11

sum = sum + (1.0 / i);


}
return sum;
}
public double series(double a, double n) {

12
13

double sum = 0;
for (int i = 0; i < n; i++) {

14
15
16
17
18

sum = sum + ((3 * i + 1.0) / Math.pow(a, 3 * i + 2));


}
return sum;
}
}

Question 9:
Using the switch statement, write a menu driven program: [15]
(i) To check and display whether a number input by the user is
a composite number or not (A number is said to be a composite, if it
has one or more then one factors excluding 1 and the number itself).
Example: 4, 6, 8, 9
(ii) To find the smallest digit of an integer that is input:
Sample input: 6524
Sample output: Smallest digit is 2
For an incorrect choice, an appropriate error message should be displayed.
Ans.
1

import java.util.Scanner;

2
3

public class Menu {

4
5
6
7
8
9
10
11
12
13
14
15
16

public static void main(String[] args) {


Scanner scanner = new Scanner(System.in);
System.out.println("Menu");
System.out.println("1. Check composite number");
System.out.println("2. Find smallest digit of a number");
System.out.print("Enter your choice: ");
int choice = scanner.nextInt();
switch (choice) {
case 1:
System.out.print("Enter a number: ");
int number = scanner.nextInt();
if (isComposite(number)) {

17
18
19
20
21
22
23
24

System.out.println("It is a composite number");


} else {
System.out.println("It is not a composite number");
}
break;
case 2:
System.out.print("Enter a number: ");
int num = scanner.nextInt();

25

int smallest = smallestDigit(num);

26
27
28
29
30
31
32
33

System.out.println("Smallest digit is " + smallest);


break;
default:
System.out.println("Incorrect choice");
break;
}
}

34
35

public static boolean isComposite(int n) {


for (int i = 2; i < n; i++) {

36
37
38
39
40
41
42
43
44
45

if (n % i == 0) {
return true;
}
}
return false;
}
public static int smallestDigit(int number) {
int smallest = 9;
while (number > 0) {

46

int rem = number % 10;

47
48
49
50
51
52
53
54

if (rem < smallest) {


smallest = rem;
}
number = number / 10;
}
return smallest;
}
}

this keyword
Leave a reply
this keyword is used to refer to the object on which a method was invoked.
Take a look at the following code which contains a single instance variable x and a
method setX().
1

public class MyNumber {

2
3

int x;

4
5
6
7
8

public void setX() {


this.x = 3;
}
}

Now, to understand what this.x means, we use the following code


1

public class Test {

2
3
4
5
6
7

public static void main(String[] args) {


MyNumber myNumber1 = new MyNumber();
myNumber1.setX();
}
}

The method setX() was called on the object myNumber1. Within setX(), the statement
this.x=3 will be executed. As we said in the beginning of this article, this refers to the
object on which a method was invoked. Here, we have invoked the method setX() on
the object myNumber1. So, this will refer to the object myNumber1. So,
this.x = 3 ;
will be interpreted as
myNumber1.x = 3
which will set x to 3.
We could written the above program without using this keyword in the following way.
1

public class MyNumber {

2
3

int x;

4
5
6
7
8

public void setX() {


x = 3;
}
}

The output will still be the same.


Now, you might ask what is the use of this keyword if we can achieve the same thing
without using it.

Consider the following example:


1

public class MyNumber {

2
3

int x = 3;

4
5
6
7
8
9

public void printX() {


int x = 4;
System.out.printn(x);
}
}

The method printX() will print 4 and not 3. This is because when we declare a variable in
a method with the same name as that of another instance variable, then when we refer
to that variable within the method, we get access to the variable defined in the method
and not the instance variable of the class. This is illustrated in the following diagram:

If we want to access the instance variable, we do it with this.x.


1

public class MyNumber {

2
3

int x = 3;

4
5
6
7
8
9
10

public void setX() {


x = 4;
System.out.printn(x);
System.out.printn(this.x);
}
}

The above program will print,


1
2

4
3

To see why the second line printed 3, let us use the first line in this article this refers
to the object on which the method was invoked.
1
2

MyNumber myNumber1 = new MyNumber();


myNumber1.printX();

The method printX() was invoked on the object MyNumber1. So, this will refer to
myNumber1 and this.x will be myNumber1.x which is 3.
Normally, we use the this keyword in constructors and set methods so that we can use
the same name for instance variables and formal parameters.
Here is an example program with the keyword this used in a constructor and two set
methods.
1

public class Student {

2
3

int rollNumber;

int marks;

5
6
7
8
9
10
11
12
13
14
15
16
17
18

public Student(int rollNumber, int marks) {


this.rollNumber = rollNumber;
this.marks = marks;
}
public void setRollNumber(int rollNumber) {
this.rollNumber = rollNumber;
}
public void setMarks(int marks) {
this.marks = marks;
}
}

2012
COMPUTER APPLICATIONS
(Theory)
(Two Hours)
Answers to this Paper must be written on the paper provided separately.
You will not be allowed to write during the first 15 minutes.
This time is to be spent in reading the question paper.
The time given at the head of this Paper is the time allowed for writing.the answers.
This Paper is divided into two Sections.
Attempt all questions from Section A and any four questions from Section B. The intended marks for questions
or parts of questions are given in brackets [ ].
SECTION A (40 Marks)
Attempt all questions.
Question 1
(a) Give one example each of a primitive data type and a composite data type. [2]
Ans. Primitive Data Types byte, short, int, long, float, double, char, boolean
Composite Data Type Class, Array, Interface
(b) Give one point of difference between unary and binary operators. [2]
Ans. A unary operator requires a single operand whereas a binary operator requires two operands.
Examples of Unary Operators Increment ( ++ ) and Decrement ( ) Operators
Examples of Binary Operators +, -, *, /, %
(c) Differentiate between call by value or pass by value and call by reference or pass by reference. [2]
Ans. In call by value, a copy of the data item is passed to the method which is called whereas in call by
reference, a reference to the original data item is passed. No copy is made. Primitive types are passed by value
whereas reference types are passed by reference.
(d) Write a Java expression for (under root of 2as+u2) [2]
Ans. Math.sqrt ( 2 * a * s + Math.pow ( u, 2 ) )
( or )
Math.sqrt ( 2 * a * s + u * u )
(e) Name the types of error (syntax, runtime or logical error) in each case given below:
(i) Division by a variable that contains a value of zero.
(ii) Multiplication operator used when the operation should be division.
(iii) Missing semicolon. [2]
Ans.
(i) Runtime Error
(ii) Logical Error
(iii) Syntax Error
Question 2
(a)Create a class with one integer instance variable. Initialize the variable using:
(i) default constructor
(ii) parameterized constructor. [2]
Ans.
1
2

public class Integer {

3
4
5
6
7
8
9
10
11
12

int x;
public Integer() {
x = 0;
}
public Integer(int num) {
x = num;
}
}

(b)Complete the code below to create an object of Scanner class.


Scanner sc = ___________ Scanner( ___________ ) [2]
Ans. Scanner sc = new Scanner ( System.in )
(c) What is an array? Write a statement to declare an integer array of 10 elements. [2]
Ans. An array is a reference data used to hold a set of data of the same data type. The following statement
declares an integer array of 10 elements int arr[] = new int[10];
(d) Name the search or sort algorithm that:
(i) Makes several passes through the array, selecting the next smallest item in the array each time and
placing it where it belongs in the array.
(ii) At each stage, compares the sought key value with the key value of the middle element of the array.
[2]
Ans. (i) Selection Sort
(ii) Binary Search
(e) Differentiate between public and private modifiers for members of a class. [2]
Ans. Variables and Methods whwith the public access modie the class also.
Question 3
(a) What are the values of x and y when the following statements are executed? [2]
1 int a = 63, b = 36;
2 boolean x = (a < b ) ? true : false; int y= (a > b ) ? a : b ;

Ans. x = false
y = 63
(b) State the values of n and ch [2]
1

char c = 'A':

int n = c + 1;

Ans. The ASCII value for A is 65. Therefore, n will be 66.


(c) What will be the result stored in x after evaluating the following expression? [2]
1
2

int x=4;
x += (x++) + (++x) + x;

Ans. x = x + (x++) + (++x) + x


x=4+4+6+6
x = 20

(d) Give the output of the following program segment: [2]


1 double x = 2.9, y = 2.5;
2 System.out.println(Math.min(Math.floor(x), y));
3 System.out.println(Math.max(Math.ceil(x), y));

Ans.
2.0
3.0
Explanation : Math.min(Math.floor(x), y) = Math.min ( 2.0, 2.5 ) = 2.0
Math.max(Math.ceil(x), y)) = Math.max ( 3.0, 2.5 ) = 3.0
(e) State the output of the following program segment. [2]
1
String s = "Examination";
2
int n = s.length();
3 System.out.println(s.startsWith(s.substring(5, n)));
4 System.out.println(s.charAt(2) == s.charAt(6));

Ans.
false
true
Explanation : n = 11
s.startsWith(s.substring(5, n)) = s.startsWith ( nation ) = false
( s.charAt(2) == s.charAt(6) ) = ( a== a ) = true
(f) State the method that:
(i) Converts a string to a primitive float data type
(ii) Determines if the specified character is an uppercase character [2]
Ans. (i) Float.parseFloat(String)
(ii) Character.isUpperCase(char)
(g) State the data type and values of a and b after the following segment is executed.[2]
1
2
3

String s1 = "Computer", s2 = "Applications";


a = (s1.compareTo(s2));
b = (s1.equals(s2));

Ans. Data type of a is int and b is boolean.


ASCII value of C is 67 and A is 65. So compare gives 67-65 = 2.
Therefore a = 2
b = false
(h) What will the following code output? [2]
1
2
3

String s = "malayalam";
System.out.println(s.indexOf('m'));
System.out.println(s.lastIndexOf('m'));

Ans.
0
8
(i) Rewrite the following program segment using while instead of for statement [2]
1

int f = 1, i;

for (i = 1; i <= 5; i++) {

3
4
5

f *= i;
System.out.println(f);
}

Ans.
1

int f = 1, i = 1;

2
3
4
5
6

while (i <= 5) {
f *= i;
System.out.println(f);
i++;
}

(j) In the program given below, state the name and the value of the
(i) method argument or argument variable
(ii) class variable
(iii) local variable
(iv) instance variable [2]
1

class myClass {

2
3

static int x = 7;

int y = 2;

5
6

public static void main(String args[]) {

7
8
9
10
11
12
13

myClass obj = new myClass();


System.out.println(x);
obj.sampleMethod(5);

14
15
16
17
18

void sampleMethod(int n) {
System.out.println(n);
System.out.println(y);

int a = 6;
System.out.println(a);
}

}
}

Ans. (i) name = n value =5


(ii) name = y value = 7
(iii) name = a value = 6
(iv) name = obj value = new MyClass()
SECTION B (60 MARKS)
Attempt any four questions from this Section.
The answers in this Section should consist of the Programs in either Blue J environment or any program
environment with Java as the base. Each program should be written using Variable descriptions/Mnemonic
Codes so that the logic of the program is clearly depicted.
Flow-Charts and Algorithms are not required.
Question 4
Define a class called Library with the following description:
Instance variables/data members:

Int acc_num stores the accession number of the book


String title stores the title of the book stores the name of the author
Member Methods:
(i) void input() To input and store the accession number, title and author.
(ii)void compute To accept the number of days late, calculate and display and fine charged at the rate of Rs.2
per day.
(iii) void display() To display the details in the following format:
Accession Number Title Author
Write a main method to create an object of the class and call the above member methods. [ 15]
Ans.
1

public class Library {

2
3
4
5
6
7
8

=
9
10
11
12
13
14
15
16

int acc_num;
String title;
String author;
public void input() throws IOException {
BufferedReader br
new BufferedReader(newInputStreamReader(System.in));
System.out.print("Enter accession number: ");
acc_num = Integer.parseInt(br.readLine());
System.out.print("Enter title: ");
title = br.readLine();
System.out.print("Enter author: ");
author = br.readLine();
}

17

public void compute() throws IOException {


BufferedReader br
18
= new BufferedReader(newInputStreamReader(System.in));
19
System.out.print("Enter number of days late: ");
20
int daysLate = Integer.parseInt(br.readLine());;
21

int fine = 2 * daysLate;

22
23
24

System.out.println("Fine is Rs " + fine);


}

25
26
27
28
29
30

public void display() {


System.out.println("Accession Number\tTitle\tAuthor");
System.out.println(acc_num + "\t" + title + "\t" + author);
}
public static void main(String[] args) throws IOException {

31
32
33
34
35
36

Library library = new Library();


library.input();
library.compute();
library.display();
}
}

Question 5
Given below is a hypothetical table showing rates of Income Tax for male citizens below the age of 65 years:

Taxable Income (TI) in

Income Tax in

Does not exceed 1,60,000

Nil

Is greater than 1,60,000 and less than or equal to 5,00,000

( TI 1,60,000 ) * 10%

Is greater than 5,00,000 and less than or equal to 8,00,000

[ (TI - 5,00,000 ) *20% ] + 34,000

Is greater than 8,00,000

[ (TI - 8,00,000 ) *30% ] + 94,000

Write a program to input the age, gender (male or female) and Taxable Income of a person.If the age is more
than 65 years or the gender is female, display wrong category*.
If the age is less than or equal to 65 years and the gender is male, compute and display the Income Tax payable
as per the table given above. [15]
Ans.
1

import java.util.Scanner;

2
3

public class IncomeTax {

4
5

public static void main(String[] args) {

6
7
8
9
10
11
12

Scanner scanner = new Scanner(System.in);


System.out.print("Enter age: ");
int age = scanner.nextInt();
System.out.print("Enter gender: ");
String gender = scanner.next();
System.out.print("Enter taxable income: ");
int income = scanner.nextInt();

13
14
15

if (age > 65 || gender.equals("female")) {


System.out.println("Wrong category");
} else {

16

double tax;

if (income <= 160000) {


tax =0;
tax =
17 } else if (income > 160000 && income <= 500000) {
(income - 160000) * 10 / 100;
}else if (income >= 500000 &&
income <= 800000) {
18
tax = (income - 500000) * 20 / 100 + 34000;
19

} else {

20
21
22
23
24
25

tax = (income - 800000) * 30 / 100 + 94000;


}
System.out.println("Income tax is " + tax);
}
}
}

Question 6
Write a program to accept a string. Convert the string to uppercase. Count and output the number of double
letter sequences that exist in the string.
Sample Input: SHE WAS FEEDING THE LITTLE RABBIT WITH AN APPLE
Sample Output: 4 [ 15]
Ans.
1

import java.util.Scanner;

2
3

public class StringOperations {

4
5

public static void main(String[] args) {

6
7
8
9
10

Scanner scanner = new Scanner(System.in);


System.out.print("Enter a String: ");
String input = scanner.nextLine();
input = input.toUpperCase();
int count = 0;

11

for (int i = 1; i < input.length(); i++) {

12
13
14
15
16
17
18

if (input.charAt(i) == input.charAt(i - 1)) {


count++;
}
}
System.out.println(count);
}
}

Question 7
Design a class to overload a function polygon() as follows:
(i) void polygon(int n, char ch) : with one integer argument and one character type argument that draws a filled
square of side n using the character stored in ch.
(ii) void polygon(int x, int y) : with two integer arguments that draws a filled rectangle of length x and breadth
y, using the symbol @
(iii)void polygon( ) : with no argument that draws a filled triangle shown below.
Example:
(i) Input value of n=2, ch=O
Output:
OO
OO
(ii) Input value of x=2, y=5
Output:
@@@@@
@@@@@
(iii) Output:
*
**
*** [15]
Ans.
1

public class Overloading {

2
3
4
5
6
7
8
9
10
11
12

public void polygon(int n, char ch) {


for (int i = 1; i <= n; i++) {
for (int j = 1; j <= n; j++) {
System.out.print(ch);
}
System.out.println();
}
}
public void polygon(int x, int y) {

13

for (int i = 1; i <= x; i++) {

14
15
16
17
18
19
20

for (int j = 1; j <= y; j++) {


System.out.print("@");
}
System.out.println();
}
}

21

public void polygon() {

22

for (int i = 1; i <= 3; i++) {

23
24
25
26
27
28
29

for (int j = 1; j <= i; j++) {


System.out.print("*");
}
System.out.println();
}
}
}

Question 8
Using the switch statement, writw a menu driven program to:
(i) Generate and display the first 10 terms of the Fibonacci series 0,1,1,2,3,5.The first two Fibonacci
numbers are 0 and 1, and each subsequent number is the sum of the previous two.
(ii)Find the sum of the digits of an integer that is input.
Sample Input: 15390
Sample Output: Sum of the digits=18
For an incorrect choice, an appropriate error message should be displayed [15]
Ans.
1

import java.util.Scanner;

2
3

public class Menu {

4
5
6
7
8
9
10
11
12
13
14
15
16

public static void main(String[] args) {


Scanner scanner = new Scanner(System.in);
System.out.println("Menu");
System.out.println("1. Fibonacci Sequence");
System.out.println("2. Sum of Digits");
System.out.print("Enter choice: ");
int choice = scanner.nextInt();
switch (choice) {
case 1:
int a = 0;
int b = 1;
System.out.print("0 1 ");

for (int i = 3; i <= 10; i++) {


+ b;
System.out.print(c + " ");
b;
b = c;
1 }
break;
case2:
7
System.out.print("Enter a number: ");
scanner.nextInt();
intsum = 0;
> 0) {
18
int rem = num % 10;

int c = a
a =

int num =
while (num

19
20
21
22
23
24
25
26
27
28

sum = sum + rem;


num = num / 10;
}
System.out.println("Sum of digits is " + sum);
break;
default:
System.out.println("Invalid Choice");
}
}
}

Question 9
Write a program to accept the names of 10 cities in a single dimension string array and their STD (Subscribers
Trunk Dialing) codes in another single dimension integer array. Search for a name of a city input by the user in
the list. If found, display Search Successful and print the name of the city along with its STD code, or else
display the message Search Unsuccessful, No such city in the list. [15]
Ans.
1

import java.util.Scanner;

2
3

public class Cities {

4
5

public static void main(String[] args) {

Scanner scanner = new Scanner(System.in);

String[] cities = new String[10];

int[] std = new int[10];

9
10
11
12
13
14
15
16
17

for (int i = 0; i < 10; i++) {


System.out.print("Enter city: ");
cities[i] = scanner.next();
System.out.print("Enter std code: ");
std[i] = scanner.nextInt();
}
System.out.print("Enter city name to search: ");
String target = scanner.next();
boolean searchSuccessful = false;

18

for (int i = 0; i < 10; i++) {

19
20
21

if (cities[i].equals(target)) {
System.out.println("Search successful");
System.out.println("City : " + cities[i]);

22
23
24
25
26
27
28
29
30
31

System.out.println("STD code : " + std[i]);


searchSuccessful = true;
break;
}
}

list");

if (!searchSuccessful) {
System.out.println("Search Unsuccessful, No such city in the
}
}
}

Ingredients for Coconut Barfi

Freshly grated coconut 1 (medium sized)

Sugar 250 gms

Milk 1 litre

Fresh cream 2 tsp

Cardamom powder (Elaichi) tsp


Method of preparation of coconut barfi

Mix the freshly grated coconut with milk in a heavy bottom pan for about 15 20 minutes on
a slow flame.

Stir continuously with a spatula until all the milk is absorbed by the coconut.

Add the fresh cream to the mixture.

Add the sugar and mix well to make a ball like mass of the entire mixture which has good
binding. At the right consistency, the mixture should not be sticky to touch.

Add 2 spoons of powdered sugar and cardamom powder at the end to the entire mixture after
removing it from the flame.

Grease a plate with ghee and spread the mixture in an even and thick layer on it while its still
warm. You can use the flat side of a katori (bowl) greased with ghee to evenly spread the mixture.

Cut this into rectangular pieces while its warm.

Your nariyal barfi is ready to serve once it cools down!


Recipe courtesy Urmila Sarda (cooking enthusiast & home maker)
Photograph by Sneha Mehta, mDhil

Você também pode gostar