Skip to content

The barista project - making it easy to program your next espresso

Notifications You must be signed in to change notification settings

PGBSNH19/project-the-barista

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Project 1 - The Barista

For the procedures used in this project see : Procedures

Barista API

In this projects should you create an Fluent API for a barista to create espresso based drinks using code. To get into the Barista domain have a look at The Ultimate Beginner's Guide to Espresso they also have a A Beginner's Guide to Espresso video serie (5 parts).

The API should be made for a barista-programmer, and he/she should be able to produce the following six cofee types using the API:

Six coffee types

The final method of the API should return a beverage-object of the correct type, depending on the methods which have been executed.

An example of how the API could look (this is pseudo-code!!):

IBeverage espresso = new FluentEspresso()
                            .AddWater(20)
                            .AddBeans(new Bean(){ 
                                AmountInG = 5,
                                Sort = CoffeSorts.Robusta})
    						.Validate(e => e.Temerature > 90)
                        .ToBeverage();
// espresso is type of Espresso

IBeverage latte = new FluentEspresso()
                            .AddBeans(new Bean(){ 
                                AmountInG = 5,
                                Sort = CoffeSorts.Robusta})
                            .GrindBeans()
                            .AddWater(20)
                            .AddMilk()
       						.Validate(e => e.Temerature < 80)
                        .ToBeverage();
// latte is type of Latte

See the IBeverage in code project : BaristaApi/Beverage.cs

The solution

The solution should cover the following:

  • Encapsulation, Inheritance, Polymorphism, Abstraction
  • A fluent api, which uses some lambda expressions
  • Unit tests, is a must that the solution contains some unit tests

Extra

  • The usage of attributes

About

The barista project - making it easy to program your next espresso

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages