Built something? We create video reels & spotlights for GitHub projects.Promote your project →
Catalog / aashishsaini / ceo-problem
Public GitHub Catalog Discovered Sep 26, 2026

aashishsaini / ceo-problem

Product code Name Price FR1 Fruit tea £ 3.11 SR1 Strawberries £ 5.00 CF1 Coffee £11.23 Our CEO is a big fan of buy-one-get-one-free offers and of fruit tea. He wants us to add a rule to do this. The COO, though, likes low prices and wants people buying strawberries to get a price discount for bulk purchases. If you buy 3 or more strawberries, the price should drop to £4.50. Our check-out can scan items in any order, and because the CEO and COO change their minds often, it needs to be flexible regarding our pricing rules. The interface to our checkout looks like this (shown in Ruby): co = Checkout.new(pricing_rules) co.scan(item) co.scan(item) Price = co.total Implement a checkout system that fulfils these requirements in Ruby. Test Data Basket: FR1, SR1, FR1, CF1 Total price expected: £22.45 Basket: FR1, FR1 Total price expected: £3.11 Basket: SR1, SR1, FR1, SR1 Total price expected: £16.61

View repository on GitHub ↗ View creator profile Browse directory

About this discovery

This repository is cataloged as part of our automated global GitHub synchronization. Full telemetry, velocity snapshots, and code summaries are scheduled for continuous enrichment.

#8133134GitHub System ID
aashishsainiOrganization / User
PublicVisibility
ActiveCatalog Status

More from aashishsaini

↗

aashishsaini/my-fb-feeds

Task: Create Website with Tabs Based on Facebook Login What the site must have: Signup and Login using Facebook Authentication (Facebook API); Stores user details in a MySql database together with the relationship status; Homepage with Signup / Login only; When user is signed up and logged in he gets a page like the one in the image below (image 1) with a tabbed interface relying on Jquery UI. All must be using: Rails, JQUERY, MYSQL and in AJAX (no page reloading); HOME shows nothing; TAB1 shows user relationship status (you must first save it to the database (when user registers) and serve it from there when user clicks "TAB1"); TAB2 shows whatever you want. Be creative. TAB3 shows latest user status update on Facebook from database (i.e.: you must check latest status on Facebook and save it to database every time user logs in and when user click "TAB3" serve the content directly from database) Please add a logout button.

Discovered
FOR MAINTAINERS

Built something? Put it in front of millions of developers.

We make a short reel about your project and post it across YouTube, Instagram, Threads, and X. Send a link, we do the rest.