You are given two variables , already declared and assigned values , one of type double , named totalWeight, containing the weight of a shipment, and the other of type int, named quantity, containing the number of items in the shipment. Write an expression that calculates the weight of one item.

LANGUAGE: JAVA

CHALLENGE:
You are given two variables , already declared and assigned values , one of type double , named totalWeight, containing the weight of a shipment, and the other of type int, named quantity, containing the number of items in the shipment. Write an expression that calculates the weight of one item.

SOLUTION:

LANGUAGE: JAVA

CHALLENGE:
You are given two variables , already declared and assigned values , one of type double , named totalWeight, containing the weight of a shipment, and the other of type int, named quantity, containing the number of items in the shipment. Write an expression that calculates the weight of one item.

SOLUTION:

totalWeight / quantity