You are to calculate the cost of coffee for a machine that uses both capsules and beans. Write the class EspressoMachine with the property costPerServing of theFloat type. Objects of the class can be created with two secondary constructors.
The first constructor takes two arguments: coffeeCapsulesCount (of Int type) and totalCost (of Float type). The value of the property costPerServing is calculated as the cost of one coffee capsule.
The second constructor takes two arguments: coffeeBeansWeight and totalCost, both of the type Float. Calculating the cost of one serving, take into account that each cup of coffee requires 10 weight units of coffee beans. Using the given coffeeBeansWeight and the totalCost of coffee beans, calculate costPerServing.