Icse 10 Montgly 24
Icse 10 Montgly 24
MONTHLY EXAMINATION
STD : X D,E COMPUTER APPLICATIONS MARKS: 50
QQuestion 4
Design a class employee with the following description
Instance variables
String name. – to store the name of the employee
int empno – to store the employee number
double salary. – to store the basic salary
double pf – to store the provident fund
double pay. – to store the net pay
Member Functions
void input( ). – to accept name, employee number and salary
void calculate( ). – to calculate pf and net pay as follows
pf = 12% of salary
netpay. = salary - pf
void display( ). – to display the pay slip
Write a main program to create an object for the class and call the methods
Question 5
Design a class telephone with the following description
Instance variables
String name. – to store the name of the consumer
int phno – to store the phone number
int calls. – to store the number of calls
double charge – to store the amount to be paid
Member Functions
void input( ). – to accept name, phone number and calls count
void calculate( ). – to calculate charge as follows