subject

PLS PLS PLS HELP! PL, I RLY NEED HELP In python write a code that create a class called Vehicle. Vehicle class has the following attributes:

name
make
price
It also has the following methods:
ride
_str_

The ride method returns a string “Riding vehicleName” where vehicleName is the name of the vehicle. __str__ or string method should return vehicle name, make, and price when the object is being printed. Initialize all instance variables with default parameter values, so that objects can be created without arguments as well.
Create two subclasses from the Vehicle - PoweredVehicle and Bicycle.
Bicycle has a new attribute bikeType and it could have values like mountain bike, road bike, or BMX etc. Override the __str__ method, so that the user could know the bike name, make, price, and bike type. Bicycle class should have a method called pedal. Simply return the string “Pedaling” from the method. Override the ride method by returning the value “Pedaling my bikeType” where bikeType is the type of your bicycle. You must reuse pedal method inside the ride method. Initialize the instance variables with default parameter values.
PoweredVehicle has a new attribute called registrationNumber that holds the registration number of the vehicle. Also add a method called refuel() that should return the message “Refueling vehicleName”. Replace the vehicleName with the name of the vehicle. Initialize the instance variables with default parameter values.
Create two subclasses from PoweredVehicle - Car and Ship.
Override the ride method in Car and Ship class. From the ride method, return the value “Driving my carName on the road”. Replace carName with your car name. In the ship class return the string “Sailing the shipName over the sea” from the ride method. Where shipName is the name of the ship.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:00
In he example code, what does the title attribute create? a tool tip an element a source a markup
Answers: 1
question
Computers and Technology, 23.06.2019 01:40
You have a linux system that has a 1000gb hard disk drive, which has a 90gb partition containing an ext4 filesystem mounted to the / directory and a 4gb swap partition. currently, this linux system is only used by a few users for storing small files; however, the department manager wants to upgrade this system and use it to run a database application that will be used by 100 users. the database application and the associated data will take up over 200gb of hard disk space. in addition, these 100 users will store their personal files on the hard disk of the system. each user must have a maximum of 5gb of storage space. the department manager has made it very clear that this system must not exhibit any downtime as a result of hard disk errors. how much hard disk space will you require, and what partitions would you need to ensure that the system will perform as needed? where would these partitions be mounted? what quotas would you implement? what commands would you need to run and what entries to /etc/fstab would you need to create? justify your answers.
Answers: 3
question
Computers and Technology, 24.06.2019 01:30
Write a program that asks the user to enter the name of an input file. if the file does not exist, the program should prompt the user to enter the file name again. if the user types quit in any uppercase/lowercase combinations, then the program should exit without any further output.
Answers: 3
question
Computers and Technology, 24.06.2019 07:30
Aproject involves many computing systems working together on disjointed task towards a single goal what form of computing would the project be using
Answers: 3
You know the right answer?
PLS PLS PLS HELP! PL, I RLY NEED HELP In python write a code that create a class called Vehicle. Ve...
Questions
question
Mathematics, 06.09.2019 02:30
question
Mathematics, 06.09.2019 02:30
question
Mathematics, 06.09.2019 02:30
Questions on the website: 13722363