9. Write a java class to calculate and print the electricity bill to be paid by a customer. (15) Assume that the customer pays a rent of Rs. 5000 20% of the amount exceeding over Rs. 8. Write a java class to calculate the income tax by taking monthly salary of an employee based on the following conditions: (15) Annual income(Rs) Tax Upto 130000 No tax Between 130000 – 200000 15% of the amount exceeding over Rs.130000 From 200000 – 250000 Rs. Each program should be written using Variable description / Mnemonic Codes such that the logic of the program is clearly depicted.) Q. (Answer any four) (The answers of this section should consist of the Program in Blue J environment with Java. Public void main( ) public static void main( )ī=2*a - - a ( a) Write the output: (5) (a) b) public class test public class result Software objects interact and communicate with each other using machine language. For every primitive type in java, there is a built in object type called Wrapper class. The continue statement force an early iteration of a loop. State True/False: (5) Switch statement can use characters and numbers in its case. When an expression within the parenthesis in a set of statements returns zero value, the condition is considered to be _. A _ is a blue print of the attributes and the methods common to all its objects. The logical _ is equivalent to OR function. _ is used to force a conversion from one data type to another. Fill in the blanks: (5) The compiler ignores the characters in the _. i) ‘1’ ii) ‘10’ iii) '\0’ iv) ‘\n’ (c) Which of the following return type does a constructor have: i) Void ii) Boolean iii) Int iv) None (d) The arguments of the function given in the function definition are called: i) Formal parameter ii) Actual parameter iii) Reference parameter iv) None (e) The address of a memory location which can store a value and which may change during the program execution is known as: i) Identifier ii) Keyword iii) Separator v) Literal Q. Multiple choice: (5) (a) A program of java that can be executed from any remote machine is called: i) Application ii) Applet iii) Object iv) None (b) Find which one is not a character literal.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |