wayfair L4 coding round

Anonymous User
2330
Mar 11, 2024
Mar 12, 2024

given list of packages weight, height, width, length, calculate tansport charges, service charges
package type, transport , service charges
Standard | 0.5 * volume| 0.5 * wight +0.5* distance
Hazardous | 0.75 * volume| 0.75 * wight +0.75* distance
Fragile| 0.625 * volume| 0.625 * wight +0.625* distance

given couple of interfaces and methods to find tansport charges and service charges by package type and for overall cargo

interface Ipackage {
getters and setters
}

interface IShipment{
//methods to implement calculation logic
void insert(Ipackage pkg)
void remove(int id)
Map<String, Integer> getTotalCosts()
List getPackages()
}

class Package implements Ipackage{

}

class Cargo implements IShipment{

}

you have to complete this in 40 mins.

good luck.

Comments (7)