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., , COMBINED ICSE 246 Page 5
Page 6 :
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, (%), >= 20000, 53, >=10000 to <20000 45, <10000, 40, , TA, (%), 12, 10, 8, , HRA, (%), 10, 12, 14, , PF, (%), 8, 7.5, 7, , Gross Salary = (Basic Salary + DA + TA + HRA) – PF, void Display(), given format:, , EMPLOYEE No., ********, , :To display the following data in, , Name, ****, , GROSS SALARY, ********, , 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., , COMBINED ICSE 246 Page 6
Page 7 :
Design a class HotelBill as per the following, specifications:, Class name, Data members, , :Hotelbill, :cust_name, days, bill, , Member functions :, void get(), :to input required data members., void compute(), :that calculates the bill as below:, No. of days, First 5 days, Next 10 days, Above 15 days, , Rate/day, Rs. 250, Rs. 500, Rs. 800, , void display(), :to display the details of all the, data members in the following format:, Customer Name, _____, , Days, __________, , Bill, _______, , Write the main method to create an object of a, class and call all the above member methods., , COMBINED ICSE 246 Page 7