Another approach is to create a converter component, which is a component that consumes an action of one type and produces a property of another type.
另一种方法是创建转换器组件,该组件使用一种类型的行为并产生另一种类型的属性。
The temperature Converter component has a method called convert which accepts the given temperature in Celsius as input and returns the corresponding temperature in Fahrenheit as the output.
TemperatureConverter组件具有名为convert的方法,该方法接受以摄氏度表示的给定温度,并将返回对应的华氏度温度作为输出。
The temperature Converter component has a method called convert which accepts the given temperature in Celsius as input and returns the corresponding temperature in Fahrenheit as the output.
TemperatureConverter组件具有名为convert的方法,该方法接受以摄氏度表示的给定温度,并将返回对应的华氏度温度作为输出。
应用推荐