-
Notifications
You must be signed in to change notification settings - Fork 0
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…
iresh-rajitha/Python-OOP-inheritance
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 0
No packages published