Anshul transport company parcels of its customers as per the following specifications given below:
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 functions:
void accept () - to accept the name of the customer and weight of the parcel from the user(using Scanner class)
void calculate() - to calculate the charge as per the information of the parcel as per the following criteria
Weight upto 10 Kg_ charge ₹25 per Kg
Weight upto next 20 Kgs_ charge ₹20 per Kg
Weight above 30 Kgs_ charge ₹10 per Kg
Design a main method to call all the member methods.
Answers
Answered by
4
Answer:
sorry I didn't understand the question?
Step-by-step explanation:
Similar questions