The 1000 steps program to MDriven Chapter 9
No edit summary
No edit summary
Line 8: Line 8:
|Title
|Title
|Content
|Content
|Time(segment start)
|Time(Segment Start)
|Youtube Link
|-
|-
|Introduction
|Introduction
|Introduction
|Introduction
|00:00
|[https://www.youtube.com/embed/MPqx5af3QCM Introduction]
|[https://www.youtube.com/embed/MPqx5af3QCM Introduction]
|-
|-
|Aligning items
|Aligning items
|How to align Items in the ViewModels
|How to align Items in the ViewModels
|00:27
|[https://www.youtube.com/embed/MPqx5af3QCM?start=27 Aligning items at 00:27]
|[https://www.youtube.com/embed/MPqx5af3QCM?start=27 Aligning items at 00:27]
|-
|-
|Inheritance
|Inheritance
|Generalization mode, inheritance, superclasses, subclasses
|Generalization mode, inheritance, superclasses, subclasses
|05:22
|[https://www.youtube.com/embed/MPqx5af3QCM?start=322 Inheritance at 05:22]
|[https://www.youtube.com/embed/MPqx5af3QCM?start=322 Inheritance at 05:22]
|-
|-
|Abstract classes
|Abstract classes
|Abstract classes
|Abstract classes
|14:30
|[https://www.youtube.com/embed/MPqx5af3QCM?start=870 Abstract classes at 14:30]
|[https://www.youtube.com/embed/MPqx5af3QCM?start=870 Abstract classes at 14:30]
|-
|-
|Repetition
|Repetition
|More inheritance/repetition
|More inheritance/repetition
|20:30
|[https://www.youtube.com/embed/MPqx5af3QCM?start=1230 Repetition at 20:30]
|[https://www.youtube.com/embed/MPqx5af3QCM?start=1230 Repetition at 20:30]
|-
|-
|Statemachines
|Statemachines
|Statemachines intro, states
|Statemachines intro, states
|27:27
|[https://www.youtube.com/embed/MPqx5af3QCM?start=1647 Statemachines at 27:27]
|[https://www.youtube.com/embed/MPqx5af3QCM?start=1647 Statemachines at 27:27]
|-
|-
|Triggers and entry
|Triggers and entry
|Statemachines, triggers, and entry actions
|Statemachines, triggers, and entry actions
|30:45
|[https://www.youtube.com/embed/MPqx5af3QCM?start=1845 Triggers and entry at 30:45]
|[https://www.youtube.com/embed/MPqx5af3QCM?start=1845 Triggers and entry at 30:45]
|-
|-
|Guards
|Guards
|Statemachines, guards
|Statemachines, guards
|37:30
|[https://www.youtube.com/embed/MPqx5af3QCM?start=2250 Guards at 37:30]
|[https://www.youtube.com/embed/MPqx5af3QCM?start=2250 Guards at 37:30]
|-
|-
|Class actions for triggers
|Class actions for triggers
|Statemachines, Class actions for triggers
|Statemachines, Class actions for triggers
|48:03
|[https://www.youtube.com/embed/MPqx5af3QCM?start=2883 Class actions for triggers at 48:03]
|[https://www.youtube.com/embed/MPqx5af3QCM?start=2883 Class actions for triggers at 48:03]
|-
|-
|Webapplication example
|Webapplication example
|Showing statemachines in the webapplication
|Showing statemachines in the webapplication
|50:41
|[https://www.youtube.com/embed/MPqx5af3QCM?start=3041 Webapplication example at 50:41]
|[https://www.youtube.com/embed/MPqx5af3QCM?start=3041 Webapplication example at 50:41]
|}
|}

Revision as of 12:43, 27 January 2023

This is Chapter 9. Here is the first part: The 1000 steps program to MDriven, Chapter 8 (the previous chapter)

You can find the video here: https://youtu.be/MPqx5af3QCM

Video 9: MDrivenEducationVideo - Chapter 9: Inheritance and Statemachines

Title Content Time(Segment Start)
Introduction Introduction Introduction
Aligning items How to align Items in the ViewModels Aligning items at 00:27
Inheritance Generalization mode, inheritance, superclasses, subclasses Inheritance at 05:22
Abstract classes Abstract classes Abstract classes at 14:30
Repetition More inheritance/repetition Repetition at 20:30
Statemachines Statemachines intro, states Statemachines at 27:27
Triggers and entry Statemachines, triggers, and entry actions Triggers and entry at 30:45
Guards Statemachines, guards Guards at 37:30
Class actions for triggers Statemachines, Class actions for triggers Class actions for triggers at 48:03
Webapplication example Showing statemachines in the webapplication Webapplication example at 50:41

In this chapter, we introduce UML inheritance and UML statemachines.

Chapter 9: Inheritance and Statemachines

265. Remove the 20pixel margin on the buttons and apply Align Items property End instead, to make everything end up on the bottom line.

266. Test out combinations of Justify content and Align Items, and determine to familiarize yourself with ways to control the flow of UI widgets.

267. Introduce the new class CarDealer.

268. Introduce the new class CarOwner.

269. Add generalization arrows from CarDealer to CarOwner and from Person to CarOwner.

270. Add the Attribute Name:String to CarOwner and save. Notice the error. Make sure you understand why Name is reported as doublet. Fix it by removing name of Person.

271. Make sure you understand Subclass and Superclass. Look up these articles on the wiki:

272. Add a new association from CarOwner to Car. Name the Cars end CurrentlyOwnedCars.

273. Delete the old link with currently owned car. Update the autoforms. Save and check for errors.

274. Delete the Combobox that showed the now-removed currently owned car in the Person form.

275. Add a new class: CarTransferOwnershipDocument, and a new association from Car(0..1) to CarTransferOwnershipDocument(*)

276. Add an association from CarOwner to CarTransferOwnershipDocument. Call the link DocumentsForSales(*) and Seller(0..1)

277. Add another association from CarOwner to CarTransferOwnershipDocument. Call the link DocumentsForPurchase(*) and Buyer(0..1)

278. Add CarFactory and make it a subclass of CarOwner.

279. Add ScrapYard and make it a subclass of CarOwner.

280. Add a statemachine on Class Car.

281. Add a state in the statemachine of the car called BrandNew.

282. Add another state: InOwnershipTransaction.

283. Add a Transition arrow from BrandNew to InOwnershipTransaction.

284. Call the trigger of the transition InitiateSale.

285. Add yet another state called OwnershipStable.

286. Add a transition from InOwnershipTransaction to OwnershipStable. Name the trigger CloseSale.

287. Add a transition from OwnershipStable to InOwnershipTransaction. Reuse the trigger InitiateSale on this transition.

288. Create an Entry Action in the state InOwnerShipTransaction. Create a CarTransferOwnershipDocument and add it to the cars list of CarTransferOwnershipDocuments. Also, assign the seller of the new CarTransferOwnershipDocument to the current owner of the Car.

289. Add an association from CarTransferOwnershipDocument to Car. Call the single-end: CurrentTransaction. Set the Cars end to not Navigable.

290. In the Entry Action, in the state InOwnerShipTransaction, assign the CurrentTransation to the created document.

291. Go to Guard of CloseSale and check that the current transaction has a Buyer.

292. In the OwnershipStable, add an Entry action that removes the car from Seller's CurrentlyOwnedCars and add it to the Buyer's CurrentlyOwnedCars.

293. In the OwnershipStable, add an Entry action, and add an update of the Seller's CarsOwnerUsedToOwn.

294. On the transition between BrandNew and InOwnerShipTransaction, add a guard that checks that there is a CarOwner.

295. On the InitiateSale trigger, add a ClassAction for trigger.

296. On the CloseSale trigger, add a ClassAction for trigger.

297. Refresh the AutoForms.

298. Save and test on the web. Create a CarFactory. Call it BWM in Munich. Add a Car to this CarFactory.

299. Initiate the Sale and check that you get a CarTransferOwnershipDocument.

300. Assign a buyer in the CarTransferOwnershipDocument, then close the sale. Check that ownership has switched.

301. Set the default representation of CarOwner to self.Name

Chapter 10

The_1000_steps_program_to_MDriven_Chapter_10

This page was edited 30 days ago on 04/12/2024. What links here