WeCare insurance company wants to calculate premium of vehicles. Vehicles are of two types – "Two Wheeler" and "Four Wheeler". Each vehicle is identified by vehicle id, type, cost and premium amount. Premium amount is 2% of the vehicle cost for two wheelers and 6% of the vehicle cost for four wheelers. Calculate the premium amount and display the vehicle details.
Identify the class name and attributes to represent vehicles.
calculate_premium()
vehicle_cost
TwoWheeler
vehicle_type
vehicle_id
Vehicle
premium_amount
FourWheeler
premium_percentage
calculate_vehicle_cost()
__init__()
display_vehicle_details()
Write a Python program to implement the class chosen with its attributes and methods.
SOLUTION:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 Comments