wayfair L4 coding round

Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2024-03-11Added By Anonymous
Source: Link
Company: Wayfair
Role: L4
Interview Stage: Coding Round
Location: unknown
Year: unknown

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<Ipackage> getPackages()
}

class Package implements Ipackage{

}

class Cargo implements IShipment{

}

you have to complete this in 40 mins.

good luck.
Comments