cars

package
v0.0.0-...-1e41176 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCarsRoute

func GetCarsRoute()

Types

type Car

type Car struct {
	// contains filtered or unexported fields
}

func NewCar

func NewCar(name string, consumption float64) *Car

func (*Car) CalculateTotalConsumption

func (c *Car) CalculateTotalConsumption(distance float64) float64

*

  • Calculate the total gasoline consumption of a car for a given distance.
  • @param distance distance in km
  • @return the total gasoline consumption in l

type Gasoline

type Gasoline struct {
	// contains filtered or unexported fields
}

func NewGasoline

func NewGasoline(name string, price float64) Gasoline

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL