Skip to content

1. Create a super class called Car. The Car class has the following fields and methods. int speed; float regularPrice; str color; float getSalePrice(); 2. Create a sub class of Car class and name it as Truck. The Truck class has the following fields and methods. int weight; float getSalePrice(); # If weight>2000, 10% discount. Otherwise, 20% dis…

Notifications You must be signed in to change notification settings

iresh-rajitha/Python-OOP-inheritance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

About

1. Create a super class called Car. The Car class has the following fields and methods. int speed; float regularPrice; str color; float getSalePrice(); 2. Create a sub class of Car class and name it as Truck. The Truck class has the following fields and methods. int weight; float getSalePrice(); # If weight>2000, 10% discount. Otherwise, 20% dis…

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages