Computer
Computer
Computer
[2~
• .: .. s h l.,e sarie methoa name what
~2]
a,d or.c +rere"'ce between wh1 a loop and do .vh ,e oop i2J
e cs ... st:l ..ed :1 x a~er evaluating the &allowing express on? [2]
x=• 5 x=++x + ·H·x ~ x+ x+~ 3 I
<:,, e •'lod orctDtype for the method creckNumber'' that take s an
•eger a ao e x as ts argument and returns a value of String data type [2]
r·e o e ~.l t of drffe e'lCe between forMal parameter and actual parameter [2]
a-,-,e .,t-e fo o:. :1g that [2]
s JSed for a ocat ~g memory to an array
s t.sed to store ·he current address of ar obJect
e ":e an ex::>,..ess :in for( a-b)' - , 25 ~ b •c 2 f2]
.... e a:1s\ e'" ,,, t'1 s sectior should consist of the Program in Bluej environment or any
program environment with java as the base. Each program should be wr,tten usmg variable
desc riptionlMnemonic Codes such that the logic of the program is clea rly depicted Flow
:::'"'arts and Algor:thrrs are not requ rea
Cost --=---=-~
Lesstha£)_9r eqL~_I to R? 109QQ__ 5°0
- - - - - --------
-~iscq_unt(in percen~eJ_ _ _ _ __ ~
________ --------1
More than Rs 10000 and less than or 10° o
, equal to Rs10_Q00 _ _ ______ +
More than Rs 20000 and less than or 15%
equal to Rs 35000 _ __ _ _ _ _ _____
l, More than Rs 35000 _______-----1.. 2=-0:. . :o/i.;:__o_ _ _ _ _ _ _ _ _ _~
......
- To display customer name mobtle number amount to be paid
.._, mam method to create an object of the class and ca the
Q 5. Write a program 1n Java to input and store 20 temperatures m Fahrer e ~ "" a
Singled1mens10:1al array and display all the temperatures after con,ert "g
tnem ', ,"els1us
[hint ..;._,_.~s=5/9(F-32) ]
Q 9 A 'Sum- product' number is an integer that is equal to the sum of ·ts c·c-:s • 'T.'es
the product of its digits. Write a program in java to input a number and che~
whether it is a 'Sum-Product' number or not. Display an appropriate messaJe
accordingly.
For Example: Number 123
Digits in the number are · 1,2,3
Sum of digits=6
Product of digits=1 *2*3=6
If sum of digits=Product of digits then tf-te numbel'" ts sad to be su~-Pr:-n:L:
Sample Input. Enter a number 123
1+2+3=1 *2*3
Sample Output· It is a Sum-Product number