C# Class Marmalade_Global.WeeklyProduct

Exibir arquivo Open project: DMOE15C/project-marmelade Class Usage Examples

Public Methods

Method Description
CalculateTotalPriceForProduct ( ) : double

Calculation on the total buying price for this product, it uses a method from Product.cs to get the price needed on this product, and then times it with the TotalKgAmount.

CalculateTotalSellingPrice ( ) : double

Calculation on the total selling price for this product, it uses a method from Product.cs to get the selling price needed on this product, and then times it with the TotalKgAmount.

ToString ( ) : string
WeeklyProduct ( Product product, double totalKgAmount ) : System

Full-args constructor, taking 2 parameters, and get the TotalSellingPrice by using the calculation place within this class.

Method Details

CalculateTotalPriceForProduct() public method

Calculation on the total buying price for this product, it uses a method from Product.cs to get the price needed on this product, and then times it with the TotalKgAmount.
public CalculateTotalPriceForProduct ( ) : double
return double

CalculateTotalSellingPrice() public method

Calculation on the total selling price for this product, it uses a method from Product.cs to get the selling price needed on this product, and then times it with the TotalKgAmount.
public CalculateTotalSellingPrice ( ) : double
return double

ToString() public method

public ToString ( ) : string
return string

WeeklyProduct() public method

Full-args constructor, taking 2 parameters, and get the TotalSellingPrice by using the calculation place within this class.
public WeeklyProduct ( Product product, double totalKgAmount ) : System
product Product
totalKgAmount double
return System