fix: add more details for bonus part
This commit is contained in:
@@ -118,7 +118,14 @@ Add a `HybridCar` class
|
|||||||
- Create a `HybridCar` class that extends `Car`.
|
- Create a `HybridCar` class that extends `Car`.
|
||||||
- It will need variables for both battery level and fuel level
|
- It will need variables for both battery level and fuel level
|
||||||
- Implement `Refuelable` and `Chargeable` together
|
- Implement `Refuelable` and `Chargeable` together
|
||||||
- (Optional) Override methods to manage both power sources (driving drains battery first, then gas)
|
- Service logic for HybridCar:
|
||||||
|
```
|
||||||
|
needsService(): return true if mileage > 10000
|
||||||
|
performService():
|
||||||
|
Print "Engine oil changed and battery system checked"
|
||||||
|
Reset fuelLevel to 100
|
||||||
|
Reset chargeLevel to 100
|
||||||
|
```
|
||||||
|
|
||||||
## Workflow
|
## Workflow
|
||||||
1. Fork the repository to your own Git account
|
1. Fork the repository to your own Git account
|
||||||
|
|||||||
Reference in New Issue
Block a user