Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution #1643

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Solution #1643

wants to merge 2 commits into from

Conversation

yvespy
Copy link

@yvespy yvespy commented Nov 14, 2024

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


Thank you for your hard work on this project! 😊 While your implementation of the Car and CarWashStation classes is mostly correct, there are a couple of critical issues that need to be addressed to fully meet the task requirements:

  1. serve_cars Method Logic: Ensure that this method is intended to call wash_single_car to process a list of cars. Currently, the logic might not align with the task description, which specifies that only cars with a clean_mark less than clean_power should be washed.

  2. wash_single_car Method Functionality: This method is currently processing a list of cars instead of a single car. Please adjust its logic to handle a single car or consider renaming the method to better reflect its current functionality.

Once these issues are resolved, your code will be in great shape! Keep up the great work, and I look forward to seeing the improvements. 🚀

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review button in the Reviewers tab.

app/main.py Outdated

return round(price, 1)

def wash_single_car(self, cars: list) -> float:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wash_single_car method is intended to wash a single car, but it currently processes a list of cars. Consider renaming this method to better reflect its functionality or adjusting its logic to handle a single car as per the task description .

app/main.py Outdated
car.clean_mark = self.clean_power
return total_income

def serve_cars(self, cars: list) -> float:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The serve_cars method should ensure that only cars with clean_mark less than clean_power are washed. This logic is correctly implemented in wash_single_car, but ensure that serve_cars is intended to call this method to process a list of cars .

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job on implementing the Car and CarWashStation classes! 🚗🚿 Your code meets the task requirements and constraints, and you can proceed with this implementation. However, there are a few critical issues that need to be addressed to ensure the functionality is robust:

  1. serve_cars Method Logic: The logic for washing cars is correctly implemented, but ensure that it consistently checks if the car's clean_mark is less than clean_power before washing.

  2. wash_single_car Method Functionality: This method is correctly processing a single car, aligning with the task requirements.

  3. Car Class: The Car class is well-implemented with the necessary attributes: comfort_class, clean_mark, and brand.

  4. CarWashStation Class: The CarWashStation class includes the essential attributes: distance_from_city_center, clean_power, average_rating, and count_of_ratings.

  5. calculate_washing_price Method: Ensure the washing price is calculated using the specified formula and rounded to one decimal place.

  6. rate_service Method: This method correctly updates the average_rating and count_of_ratings.

While your code is in good shape, please review the comments to improve your code further. Addressing these critical issues will help you avoid similar problems in the future. Keep up the good work and continue learning from your experiences! 🌟

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants