Skip to content

Add new type of customer that just looks at books#5

Open
sweep-ai-deprecated[bot] wants to merge 4 commits intomainfrom
sweep/looker-customer
Open

Add new type of customer that just looks at books#5
sweep-ai-deprecated[bot] wants to merge 4 commits intomainfrom
sweep/looker-customer

Conversation

@sweep-ai-deprecated
Copy link
Contributor

Description

This PR adds a new type of customer, LookerCustomer, to the existing customer class. LookerCustomer is a customer who only looks at books without buying or ordering them. The LookerCustomer class inherits from the Customer class and has an additional attribute, a vector of books that the customer has looked at. The interaction method in the LookerCustomer class is overridden to implement the behavior of just looking at books.

The Simulation class has been updated to include LookerCustomers in the simulation. The select_random_data method now generates LookerCustomers along with regular customers. The run method has been modified to handle interactions with LookerCustomers.

Summary

  • Created a new class LookerCustomer that inherits from the Customer class.
  • Added a new private attribute, a vector of books, to the LookerCustomer class.
  • Implemented a public method to add a book to the looked at list in the LookerCustomer class.
  • Overrode the interaction method in the LookerCustomer class to implement the behavior of just looking at books.
  • Modified the select_random_data method in the Simulation class to generate LookerCustomers for the simulation.
  • Updated the run method in the Simulation class to handle interactions with LookerCustomers.

Fixes #4.


To checkout this PR branch, run the following command in your terminal:

git checkout {pull_request.branch_name}

🎉 Latest improvements to Sweep:

  • Use Sweep Map to break large issues into smaller sub-issues, perfect for large tasks like "Sweep (map): migrate from React class components to function components"
  • Getting Sweep to format before committing! Check out Sweep Sandbox Configs to set it up.
  • We released a demo of our chunker, where you can find the corresponding blog and code.

💡 To get Sweep to edit this pull request, you can:

  • Leave a comment below to get Sweep to edit the entire PR
  • Leave a comment in the code will only modify the file
  • Edit the original issue to get Sweep to recreate the PR from scratch

@sweep-ai-deprecated sweep-ai-deprecated bot added the sweep Assigns Sweep to an issue or pull request. label Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sweep Assigns Sweep to an issue or pull request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sweep: create a new type of customer that just looks at books

0 participants