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

halfyearly2023

Half yearly payment done by me

Uploaded by

veerthedarkruler
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
2 views

halfyearly2023

Half yearly payment done by me

Uploaded by

veerthedarkruler
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 4
v Time: 2hrs. Computer Application _M.M.: 100 [Note : This paper is divided into two sections. Section A and Section B. Section A is compulsory and attempt any four questions from Section B. intended marks for questions or parts of questions are given in [ ]. Section - A Attempt all questions from this Section. / 1. Choose the correct answer and write the correct YY option : [20] . \a)-Wrapping up of data and methods together as one unit is termed as : i) Polymorphism ii) Inheritance - iii) Abstraction iv) Encapsulation ES b) Which is the smallest integer data type? A i) int ii) byte iii) short iv) long \©-Which of the following can be operands of arithmetic operators? i) Numeric ii) Characters iii) Boolean iv) Both Numeric & Characters \B-What is the output of a relational operator? i) Integer ii) Boolean iii) Character iv) Double 2} Which of the following is not a decision making statement? i) if ii) ifelse iii) switch iv) do while “4F Which loop executes the body of the loop at least once? i) do while loop ii) for iii) foreach iv) while vay Which of the following keyword is used to end the current loop iteration and proceed execution with the next iteration of that loop? break ii) continue itl) stop iv) skip aaa eee aces... SS RR el AO SY, (TP fi) fonti=d;icti) O°? numberof bec of alas cane ee iil) On the user's choice iv) Number of variables AF" A method that does not retum any value has a JA method can return i) any numberof values iv) infinite values ‘method with many definitions is known as ii)" multiple method 'v) overloaded method wor The technique in which the values of actal parameters copied tothe formal parameter i) Mixed method ii) call by arguments iii) call by reference iv) call by method DYThe method that changes the state of an object is 4) impure method iii) imperfect method vo Which of the following methods of class String is used toremove leading and trailing whitespaces? ii) perfect method 10; i++) System.out printin(i); System.out.printin(i * 4); Section - B (Attempt any four questions.) ‘The answer 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 Description/Mnemonic codes ‘so that the logic of the program is clearly depicted. v3 Define a class Security with the following description :[15] Class: Security Data Members/Instance variables String n to store the name int oh :_ to store the number of hours double r + to store the rate of the wages double w 2 to store the wages Member methods : void accept() : to accept the name, rate and number of hours. voidcalwage() tocalculate the wages of an employee as per the following. Number ofhours Rate Upto 40 Hrs. Q)hour For next 20 Hrs. 11.5ihour For next 20 Hrs. 2mour Void display): _ to display the Name and wages ‘Write main() method to create an object of the class and call the above member methods. 4, Design n class to overload a function SumSeriesO as follows : a) void SumSeries(int n, double x) - with one integer argument and one double argument to find and display the sum of the series given below : Riek ox x Teas ats 15] ton terms | X-Comp. [6] ,8<—Write a menu driven program to print the following b) void SumSeries(int n) — To display the following Seties- 2 9 2B 65..cccecceeee up to n terms . Write a program to accept a 4 digits integer and check whether that integer is a Strontio number or not.Strontio numbers are those four digits numbers when multiplied by 2 give the same digit at the hundreds and tens place, e.g. 1386*2=2772, here at tens and hundreds place digits are the same. Hence, 1386 is a Strontio number. [15] 4 Write a program to accept two words and check whether that two words are Anagram or not. Two words are said to be Anagram if they are of same length and are formed by same characters. [15] e.g. RACE and CARE, WOLF and FLOW Special words are those words which starts and ends with the same letter. Examples : EXISTENCE, COMIC, WINDOW Palindrome words are those words which read the same from left to right and vice versa. Examples : MALAYALAM, MADAM, LEVEL, ROTATOR, CIVIC All palindromes are special words, but all special words are not palindromes. Write a program to accept a word check and print whether the word is a palindrome or only special word. [15] patterns : [15] a) To print the Floyd's triangle [Given below] 1 2 3 4 5 6 7 8 9 10 11 12 13° 14 15 b) * +e RK RE RRA aoa —

You might also like