The Shipping subsystem contains those classes that deal with the work of packing and shipping orders to customers. The class diagram for this subsystem is shown in Figure B.7. Figure B.7. Shipping Subsystem Class Diagram Shipment A Shipment is prepared to send a customer's product selections to the customer. State Machine See Figure B.8. Figure B.8. Shipment Statechart Attributes shipmentID: arbitrary_id A unique ID assigned by the bookstore to the shipment. shippingCompany: same_as The shipping company who delivers the shipment. This attribute, together with the trackingNumber, also uniquely identifies a shipment. trackingNumber: ShipmentTrackingNumber The package tracking number (sometimes called the "Airbill Number") assigned to the shipment by the package delivery company. recipient: PersonalName The customer to whom the shipment will be delivered. deliveryAddress: MailingAddress Where to deliver the order (the address on the shipment). contactPhone: TelephoneNumber A telephone number used to contact the customer about the shipment. timePrepared: date When the shipment was prepared (the box was packed and made ready for shipment). timePickedUp: date When the package delivery company picks up the shipment from the bookstore shipping department. timeDelivered: date The time that the package delivery company delivers the shipment to the customer, as reported by the package delivery company. Associations & Relationships R6 DELIVERS CONTENTS OF 1 Order When an order's payment is approved, a Shipment is created and associated to the Order. R9 INCLUDES 1..* ProductSelection When an order is paid for, the selections in the order are shipped to the customer. This association identifies which selections are shipped in which shipment. Some selections are not shipped from the bookstore because they are selections of special-order products shipped directly from the publisher. It is even possible for a paid order to have no shipment. However, a shipment must contain at least one selection. Future versions of this system will also support partial shipments in which items are shipped only when there is sufficient stock on hand. In that situation, we will need to identify which shipments contain which selections. This association will capture this information. R21 IS DELIVERED BY 1 ShippingCompany Each shipment is sent to the customer via a delivery company. Ordinarily all shipments are sent using the same delivery company; however, under special circumstances another company may deliver the shipment. R22 WAS PACKED BY 0..1 WarehouseClerk This association captures the history of which clerk packed which shipment. The bookstore needs to be able to track the work actually done by each clerk and to identify which clerk packed which shipment. Although clerks are generally very careful, they do make mistakes. R23 IS CURRENTLY BEING PACKED BY 0..1 ShippingClerk This association captures a shipping clerk's current assignment. When a shipping clerk is assigned to pack and ship a shipment, the clerk is linked to the shipment. When the clerk completes the job, this link goes away. However, the history of all jobs packed by the clerk is captured in association R22. R24 IS PACKED AND SHIPPED AT 1 Warehouse Each shipment is assigned to be packed at a warehouse based on two criteria: (1) whether the warehouse has the product selections in stock and (2) which warehouse is closest to the customer in terms of shipping costs and delivery time. An outside logistics system is responsible for computing the shipping time and costs. ShippingCompany A shipping company is an organization that contracts with the bookstore to deliver merchandise ordered to customers. Generally, all shipments are sent via a single company, although in special circumstances other shipping companies can be used. Attributes companyName: string The name of the company. trackingWebsite: WebsiteURL The webpage provided by the shipping company that provides package tracking information. customerServicePhone: TelephoneNumber The telephone number customers can call for tracking, billing, or pickup information. This is generally not the same as the phone number of the corporate account manager. localDispatchPhone: TelephoneNumber The telephone number of the local dispatch office. localOffice: MailingAddress The address of the shipping company office that serves the bookstore warehouse. localContact: PersonalName The name of the account manager at the shipping company's local office. Associations & Relationships R21 DELIVERS 0..* Shipment Each shipment is sent to the customer via a delivery company. Ordinarily all shipments are sent using the same delivery company; however, under special circumstances another company may deliver the shipment. WarehouseClerk A warehouse clerk is any employee of the bookstore who can be assigned to either pack and ship orders or to restock merchandise in the warehouse. Attributes clerkID: arbitrary_id The clerk's company ID number. clerkName: PersonalName The clerk's name. Associations & Relationships R22 PACKED 0..* Shipment This association captures the history of which clerk packed which shipment. The bookstore needs to be able to track the work actually done by each clerk and to identify which clerk packed which shipment. Although clerks are generally very careful, they do make mistakes. R27 IS A SUPERCLASS OF StockClerk IS A SUPERCLASS OF OffDutyClerk IS A SUPERCLASS OF ShippingClerk In the bookstore, the warehouse makes a policy of hiring clerks who can take on several roles, so that the shipping clerk is really just one kind of a more general warehouse clerk. Sometimes a warehouse clerk may be processing shipments, at other times the same clerk may be assigned to restock product, and at still other times the clerk may be off duty. R25 WORKS IN 1 Warehouse Each clerk works in one warehouse. Warehouse A facility where merchandise is stored for shipment to customers. Warehouses are located in specific locations throughout the country (and soon, the world). Note that the instance-based statechart for the Warehouse serves as an assigner for Shipping Clerks. State Machine See Figure B.9 Figure B.9. Warehouse Statechart (Serving as a Shipping Clerk Assigner) Attributes warehouseName: string The name of the warehouse, generally the name of the city or town in which the warehouse is located. warehouseLocation: MailingAddress The actual physical location of the warehouse. Associations & Relationships R24 IS ORIGIN POINT FOR 0..* Shipment Each shipment is assigned to be packed at a warehouse based on two criteria: (1) whether the warehouse has the product selections in stock and (2) which warehouse is closest to the customer in terms of shipping costs and delivery time. An outside logistics system is responsible for computing the shipping time and costs. R25 EMPLOYS 1..* WarehouseClerk Each clerk works in one warehouse. ShippingClerk A Shipping Clerk is a Warehouse Clerk who is assigned to pack and ship customer orders. The Shipping Clerk, once assigned to pack a shipment, gets the stock for the shipment, packs the box, affixes the shipping label (with a tracking number assigned by the delivery company), and puts the shipment in a bin for pickup by the delivery company. The actual assignment of clerks to shipments is handled by the state machine for the Warehouse class. Only shipping clerks on duty at a given warehouse may be assigned to shipments that originate from that warehouse. State Machine See Figure B.10 Figure B.10. ShippingClerk Statechart Attributes awaitingAssignment: boolean True if the shipping clerk is idle and able to be assigned to another shipping job. Associations & Relationships R27 IS A SUBCLASS OF WarehouseClerk In the bookstore, the warehouse makes a policy of hiring clerks who can take on several roles, so that the shipping clerk is really just one kind of a more general warehouse clerk. Sometimes a warehouse clerk may be processing shipments, at other times the same clerk may be assigned to restock product, and at still other times the clerk may be off duty. R23 IS CURRENTLY PACKING 0..1 Shipment This association captures a shipping clerk's current assignment. When a shipping clerk is assigned to pack and ship a shipment, the clerk is linked to the shipment. When the clerk completes the job, this link goes away. However, the history of all jobs packed by the clerk is captured in association R22. StockClerk A Stock Clerk is a Warehouse Clerk who is assigned to restock product in the warehouse. The bookstore system only needs to track stock insomuch as it can determine which clerks on-duty at the warehouses are currently available to pack and ship customer orders. (Clerks assigned to stock jobs are not available to pack and ship customer orders.) Attributes idle: boolean Whether the clerk is assigned to any warehouse restocking task or not. Associations & Relationships R27 IS A SUBCLASS OF WarehouseClerk In the bookstore, the warehouse makes a policy of hiring clerks who can take on several roles, so that the shipping clerk is really just one kind of a more general warehouse clerk. Sometimes a warehouse clerk may be processing shipments, at other times the same clerk may be assigned to restock product, and at still other times the clerk may be off duty. OffDutyClerk An OffDutyClerk is a clerk who is currently not on duty at the warehouse (sick, vacation, not on shift) and is therefore not available to restock the warehouse or to pack and ship orders. Attributes Associations & Relationships R27 IS A SUBCLASS OF WarehouseClerk In the bookstore, the warehouse makes a policy of hiring clerks who can take on several roles, so that the shipping clerk is really just one kind of a more general warehouse clerk. Sometimes a warehouse clerk may be processing shipments, at other times the same clerk may be assigned to restock product, and at still other times the clerk may be off duty. ShipmentItem Each ShipmentItem represents an individual component of a shipment. If sufficient merchandise is in stock when an order is shipped, then a ShipmentItem is created with a quantity equal to the quantity requested. If there is not sufficient merchandise in stock, then the ShipmentItem is created to ship only what is in stock. Later, when additional product is received from the publisher, subsequent ShipmentItems are created. Attributes quantityShipped: Count The number of units shipped to the customer in the shipment. Generally, this is the same as the number ordered, but if merchandise is back-ordered then an order is sent in multiple shipments. Associations & Relationships R9 formalizes association between Shipment and ProductSelection When an order is paid for, the selections in the order are shipped to the customer. This association identifies which selections are shipped in which shipment. Some selections are not shipped from the bookstore because they are selections of special-order products shipped directly from the publisher. It is even possible for a paid order to have no shipment. However, a shipment must contain at least one selection. Future versions of this system will also support partial shipments in which items are shipped only when there is sufficient stock on hand. In that situation, we will need to identify which shipments contain which selections. This association will capture this information. |