
- By Liz Baker
- ·
- Posted 18 Feb 2023
Screenkata – Mars Rover in Rust
Join Jocelyn Facchini, Senior Software Craftsperson and developer at Codurance, as he focuses this week on the Rust language. In this screen kata he..
This week, Emmanuel Valverde has set us another new kata to work through. Building on last week's kata, ATM machine, he has set us the task of building a Shopping Cart for an online grocery shop.
Once again, the idea is to build this in an iterative way.
You are provided with different products that shoppers can choose from. You are given the name of the item, its cost to the shop, the percentage revenue / markup on the product, the price per unit (cost + revenue), the tax rate for the item and then the final price to the consumer.
Depending on promo codes, shoppers may get between a 5 and 10% discount.
Customers need to be able can see their cart, add products to it and then obtain a final list of the products they have added (and how many of each), whether there is a promotion, total number of products and total price.
As this is TDD orientated, the idea is to create this outcome in individual iterations where you start by returning the empty basket, then the customer adds single items to it, gets their total then adds multiples of items and finally you add in discounts.
To add in a challenge (as if you needed it) Emmanuel also suggests writing a possible API for the shopping cart along with the option to add in images or not of the products.
Getting set up can be the roadblock to starting a kata. In our screenkatas you can join our Software Craftspeople and let them show you how to set up your repositories for Java, PHP, Python and Typescript. For other languages, check out our guide on GitHub.
Love our #kataday challenges? Then find them all here and don't forget that our Katalyst portal is filled with programming problems to expand and sharpen your coding skills.
Join Jocelyn Facchini, Senior Software Craftsperson and developer at Codurance, as he focuses this week on the Rust language. In this screen kata he..
Join Mattsi Janksy, Software Craftsperson and developer at Codurance, as he focuses this week on the Rust language. In this screen kata he shows you..
String Calculator is a great follow up Test-Driven Development (TDD) kata to two of our favourite katas; Fizz Buzz andLeap Year.
Join our newsletter for expert tips and inspirational case studies
Your welcome email is on its way! You can pick the emails you’d like to receive by clicking the link to the Preference Centre.
Join our newsletter for expert tips and inspirational case studies
Your welcome email is on its way! You can pick the emails you’d like to receive by clicking the link to the Preference Centre.