Question: I want it to be solved using python programming language and with clear explanations. Thanks 4. (30 points) Create a class to model a power

I want it to be solved using python programming language and with clear explanations. Thanks  I want it to be solved using python programming language and

4. (30 points) Create a class to model a power drill, like the one in the picture (https://openelipart.org/detail/216781/electric-screwdriver). The drill has a rechargeable battery with a power level between 0 and 100. The drill also takes drill bits, numbered from 1 to 20. Your class will powid th following methods: init_(self): This is the constructor of the class. At creation, the power drilled is fully charge, does not have a drill bit attached. (5 points) sOutOf Power(self): returns True if the battery has been completely drained. Otherwise, it returns False isBitAttached(self): returns True if the power drill has a drill bit attached to it. (2.5 points) . (2.5 points) setBit(self, bit_number): installs a bit, of number bit_number, in the power drill. (5 points) drill self, seconds): This method simulates turning the drill on for time indicated by the parameter seconds (which should be a positive number). Drilling can occur only if the battery level is at least (seconds 2) and the power drill has a drill bit attached to it.If we can drill, this method reduces the power level of the battery by (seconds 2) units recharge(self, seconds): this method increases the power level of the battery by (seconds 2) units. The battery should not overcharge because it could explode. (10 points) (5 points)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!