Professional Documents
Culture Documents
Write a java class to calculate the income tax by taking monthly salary of an employee based on
the following conditions: (15)
From 200000 – 250000 Rs. 5000 + 20% of the amount exceeding over Rs. 2000000
Q. 9. Write a java class to calculate and print the electricity bill to be paid by a customer. (15)
(a) b)
Q. 6. Digital World announces seasonal discount on the laptops in the given order. [15]
An additional discount of 5% on all types of laptops is given. Sales tax is calculated at 12% on the
price after the discounts. Define a class to accept the cost of the laptop and print the amount payable
by the customer on purchase ( use constructor).(2)
Q) char ch = ‘F’;
int m = ch;
m = m + 5;
System.out.println(m + “” + ch);
Q) int x =20, y = 10, z; What is the value of z in z = ++x * (y – –) – y ? Show the steps.
A++;
Else a—;
System.out.println(a);
Member functions:
1 km Rs 25
1 < km <= 6 Rs 10
6 < km <= 12 Rs 15
12 < km <= 18 Rs 20
>18 km Rs 25
----
Create an object in the main method and call all the above methods in it.
int n =(q-p)>(p-q)?(q-p):(p-q);
Write a program in to input and store all roll numbers, names and marks in 3 subjects
of n number of students in five single dimensional arrays and display the remark based
on average marks as given below
75 – 84 DISTINCTION
60 – 74 FIRST CLASS
40 – 59 PASS