Question: Contents Attributes: name: Stringdensity: doublevalue: double Methods: getName ( ) : StringgetDensity ( ) : doublegetValue ( ) : doublesetValue ( value: double ) :
Contents
Attributes:
name: Stringdensity: doublevalue: double
Methods:
getName: StringgetDensity: doublegetValue: doublesetValuevalue: double: voidtoString: String
Container abstract
Attributes:
thickness: doubledensity: double
Methods:
getThickness: doublegetDensity: doublecalculateWallWeight: doublecalculateInteriorVolume: double abstractcalculateExteriorVolume: double abstracttoString: String
Cylinder extends Container
Attributes:
radius: doubleheight: double
Methods:
calculateInteriorVolume: doublecalculateExteriorVolume: doubletoString: String
TrapezoidalBox extends Container
Attributes:
upperLength: doublelowerLength: doublewidth: doubleheight: double
Methods:
calculateInteriorVolume: doublecalculateExteriorVolume: doubletoString: String
RollingStock abstract
Attributes:
owner: Stringid: intbaseWeight: double
Methods:
getOwner: StringgetId: intgetBaseWeight: doubletoString: String
Engine extends RollingStock
Attributes:
pullingCapacity: double
Methods:
getPullingCapacity: doubletoString: String
FreightCar extends RollingStock
Attributes:
loadFactor: doublecontainer: Containercontents: Contents
Methods:
getLoadFactor: doublesetLoadFactorloadFactor: double: voidcalculateTotalWeight: doublecalculateTotalValue: doubletoString: String
Train
Attributes:
engine: EngineengineerName: StringfreightCars: List
Methods:
addFreightCarcar: FreightCar: voidremoveFreightCarid: int: voidchangeLoadFactorid: int, loadFactor: double: voidcalculateTotalWeight: doublecalculateTotalValue: doubletoString: String
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
