// Independent worked listings. Load this chapter with vocabulary.sysml, not with other chapters. package Lch03_01 { private import CoffeeVocabulary::*; // ANCHOR: listing-1 part def Grinder { attribute grindSize : GrindSetting; } part def CoffeeMachine { part grinder : Grinder; } // ANCHOR_END: listing-1 } package Lch03_02 { private import CoffeeVocabulary::*; // ANCHOR: listing-2 part def GrindingStation { part grinder : Grinder; part spareGrinder : Grinder; } // ANCHOR_END: listing-2 } package Lch03_03 { private import CoffeeVocabulary::*; // ANCHOR: listing-3 item def Water; item def CoffeeBeans; item def BrewedCoffee; // ANCHOR_END: listing-3 } package Lch03_04 { private import CoffeeVocabulary::*; private import ScalarValues::Real; private import ScalarValues::String; // ANCHOR: listing-4 attribute def Temperature { attribute value : Real; attribute unit : String; } // ANCHOR_END: listing-4 } package Lch03_05 { private import CoffeeVocabulary::*; private import ScalarValues::Real; // ANCHOR: listing-5 part def Brewer { attribute waterTemp : Temperature; attribute brewPressure : Real; } // ANCHOR_END: listing-5 } package Lch03_06 { private import CoffeeVocabulary::*; // ANCHOR: listing-6 part def CoffeeMachine { part grinder; } // ANCHOR_END: listing-6 } package Lch03_07 { private import CoffeeVocabulary::*; private import ScalarValues::String; // ANCHOR: listing-7 package CoffeeMachineLineup { private import CoffeeMachineDomain::*; part def HomeMachine { part grinder : Grinder; part brewer : Brewer; part waterTank : WaterTank; attribute serialNumber : String; } part def OfficeMachine { part grinder : Grinder; part brewer : Brewer; part waterTank : WaterTank; part secondBrewGroup : Brewer; attribute serialNumber : String; } } // ANCHOR_END: listing-7 } package Lch03_08 { private import CoffeeVocabulary::*; // ANCHOR: listing-8 part def CoffeeMachine { part grinder : Grinder; part brewer : Brewer; } // ANCHOR_END: listing-8 } package Lch03_09 { private import CoffeeVocabulary::*; private import ScalarValues::Real; // ANCHOR: listing-9 part def Motor { attribute powerRating : Real; } part def Grinder { attribute grindSize : GrindSetting; part motor : Motor; } // ANCHOR_END: listing-9 } package Lch03_10 { private import CoffeeVocabulary::*; private import ScalarValues::String; // ANCHOR: listing-10 part def MaintenanceRecord { attribute date : String; ref part servicedGrinder : Grinder; } // ANCHOR_END: listing-10 }