Page 1 :
Tuesday, June 22, 2021, 8:07 PM, , COMBINED ICSE 246 Page 1
Page 5 :
Anshul transport company charges for the parcels of its, customers as per the following specifications given below:, Class name : transport, , Member variables:, String name – to store the name of the customer, int w, –to store the weight of the parcel in Kg, int charge, – to store the charge of the parcel, Member functions :, void accept ( ) –to accept the name of the customer,, weight of the parcel from the user (using, Scanner class), void calculate ( ) – to calculate the charge as per the, weight of the parcel as per the following criteria., Weight in Kg, Upto 10 Kgs, Next 20 Kgs, Above 30 Kgs, , Charge per Kg, Rs.25 per Kg, Rs.20 per Kg, Rs.10 per Kg, , A surcharge of 5% is charged on the bill., void print ( ), – to print the name of the customer, weight of the, parcel, total bill inclusive of surcharge in a tabular form in, the following format :, Name Weight Bill amount, ------- --------- --------------Define a class with the above-mentioned specifications, create, the main method, create an object and invoke the member, methods., , Write a program in Java for the following specification:, Class, : Empl, Data Members : Emp_No, Name, BasicSalary, DA, HRA, TA, PF, GrossSalary, Member Methods :, void get(), : To accept Employee No., Name and Basic Salary of the employees., void calcu(), : To calculate the Gross Salary based on the following condition:, , Basic Salary, DA (%) TA (%) HRA (%) PF (%), >= 20000, 53, 12, 10, 8, >=10000 to <20000 45, 10, 12, 7.5, <10000, 40, 8, 14, 7, Gross Salary = (Basic Salary + DA + TA + HRA) – PF, void Display(), EMPLOYEE No., ********, , :, , To display the following data in given format:, Name, ****, , GROSS SALARY, ********, , COMBINED ICSE 246 Page 5
Page 6 :
********, , ****, , ********, , Write a main method to create the object of the above class and call the above method to, calculate and print the Employee No., Name, Gross Salary and PF of an employee., , Design a class HotelBill as per the following specifications:, Class name, : Hotelbill, Data members : cust_name, check_in_date, check_out_date, no_of_days, bill, Member functions :, void get(), : to input required data members., void compute(), : that calculates and displays the bill as below:, , No. of days, First 5 days, Next 10 days, Above 15 days, voiddisplay(), Customer Name, _____, , Rate/day, Rs. 250, Rs. 500, Rs. 800, :, , to display the details of all the data members in the following format:, Check_in_date, __________, , Check_out_date, _______, , Bill, _______, , Write the main method to create an object of a class and call all the above member methods., , COMBINED ICSE 246 Page 6