VRS transport company charges for the parcels of its customers as per the following
Class name : Atransport
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 function: void accept () - to accept the name of the customer, weight of the parcel
from the user (using Scanner class)
Weight in Kg Charge per Kg
Upto 15 Kgs Rs.30 per Kg
Next 25 Kgs Rs.20 per Kg
Above 40 Kgs 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.
Answers
Answered by
0
Answer:
don't know what is the
Explanation:
ahsfdfshs cygxgfcuh!dgnzfyfukfaudxuhfthdaygfykds
Similar questions