filmov
tv
Assignment on Abstract Level 3 |Assignment Set-5|Object Oriented Programming Using Python|NM|Infosys
![preview_player](https://i.ytimg.com/vi/cfLrMBf6zF0/sddefault.jpg)
Показать описание
#naanmudhalvan #infosys #springboard
#answers
#objectorientedprogrammingusingpython
#answersdotcom
#abstractlevel3
Assignment on Abstract - Level 3
Problem Statement
Rio Logistics Company provides two categories of services, namely Passenger logistics and Goods logistics.
Some part of the program for this requirement is already given to you. You may need to implement or debug the given code to meet the requirements.
Starter code given to you has three classes – Logistics, PassengerLogistics and GoodsLogistics
Class Description:
Logistics class: Debug and add logic based on details given below
Start reading should be less than end reading
generate_consumer_id(): Attribute, consumer_id should be auto-generated starting from 7001.Use the static variable counter to implement it
PassengerLogistics class: Implement calculate_bill_amount() based on details mentioned below
calculate_bill_amount():
Validate vehicle type and meter reading
If valid,
Generate consumer id
Identify distance travelled based on start reading and end reading
Calculate bill amount based on vehicle type, distance travelled and charge per km
Note: charge per km for first 100km and charge per km for rest of the distance are different. Refer static lists provided in the class
If the bill amount is less than the minimum charge for the vehicle type, consider bill amount to be the minimum charge
Add 5% service tax on bill amount
Return the final bill amount
Else, return -1
GoodsLogistics class: Debug calculate_bill_amount() based on details mentioned below
calculate_bill_amount():
Validate carrier type and meter reading
If valid,
Generate consumer id
Identify distance travelled based on start reading and end reading
Calculate bill amount based on carrier type, distance travelled and charge per km
Note: Charge per kilometer for first 1000kg of goods is given in the table
For every next 1000kg, charge per kilometer should be doubled until 3000kg (eg: 20,40,80 or 30,60,120 etc).
If weight is above 3000kg, then consider charge per kilometer to be Rs.200 irrespective of carrier type
Add 10% service tax on bill amount
Add Rs. 2000 as sales tax amount on the taxed bill amount
Return the final bill amount
Else, return -1
Note: Perform case sensitive string comparison
#answers
#objectorientedprogrammingusingpython
#answersdotcom
#abstractlevel3
Assignment on Abstract - Level 3
Problem Statement
Rio Logistics Company provides two categories of services, namely Passenger logistics and Goods logistics.
Some part of the program for this requirement is already given to you. You may need to implement or debug the given code to meet the requirements.
Starter code given to you has three classes – Logistics, PassengerLogistics and GoodsLogistics
Class Description:
Logistics class: Debug and add logic based on details given below
Start reading should be less than end reading
generate_consumer_id(): Attribute, consumer_id should be auto-generated starting from 7001.Use the static variable counter to implement it
PassengerLogistics class: Implement calculate_bill_amount() based on details mentioned below
calculate_bill_amount():
Validate vehicle type and meter reading
If valid,
Generate consumer id
Identify distance travelled based on start reading and end reading
Calculate bill amount based on vehicle type, distance travelled and charge per km
Note: charge per km for first 100km and charge per km for rest of the distance are different. Refer static lists provided in the class
If the bill amount is less than the minimum charge for the vehicle type, consider bill amount to be the minimum charge
Add 5% service tax on bill amount
Return the final bill amount
Else, return -1
GoodsLogistics class: Debug calculate_bill_amount() based on details mentioned below
calculate_bill_amount():
Validate carrier type and meter reading
If valid,
Generate consumer id
Identify distance travelled based on start reading and end reading
Calculate bill amount based on carrier type, distance travelled and charge per km
Note: Charge per kilometer for first 1000kg of goods is given in the table
For every next 1000kg, charge per kilometer should be doubled until 3000kg (eg: 20,40,80 or 30,60,120 etc).
If weight is above 3000kg, then consider charge per kilometer to be Rs.200 irrespective of carrier type
Add 10% service tax on bill amount
Add Rs. 2000 as sales tax amount on the taxed bill amount
Return the final bill amount
Else, return -1
Note: Perform case sensitive string comparison
Комментарии