Write java programs for the following questions: 1) Create a class Salary as given below: Class name Data Members/Variables : Salary : name (String type data) Basic pay, special allowance, conveyance allowance, gross, provident fund, net salary and annual salary (all double type data) Member functions of class: i) void givevalues() - A function to assign name of employee(name), salary (BasicPay) of your choice and conveyance allowance (ConveyanceAllo) as Rs.1000.00 Void Salarycal()- To calculate other allowances and salaries as given: special allo=25% of basic salary. Gross BP+SplAl+ConAl. Pf=8.33% of BP NS-gross-pf AS 12 month NS. to print name and other data members of class with suitable headings ii) Cockroach. iii) Void display()- Write a program to create a class by the name Salary. Calculate allowances, salary and print all the data of an employee. 11) Write a menu driven program to accept a number 1 or 2 as choice. When choice is 1 Accept date as dd,mm,yy and check and display if the accepted date is valid or not. Display a proper message.
When choice is 2
(pg.2)
A computerised ticket counter of the metro rail station charges for each ride at the following rates Age
18 years and above
Amount
Rs. 35 Rs. 25
5 years to less than 18 years
No charges.
Less than 5 years
Write a program to accept a number of persons, age of each person and also information about accompanying kid in (Y or N) in character form. Print the output including number of persons, age of
each person and total amount to be paid as fair on above criteria. The input and output should be
displayed in the given format Input
Eg:
:2 :25
Number of persons
Age of first person
person :14 :N
Age of second Any kid (Y/N)
Output
Total Three persons of ages 25,14 and kid Total amount to be paid Rs. 60/
Answers
Answered by
0
Answer:
nice moment and for wordpress
Similar questions