[{"data":1,"prerenderedAt":3693},["ShallowReactive",2],{"item-lessons-light-ch26-architecture-takeaways":3,"item-examples-light-ch26-architecture-takeaways":444,"item-exercises-light-ch26-architecture-takeaways":753,"item-lesson-full-ch26-architecture-takeaways-26":1070,"item-example-full-ch26-architecture-takeaways-26":1747,"item-exercise-full-ch26-architecture-takeaways-26":2013},[4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160,164,168,172,176,180,184,188,192,196,200,204,208,212,216,220,224,228,232,236,240,244,248,252,256,260,264,268,272,276,280,284,288,292,296,300,304,308,312,316,320,324,328,332,336,340,344,348,352,356,360,364,368,372,376,380,384,388,392,396,400,404,408,412,416,420,424,428,432,436,440],{"path":5,"title":6,"stem":7},"\u002Fshockwave-curriculum\u002Flessons\u002Fch01-why-java-for-frc\u002F1-why-java-for-frc","Why Java for FRC?","shockwave-curriculum\u002Flessons\u002Fch01-why-java-for-frc\u002F1.1-why-java-for-frc",{"path":9,"title":10,"stem":11},"\u002Fshockwave-curriculum\u002Flessons\u002Fch01-why-java-for-frc\u002F2-intro-to-algorithms-programming-and-compilers","Intro to Algorithms, Programming and Compilers","shockwave-curriculum\u002Flessons\u002Fch01-why-java-for-frc\u002F1.2-intro-to-algorithms-programming-and-compilers",{"path":13,"title":14,"stem":15},"\u002Fshockwave-curriculum\u002Flessons\u002Fch02-variables-and-types\u002F1-variables-and-data-types","Variables & Data Types","shockwave-curriculum\u002Flessons\u002Fch02-variables-and-types\u002F2.1-variables-and-data-types",{"path":17,"title":18,"stem":19},"\u002Fshockwave-curriculum\u002Flessons\u002Fch02-variables-and-types\u002F2-expressions-and-output","Expressions & Output","shockwave-curriculum\u002Flessons\u002Fch02-variables-and-types\u002F2.2-expressions-and-output",{"path":21,"title":22,"stem":23},"\u002Fshockwave-curriculum\u002Flessons\u002Fch02-variables-and-types\u002F3-assignment-and-input","Assignment & Input","shockwave-curriculum\u002Flessons\u002Fch02-variables-and-types\u002F2.3-assignment-and-input",{"path":25,"title":26,"stem":27},"\u002Fshockwave-curriculum\u002Flessons\u002Fch02-variables-and-types\u002F4-casting-and-ranges-of-values","Casting & Ranges of Values","shockwave-curriculum\u002Flessons\u002Fch02-variables-and-types\u002F2.4-casting-and-ranges-of-values",{"path":29,"title":30,"stem":31},"\u002Fshockwave-curriculum\u002Flessons\u002Fch02-variables-and-types\u002F5-compound-assignment-operators","Compound Assignment Operators","shockwave-curriculum\u002Flessons\u002Fch02-variables-and-types\u002F2.5-compound-assignment-operators",{"path":33,"title":34,"stem":35},"\u002Fshockwave-curriculum\u002Flessons\u002Fch03-apis-libraries-and-documentation\u002F1-apis-and-libraries","APIs and Libraries","shockwave-curriculum\u002Flessons\u002Fch03-apis-libraries-and-documentation\u002F3.1-apis-and-libraries",{"path":37,"title":38,"stem":39},"\u002Fshockwave-curriculum\u002Flessons\u002Fch03-apis-libraries-and-documentation\u002F2-documentation-with-comments-and-preconditions","Documentation with Comments and Preconditions","shockwave-curriculum\u002Flessons\u002Fch03-apis-libraries-and-documentation\u002F3.2-documentation-with-comments-and-preconditions",{"path":41,"title":42,"stem":43},"\u002Fshockwave-curriculum\u002Flessons\u002Fch03-apis-libraries-and-documentation\u002F3-packages-and-imports","Packages & Imports","shockwave-curriculum\u002Flessons\u002Fch03-apis-libraries-and-documentation\u002F3.3-packages-and-imports",{"path":45,"title":46,"stem":47},"\u002Fshockwave-curriculum\u002Flessons\u002Fch04-using-objects-and-calling-methods\u002F1-methods-signatures-and-parameters","Methods, Signatures & Parameters","shockwave-curriculum\u002Flessons\u002Fch04-using-objects-and-calling-methods\u002F4.1-methods-signatures-and-parameters",{"path":49,"title":50,"stem":51},"\u002Fshockwave-curriculum\u002Flessons\u002Fch04-using-objects-and-calling-methods\u002F2-calling-class-methods","Calling Class Methods","shockwave-curriculum\u002Flessons\u002Fch04-using-objects-and-calling-methods\u002F4.2-calling-class-methods",{"path":53,"title":54,"stem":55},"\u002Fshockwave-curriculum\u002Flessons\u002Fch04-using-objects-and-calling-methods\u002F3-using-the-math-class","Using the Math Class","shockwave-curriculum\u002Flessons\u002Fch04-using-objects-and-calling-methods\u002F4.3-using-the-math-class",{"path":57,"title":58,"stem":59},"\u002Fshockwave-curriculum\u002Flessons\u002Fch04-using-objects-and-calling-methods\u002F4-objects-instances-of-classes","Objects — Instances of Classes","shockwave-curriculum\u002Flessons\u002Fch04-using-objects-and-calling-methods\u002F4.4-objects-instances-of-classes",{"path":61,"title":62,"stem":63},"\u002Fshockwave-curriculum\u002Flessons\u002Fch04-using-objects-and-calling-methods\u002F5-creating-and-initializing-objects-constructors","Creating & Initializing Objects: Constructors","shockwave-curriculum\u002Flessons\u002Fch04-using-objects-and-calling-methods\u002F4.5-creating-and-initializing-objects-constructors",{"path":65,"title":66,"stem":67},"\u002Fshockwave-curriculum\u002Flessons\u002Fch04-using-objects-and-calling-methods\u002F6-calling-instance-methods","Calling Instance Methods","shockwave-curriculum\u002Flessons\u002Fch04-using-objects-and-calling-methods\u002F4.6-calling-instance-methods",{"path":69,"title":70,"stem":71},"\u002Fshockwave-curriculum\u002Flessons\u002Fch05-control-structures\u002F1-5.2-if-statements-and-for-loops","Control Structures: if Statements & For Loops","shockwave-curriculum\u002Flessons\u002Fch05-control-structures\u002F5.1-5.2-if-statements-and-for-loops",{"path":73,"title":74,"stem":75},"\u002Fshockwave-curriculum\u002Flessons\u002Fch05-control-structures\u002F10-nested-iteration","Nested Iteration","shockwave-curriculum\u002Flessons\u002Fch05-control-structures\u002F5.10-nested-iteration",{"path":77,"title":78,"stem":79},"\u002Fshockwave-curriculum\u002Flessons\u002Fch05-control-structures\u002F11-informal-runtime-analysis-of-loops","Informal Runtime Analysis of Loops","shockwave-curriculum\u002Flessons\u002Fch05-control-structures\u002F5.11-informal-runtime-analysis-of-loops",{"path":81,"title":82,"stem":83},"\u002Fshockwave-curriculum\u002Flessons\u002Fch05-control-structures\u002F12-switch-statements-and-expressions","switch Statements and Expressions","shockwave-curriculum\u002Flessons\u002Fch05-control-structures\u002F5.12-switch-statements-and-expressions",{"path":85,"title":86,"stem":87},"\u002Fshockwave-curriculum\u002Flessons\u002Fch05-control-structures\u002F3-algorithms-with-selection-and-repetition","Algorithms with Selection and Repetition","shockwave-curriculum\u002Flessons\u002Fch05-control-structures\u002F5.3-algorithms-with-selection-and-repetition",{"path":89,"title":90,"stem":91},"\u002Fshockwave-curriculum\u002Flessons\u002Fch05-control-structures\u002F4-boolean-expressions","Boolean Expressions","shockwave-curriculum\u002Flessons\u002Fch05-control-structures\u002F5.4-boolean-expressions",{"path":93,"title":94,"stem":95},"\u002Fshockwave-curriculum\u002Flessons\u002Fch05-control-structures\u002F5-nested-if-statements","Nested if Statements","shockwave-curriculum\u002Flessons\u002Fch05-control-structures\u002F5.5-nested-if-statements",{"path":97,"title":98,"stem":99},"\u002Fshockwave-curriculum\u002Flessons\u002Fch05-control-structures\u002F6-compound-boolean-expressions","Compound Boolean Expressions","shockwave-curriculum\u002Flessons\u002Fch05-control-structures\u002F5.6-compound-boolean-expressions",{"path":101,"title":102,"stem":103},"\u002Fshockwave-curriculum\u002Flessons\u002Fch05-control-structures\u002F7-comparing-boolean-expressions-de-morgans-laws","Comparing Boolean Expressions (De Morgan's Laws)","shockwave-curriculum\u002Flessons\u002Fch05-control-structures\u002F5.7-comparing-boolean-expressions-de-morgans-laws",{"path":105,"title":106,"stem":107},"\u002Fshockwave-curriculum\u002Flessons\u002Fch05-control-structures\u002F8-while-loops","While Loops","shockwave-curriculum\u002Flessons\u002Fch05-control-structures\u002F5.8-while-loops",{"path":109,"title":110,"stem":111},"\u002Fshockwave-curriculum\u002Flessons\u002Fch05-control-structures\u002F9-implementing-selection-and-iteration-algorithms","Implementing Selection and Iteration Algorithms","shockwave-curriculum\u002Flessons\u002Fch05-control-structures\u002F5.9-implementing-selection-and-iteration-algorithms",{"path":113,"title":114,"stem":115},"\u002Fshockwave-curriculum\u002Flessons\u002Fch06-strings\u002F1-strings","Strings","shockwave-curriculum\u002Flessons\u002Fch06-strings\u002F6.1-strings",{"path":117,"title":118,"stem":119},"\u002Fshockwave-curriculum\u002Flessons\u002Fch06-strings\u002F2-string-algorithms","String Algorithms","shockwave-curriculum\u002Flessons\u002Fch06-strings\u002F6.2-string-algorithms",{"path":121,"title":122,"stem":123},"\u002Fshockwave-curriculum\u002Flessons\u002Fch07-the-class-blueprint\u002F1-anatomy-of-a-java-class","The Class Blueprint","shockwave-curriculum\u002Flessons\u002Fch07-the-class-blueprint\u002F7.1-anatomy-of-a-java-class",{"path":125,"title":126,"stem":127},"\u002Fshockwave-curriculum\u002Flessons\u002Fch07-the-class-blueprint\u002F2-methods-how-to-write-them","Methods: How to Write Them","shockwave-curriculum\u002Flessons\u002Fch07-the-class-blueprint\u002F7.2-methods-how-to-write-them",{"path":129,"title":130,"stem":131},"\u002Fshockwave-curriculum\u002Flessons\u002Fch07-the-class-blueprint\u002F3-methods-passing-and-returning-references-of-an-object","Methods: Passing & Returning References of an Object","shockwave-curriculum\u002Flessons\u002Fch07-the-class-blueprint\u002F7.3-methods-passing-and-returning-references-of-an-object",{"path":133,"title":134,"stem":135},"\u002Fshockwave-curriculum\u002Flessons\u002Fch07-the-class-blueprint\u002F4-class-static-variables-and-methods","Class (static) Variables & Methods","shockwave-curriculum\u002Flessons\u002Fch07-the-class-blueprint\u002F7.4-class-static-variables-and-methods",{"path":137,"title":138,"stem":139},"\u002Fshockwave-curriculum\u002Flessons\u002Fch08-constructors-and-this\u002F1-8.2-constructors-and-this","Constructors & \"this\"","shockwave-curriculum\u002Flessons\u002Fch08-constructors-and-this\u002F8.1-8.2-constructors-and-this",{"path":141,"title":142,"stem":143},"\u002Fshockwave-curriculum\u002Flessons\u002Fch09-storing-data\u002F1-array-creation-and-access","Array Creation and Access","shockwave-curriculum\u002Flessons\u002Fch09-storing-data\u002F9.1-array-creation-and-access",{"path":145,"title":146,"stem":147},"\u002Fshockwave-curriculum\u002Flessons\u002Fch09-storing-data\u002F2-arraylist-and-its-methods","ArrayList and its Methods","shockwave-curriculum\u002Flessons\u002Fch09-storing-data\u002F9.2-arraylist-and-its-methods",{"path":149,"title":150,"stem":151},"\u002Fshockwave-curriculum\u002Flessons\u002Fch09-storing-data\u002F3-optional-hashmap-dictionary-data-structure","HashMap (Dictionary) Data Structure","shockwave-curriculum\u002Flessons\u002Fch09-storing-data\u002F9.3-optional-hashmap-dictionary-data-structure",{"path":153,"title":154,"stem":155},"\u002Fshockwave-curriculum\u002Flessons\u002Fch09-storing-data\u002F4-array-traversals","Array Traversals","shockwave-curriculum\u002Flessons\u002Fch09-storing-data\u002F9.4-array-traversals",{"path":157,"title":158,"stem":159},"\u002Fshockwave-curriculum\u002Flessons\u002Fch09-storing-data\u002F5-implementing-array-algorithms","Implementing Array Algorithms","shockwave-curriculum\u002Flessons\u002Fch09-storing-data\u002F9.5-implementing-array-algorithms",{"path":161,"title":162,"stem":163},"\u002Fshockwave-curriculum\u002Flessons\u002Fch09-storing-data\u002F6-arraylist-traversals","ArrayList Traversals","shockwave-curriculum\u002Flessons\u002Fch09-storing-data\u002F9.6-arraylist-traversals",{"path":165,"title":166,"stem":167},"\u002Fshockwave-curriculum\u002Flessons\u002Fch09-storing-data\u002F7-implementing-arraylist-algorithms","Implementing ArrayList Algorithms","shockwave-curriculum\u002Flessons\u002Fch09-storing-data\u002F9.7-implementing-arraylist-algorithms",{"path":169,"title":170,"stem":171},"\u002Fshockwave-curriculum\u002Flessons\u002Fch09-storing-data\u002F8-using-text-files","Using Text Files","shockwave-curriculum\u002Flessons\u002Fch09-storing-data\u002F9.8-using-text-files",{"path":173,"title":174,"stem":175},"\u002Fshockwave-curriculum\u002Flessons\u002Fch10-2d-arrays\u002F1-2d-array-creation-and-access","2D Array Creation and Access","shockwave-curriculum\u002Flessons\u002Fch10-2d-arrays\u002F10.1-2d-array-creation-and-access",{"path":177,"title":178,"stem":179},"\u002Fshockwave-curriculum\u002Flessons\u002Fch10-2d-arrays\u002F2-2d-array-traversals-nested-loops","2D Array Traversals: Nested Loops","shockwave-curriculum\u002Flessons\u002Fch10-2d-arrays\u002F10.2-2d-array-traversals-nested-loops",{"path":181,"title":182,"stem":183},"\u002Fshockwave-curriculum\u002Flessons\u002Fch10-2d-arrays\u002F3-implementing-2d-array-algorithms","Implementing 2D Array Algorithms","shockwave-curriculum\u002Flessons\u002Fch10-2d-arrays\u002F10.3-implementing-2d-array-algorithms",{"path":185,"title":186,"stem":187},"\u002Fshockwave-curriculum\u002Flessons\u002Fch11-enums-named-choices\u002F11-enums-named-choices","Enums: Named Choices","shockwave-curriculum\u002Flessons\u002Fch11-enums-named-choices\u002F11-enums-named-choices",{"path":189,"title":190,"stem":191},"\u002Fshockwave-curriculum\u002Flessons\u002Fch12-exceptions-and-try-catch\u002F12-exceptions-and-try-catch","Exceptions & try\u002Fcatch","shockwave-curriculum\u002Flessons\u002Fch12-exceptions-and-try-catch\u002F12-exceptions-and-try-catch",{"path":193,"title":194,"stem":195},"\u002Fshockwave-curriculum\u002Flessons\u002Fch13-common-gotchas\u002F13-common-gotchas","Common Gotchas","shockwave-curriculum\u002Flessons\u002Fch13-common-gotchas\u002F13-common-gotchas",{"path":197,"title":198,"stem":199},"\u002Fshockwave-curriculum\u002Flessons\u002Fch14-why-design-patterns\u002F14-why-design-patterns","Why Design Patterns?","shockwave-curriculum\u002Flessons\u002Fch14-why-design-patterns\u002F14-why-design-patterns",{"path":201,"title":202,"stem":203},"\u002Fshockwave-curriculum\u002Flessons\u002Fch15-advanced-collections\u002F15-advanced-collections","Advanced Collections (Set\u002FQueue\u002FMap)","shockwave-curriculum\u002Flessons\u002Fch15-advanced-collections\u002F15-advanced-collections",{"path":205,"title":206,"stem":207},"\u002Fshockwave-curriculum\u002Flessons\u002Fch16-writing-your-own-generics\u002F16-writing-your-own-generics","Writing Your Own Generics","shockwave-curriculum\u002Flessons\u002Fch16-writing-your-own-generics\u002F16-writing-your-own-generics",{"path":209,"title":210,"stem":211},"\u002Fshockwave-curriculum\u002Flessons\u002Fch17-inheritance-and-abstractions\u002F1-inheritance-superclass-subclass","Inheritance, Superclass, Subclass","shockwave-curriculum\u002Flessons\u002Fch17-inheritance-and-abstractions\u002F17.1-inheritance-superclass-subclass",{"path":213,"title":214,"stem":215},"\u002Fshockwave-curriculum\u002Flessons\u002Fch17-inheritance-and-abstractions\u002F2-inheritance-and-constructors","Inheritance and Constructors","shockwave-curriculum\u002Flessons\u002Fch17-inheritance-and-abstractions\u002F17.2-inheritance-and-constructors",{"path":217,"title":218,"stem":219},"\u002Fshockwave-curriculum\u002Flessons\u002Fch17-inheritance-and-abstractions\u002F3-inheritance-hierarchies","Inheritance Hierarchies","shockwave-curriculum\u002Flessons\u002Fch17-inheritance-and-abstractions\u002F17.3-inheritance-hierarchies",{"path":221,"title":222,"stem":223},"\u002Fshockwave-curriculum\u002Flessons\u002Fch17-inheritance-and-abstractions\u002F4-object-superclass","Object Superclass","shockwave-curriculum\u002Flessons\u002Fch17-inheritance-and-abstractions\u002F17.4-object-superclass",{"path":225,"title":226,"stem":227},"\u002Fshockwave-curriculum\u002Flessons\u002Fch17-inheritance-and-abstractions\u002F5-abstract-classes-and-methods","Abstract Classes and Methods","shockwave-curriculum\u002Flessons\u002Fch17-inheritance-and-abstractions\u002F17.5-abstract-classes-and-methods",{"path":229,"title":230,"stem":231},"\u002Fshockwave-curriculum\u002Flessons\u002Fch18-polymorphism-many-forms\u002F1-overriding-methods","Overriding Methods","shockwave-curriculum\u002Flessons\u002Fch18-polymorphism-many-forms\u002F18.1-overriding-methods",{"path":233,"title":234,"stem":235},"\u002Fshockwave-curriculum\u002Flessons\u002Fch18-polymorphism-many-forms\u002F2-super-keyword","super Keyword","shockwave-curriculum\u002Flessons\u002Fch18-polymorphism-many-forms\u002F18.2-super-keyword",{"path":237,"title":238,"stem":239},"\u002Fshockwave-curriculum\u002Flessons\u002Fch18-polymorphism-many-forms\u002F3-polymorphism","Polymorphism","shockwave-curriculum\u002Flessons\u002Fch18-polymorphism-many-forms\u002F18.3-polymorphism",{"path":241,"title":242,"stem":243},"\u002Fshockwave-curriculum\u002Flessons\u002Fch19-interfaces-as-contracts\u002F19-interfaces-as-contracts","Interfaces as Contracts","shockwave-curriculum\u002Flessons\u002Fch19-interfaces-as-contracts\u002F19-interfaces-as-contracts",{"path":245,"title":246,"stem":247},"\u002Fshockwave-curriculum\u002Flessons\u002Fch19-interfaces-as-contracts\u002F1-lambdas-and-method-references","Lambdas & Method References","shockwave-curriculum\u002Flessons\u002Fch19-interfaces-as-contracts\u002F19.1-lambdas-and-method-references",{"path":249,"title":250,"stem":251},"\u002Fshockwave-curriculum\u002Flessons\u002Fch20-the-io-layer-pattern\u002F20-the-io-layer-pattern","The IO-Layer Pattern","shockwave-curriculum\u002Flessons\u002Fch20-the-io-layer-pattern\u002F20-the-io-layer-pattern",{"path":253,"title":254,"stem":255},"\u002Fshockwave-curriculum\u002Flessons\u002Fch21-static-factories\u002F21-static-factories","Static Factories","shockwave-curriculum\u002Flessons\u002Fch21-static-factories\u002F21-static-factories",{"path":257,"title":258,"stem":259},"\u002Fshockwave-curriculum\u002Flessons\u002Fch22-the-builder-pattern\u002F22-the-builder-pattern","The Builder Pattern","shockwave-curriculum\u002Flessons\u002Fch22-the-builder-pattern\u002F22-the-builder-pattern",{"path":261,"title":262,"stem":263},"\u002Fshockwave-curriculum\u002Flessons\u002Fch23-encapsulation-and-final\u002F1-scope-and-access","Access, final, and Immutability","shockwave-curriculum\u002Flessons\u002Fch23-encapsulation-and-final\u002F23.1-scope-and-access",{"path":265,"title":266,"stem":267},"\u002Fshockwave-curriculum\u002Flessons\u002Fch24-optional-avoiding-null-pointer-exceptions\u002F24-optional-avoiding-null-pointer-exceptions","Optional: Avoiding Null Pointer Exceptions","shockwave-curriculum\u002Flessons\u002Fch24-optional-avoiding-null-pointer-exceptions\u002F24-optional-avoiding-null-pointer-exceptions",{"path":269,"title":270,"stem":271},"\u002Fshockwave-curriculum\u002Flessons\u002Fch25-command-based-programming\u002F1-what-is-command-based-programming","What Is Command-Based Programming?","shockwave-curriculum\u002Flessons\u002Fch25-command-based-programming\u002F25.1-what-is-command-based-programming",{"path":273,"title":274,"stem":275},"\u002Fshockwave-curriculum\u002Flessons\u002Fch25-command-based-programming\u002F2-commands-and-command-compositions","Commands & Command Compositions","shockwave-curriculum\u002Flessons\u002Fch25-command-based-programming\u002F25.2-commands-and-command-compositions",{"path":277,"title":278,"stem":279},"\u002Fshockwave-curriculum\u002Flessons\u002Fch25-command-based-programming\u002F3-the-command-scheduler","The Command Scheduler","shockwave-curriculum\u002Flessons\u002Fch25-command-based-programming\u002F25.3-the-command-scheduler",{"path":281,"title":282,"stem":283},"\u002Fshockwave-curriculum\u002Flessons\u002Fch25-command-based-programming\u002F4-state-machines-logic","State Machines: Logic","shockwave-curriculum\u002Flessons\u002Fch25-command-based-programming\u002F25.4-state-machines-logic",{"path":285,"title":286,"stem":287},"\u002Fshockwave-curriculum\u002Flessons\u002Fch25-command-based-programming\u002F5-managing-transitions","Managing Transitions","shockwave-curriculum\u002Flessons\u002Fch25-command-based-programming\u002F25.5-managing-transitions",{"path":289,"title":290,"stem":291},"\u002Fshockwave-curriculum\u002Flessons\u002Fch25-command-based-programming\u002F6-binding-commands-to-triggers","Binding Commands to Triggers","shockwave-curriculum\u002Flessons\u002Fch25-command-based-programming\u002F25.6-binding-commands-to-triggers",{"path":293,"title":294,"stem":295},"\u002Fshockwave-curriculum\u002Flessons\u002Fch25-command-based-programming\u002F7-structuring-a-command-based-robot-project","Structuring a Command-Based Robot Project","shockwave-curriculum\u002Flessons\u002Fch25-command-based-programming\u002F25.7-structuring-a-command-based-robot-project",{"path":297,"title":298,"stem":299},"\u002Fshockwave-curriculum\u002Flessons\u002Fch26-architecture-takeaways\u002F26-architecture-takeaways","Architecture Takeaways","shockwave-curriculum\u002Flessons\u002Fch26-architecture-takeaways\u002F26-architecture-takeaways",{"path":301,"title":302,"stem":303},"\u002Fshockwave-curriculum\u002Flessons\u002Fch27-program-design-and-abstraction\u002F1-abstraction-and-program-design","Abstraction and Program Design","shockwave-curriculum\u002Flessons\u002Fch27-program-design-and-abstraction\u002F27.1-abstraction-and-program-design",{"path":305,"title":306,"stem":307},"\u002Fshockwave-curriculum\u002Flessons\u002Fch27-program-design-and-abstraction\u002F2-impact-of-program-design","Impact of Program Design","shockwave-curriculum\u002Flessons\u002Fch27-program-design-and-abstraction\u002F27.2-impact-of-program-design",{"path":309,"title":310,"stem":311},"\u002Fshockwave-curriculum\u002Flessons\u002Fch28-algorithms-searching-sorting-recursion\u002F1-searching-algorithms","Searching Algorithms","shockwave-curriculum\u002Flessons\u002Fch28-algorithms-searching-sorting-recursion\u002F28.1-searching-algorithms",{"path":313,"title":314,"stem":315},"\u002Fshockwave-curriculum\u002Flessons\u002Fch28-algorithms-searching-sorting-recursion\u002F2-sorting-algorithms","Sorting Algorithms","shockwave-curriculum\u002Flessons\u002Fch28-algorithms-searching-sorting-recursion\u002F28.2-sorting-algorithms",{"path":317,"title":318,"stem":319},"\u002Fshockwave-curriculum\u002Flessons\u002Fch28-algorithms-searching-sorting-recursion\u002F3-recursion","Recursion","shockwave-curriculum\u002Flessons\u002Fch28-algorithms-searching-sorting-recursion\u002F28.3-recursion",{"path":321,"title":322,"stem":323},"\u002Fshockwave-curriculum\u002Flessons\u002Fch28-algorithms-searching-sorting-recursion\u002F4-recursive-searching-and-sorting","Recursive Searching and Sorting","shockwave-curriculum\u002Flessons\u002Fch28-algorithms-searching-sorting-recursion\u002F28.4-recursive-searching-and-sorting",{"path":325,"title":326,"stem":327},"\u002Fshockwave-curriculum\u002Flessons\u002Fch29-git-and-github-basics\u002F1-coming-soon","Git & GitHub Basics — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch29-git-and-github-basics\u002F29.1-coming-soon",{"path":329,"title":330,"stem":331},"\u002Fshockwave-curriculum\u002Flessons\u002Fch30-git-history-and-merging\u002F1-coming-soon","Git — History & Merging — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch30-git-history-and-merging\u002F30.1-coming-soon",{"path":333,"title":334,"stem":335},"\u002Fshockwave-curriculum\u002Flessons\u002Fch31-dev-environment-and-tooling\u002F1-coming-soon","Dev Environment & Tooling — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch31-dev-environment-and-tooling\u002F31.1-coming-soon",{"path":337,"title":338,"stem":339},"\u002Fshockwave-curriculum\u002Flessons\u002Fch32-unit-testing\u002F1-coming-soon","Unit Testing — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch32-unit-testing\u002F32.1-coming-soon",{"path":341,"title":342,"stem":343},"\u002Fshockwave-curriculum\u002Flessons\u002Fch33-advantagekit-autologging\u002F1-coming-soon","AdvantageKit — AutoLogging — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch33-advantagekit-autologging\u002F33.1-coming-soon",{"path":345,"title":346,"stem":347},"\u002Fshockwave-curriculum\u002Flessons\u002Fch34-log-replay\u002F1-coming-soon","Log Replay — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch34-log-replay\u002F34.1-coming-soon",{"path":349,"title":350,"stem":351},"\u002Fshockwave-curriculum\u002Flessons\u002Fch35-advantagescope-i-visualization\u002F1-coming-soon","AdvantageScope I: Visualization — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch35-advantagescope-i-visualization\u002F35.1-coming-soon",{"path":353,"title":354,"stem":355},"\u002Fshockwave-curriculum\u002Flessons\u002Fch36-advantagescope-ii-custom-3d-assets\u002F1-coming-soon","AdvantageScope II: Custom 3D Assets — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch36-advantagescope-ii-custom-3d-assets\u002F36.1-coming-soon",{"path":357,"title":358,"stem":359},"\u002Fshockwave-curriculum\u002Flessons\u002Fch37-autonomous-i\u002F1-coming-soon","Autonomous I — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch37-autonomous-i\u002F37.1-coming-soon",{"path":361,"title":362,"stem":363},"\u002Fshockwave-curriculum\u002Flessons\u002Fch38-autonomous-ii-pathplanner-and-trajectories\u002F1-coming-soon","Autonomous II: PathPlanner & Trajectories — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch38-autonomous-ii-pathplanner-and-trajectories\u002F38.1-coming-soon",{"path":365,"title":366,"stem":367},"\u002Fshockwave-curriculum\u002Flessons\u002Fch39-control-fundamentals\u002F1-coming-soon","Control Fundamentals — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch39-control-fundamentals\u002F39.1-coming-soon",{"path":369,"title":370,"stem":371},"\u002Fshockwave-curriculum\u002Flessons\u002Fch40-motion-profiles\u002F1-coming-soon","Motion Profiles — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch40-motion-profiles\u002F40.1-coming-soon",{"path":373,"title":374,"stem":375},"\u002Fshockwave-curriculum\u002Flessons\u002Fch41-hardware-fundamentals\u002F1-coming-soon","Hardware Fundamentals — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch41-hardware-fundamentals\u002F41.1-coming-soon",{"path":377,"title":378,"stem":379},"\u002Fshockwave-curriculum\u002Flessons\u002Fch42-photonvision\u002F1-coming-soon","PhotonVision — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch42-photonvision\u002F42.1-coming-soon",{"path":381,"title":382,"stem":383},"\u002Fshockwave-curriculum\u002Flessons\u002Fch43-apriltags-and-pose\u002F1-coming-soon","AprilTags & Pose — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch43-apriltags-and-pose\u002F43.1-coming-soon",{"path":385,"title":386,"stem":387},"\u002Fshockwave-curriculum\u002Flessons\u002Fch44-subsystems-i\u002F1-coming-soon","Subsystems I — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch44-subsystems-i\u002F44.1-coming-soon",{"path":389,"title":390,"stem":391},"\u002Fshockwave-curriculum\u002Flessons\u002Fch45-subsystems-ii-advanced\u002F1-coming-soon","Subsystems II — Advanced — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch45-subsystems-ii-advanced\u002F45.1-coming-soon",{"path":393,"title":394,"stem":395},"\u002Fshockwave-curriculum\u002Flessons\u002Fch46-team-utilities-i\u002F1-coming-soon","Team Utilities I — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch46-team-utilities-i\u002F46.1-coming-soon",{"path":397,"title":398,"stem":399},"\u002Fshockwave-curriculum\u002Flessons\u002Fch47-field-constants\u002F1-coming-soon","Field Constants — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch47-field-constants\u002F47.1-coming-soon",{"path":401,"title":402,"stem":403},"\u002Fshockwave-curriculum\u002Flessons\u002Fch48-troubleshooting-i-runtime-debug\u002F1-coming-soon","Troubleshooting I — Runtime Debug — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch48-troubleshooting-i-runtime-debug\u002F48.1-coming-soon",{"path":405,"title":406,"stem":407},"\u002Fshockwave-curriculum\u002Flessons\u002Fch49-troubleshooting-ii-can-and-sim\u002F1-coming-soon","Troubleshooting II: CAN & Sim — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch49-troubleshooting-ii-can-and-sim\u002F49.1-coming-soon",{"path":409,"title":410,"stem":411},"\u002Fshockwave-curriculum\u002Flessons\u002Fch50-vendor-libraries-talonfx\u002F1-coming-soon","Vendor Libraries: TalonFX — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch50-vendor-libraries-talonfx\u002F50.1-coming-soon",{"path":413,"title":414,"stem":415},"\u002Fshockwave-curriculum\u002Flessons\u002Fch51-robot-alerts\u002F1-coming-soon","Robot Alerts — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch51-robot-alerts\u002F51.1-coming-soon",{"path":417,"title":418,"stem":419},"\u002Fshockwave-curriculum\u002Flessons\u002Fch52-wpilib-commands\u002F1-coming-soon","WPILib Commands — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch52-wpilib-commands\u002F52.1-coming-soon",{"path":421,"title":422,"stem":423},"\u002Fshockwave-curriculum\u002Flessons\u002Fch53-wpilib-geometry\u002F1-coming-soon","WPILib Geometry — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch53-wpilib-geometry\u002F53.1-coming-soon",{"path":425,"title":426,"stem":427},"\u002Fshockwave-curriculum\u002Flessons\u002Fch54-networktables\u002F1-coming-soon","NetworkTables — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch54-networktables\u002F54.1-coming-soon",{"path":429,"title":430,"stem":431},"\u002Fshockwave-curriculum\u002Flessons\u002Fch55-command-scheduler\u002F1-coming-soon","Command Scheduler — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch55-command-scheduler\u002F55.1-coming-soon",{"path":433,"title":434,"stem":435},"\u002Fshockwave-curriculum\u002Flessons\u002Fch56-wpilib-timers\u002F1-coming-soon","WPILib Timers — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch56-wpilib-timers\u002F56.1-coming-soon",{"path":437,"title":438,"stem":439},"\u002Fshockwave-curriculum\u002Flessons\u002Fch57-wpilib-triggers\u002F1-coming-soon","WPILib Triggers — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch57-wpilib-triggers\u002F57.1-coming-soon",{"path":441,"title":442,"stem":443},"\u002Fshockwave-curriculum\u002Flessons\u002Fch58-vendor-units-and-conversions\u002F1-coming-soon","Vendor Units & Conversions — Coming Soon","shockwave-curriculum\u002Flessons\u002Fch58-vendor-units-and-conversions\u002F58.1-coming-soon",[445,449,453,457,461,465,469,473,477,481,485,489,493,497,501,505,509,513,517,521,525,529,533,537,541,545,549,553,557,561,565,569,573,577,581,585,589,593,597,601,605,609,613,617,621,625,629,633,637,641,645,649,653,657,661,665,669,673,677,681,685,689,693,697,701,705,709,713,717,721,725,729,733,737,741,745,749],{"path":446,"title":447,"stem":448},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch01-why-java-for-frc\u002F2-intro-to-algorithms-programming-and-compilers","Intro to Algorithms, Programming and Compilers — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch01-why-java-for-frc\u002F1.2-intro-to-algorithms-programming-and-compilers",{"path":450,"title":451,"stem":452},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch02-variables-and-types\u002F1-variables-and-data-types","Variables & Data Types — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch02-variables-and-types\u002F2.1-variables-and-data-types",{"path":454,"title":455,"stem":456},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch02-variables-and-types\u002F2-expressions-and-output","Expressions & Output — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch02-variables-and-types\u002F2.2-expressions-and-output",{"path":458,"title":459,"stem":460},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch02-variables-and-types\u002F3-assignment-and-input","Assignment & Input — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch02-variables-and-types\u002F2.3-assignment-and-input",{"path":462,"title":463,"stem":464},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch02-variables-and-types\u002F4-casting-and-ranges-of-values","Casting & Ranges of Values — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch02-variables-and-types\u002F2.4-casting-and-ranges-of-values",{"path":466,"title":467,"stem":468},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch02-variables-and-types\u002F5-compound-assignment-operators","Compound Assignment Operators — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch02-variables-and-types\u002F2.5-compound-assignment-operators",{"path":470,"title":471,"stem":472},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch03-apis-libraries-and-documentation\u002F1-apis-and-libraries","APIs and Libraries — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch03-apis-libraries-and-documentation\u002F3.1-apis-and-libraries",{"path":474,"title":475,"stem":476},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch03-apis-libraries-and-documentation\u002F2-documentation-with-comments-and-preconditions","Documentation with Comments and Preconditions — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch03-apis-libraries-and-documentation\u002F3.2-documentation-with-comments-and-preconditions",{"path":478,"title":479,"stem":480},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch03-apis-libraries-and-documentation\u002F3-packages-and-imports","Packages & Imports — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch03-apis-libraries-and-documentation\u002F3.3-packages-and-imports",{"path":482,"title":483,"stem":484},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch04-using-objects-and-calling-methods\u002F1-methods-signatures-and-parameters","Methods, Signatures & Parameters — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch04-using-objects-and-calling-methods\u002F4.1-methods-signatures-and-parameters",{"path":486,"title":487,"stem":488},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch04-using-objects-and-calling-methods\u002F2-calling-class-methods","Calling Class Methods — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch04-using-objects-and-calling-methods\u002F4.2-calling-class-methods",{"path":490,"title":491,"stem":492},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch04-using-objects-and-calling-methods\u002F3-using-the-math-class","Using the Math Class — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch04-using-objects-and-calling-methods\u002F4.3-using-the-math-class",{"path":494,"title":495,"stem":496},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch04-using-objects-and-calling-methods\u002F4-objects-instances-of-classes","Objects — Instances of Classes — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch04-using-objects-and-calling-methods\u002F4.4-objects-instances-of-classes",{"path":498,"title":499,"stem":500},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch04-using-objects-and-calling-methods\u002F5-creating-and-initializing-objects-constructors","Creating & Initializing Objects: Constructors — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch04-using-objects-and-calling-methods\u002F4.5-creating-and-initializing-objects-constructors",{"path":502,"title":503,"stem":504},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch04-using-objects-and-calling-methods\u002F6-calling-instance-methods","Calling Instance Methods — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch04-using-objects-and-calling-methods\u002F4.6-calling-instance-methods",{"path":506,"title":507,"stem":508},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch05-control-structures\u002F1-5.2-if-statements-and-for-loops","if Statements & For Loops — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch05-control-structures\u002F5.1-5.2-if-statements-and-for-loops",{"path":510,"title":511,"stem":512},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch05-control-structures\u002F10-nested-iteration","Nested Iteration — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch05-control-structures\u002F5.10-nested-iteration",{"path":514,"title":515,"stem":516},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch05-control-structures\u002F11-informal-runtime-analysis-of-loops","Informal Runtime Analysis of Loops — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch05-control-structures\u002F5.11-informal-runtime-analysis-of-loops",{"path":518,"title":519,"stem":520},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch05-control-structures\u002F12-switch-statements-and-expressions","switch Statements and Expressions — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch05-control-structures\u002F5.12-switch-statements-and-expressions",{"path":522,"title":523,"stem":524},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch05-control-structures\u002F3-algorithms-with-selection-and-repetition","Algorithms with Selection and Repetition — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch05-control-structures\u002F5.3-algorithms-with-selection-and-repetition",{"path":526,"title":527,"stem":528},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch05-control-structures\u002F4-boolean-expressions","Boolean Expressions — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch05-control-structures\u002F5.4-boolean-expressions",{"path":530,"title":531,"stem":532},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch05-control-structures\u002F5-nested-if-statements","Nested if Statements — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch05-control-structures\u002F5.5-nested-if-statements",{"path":534,"title":535,"stem":536},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch05-control-structures\u002F6-compound-boolean-expressions","Compound Boolean Expressions — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch05-control-structures\u002F5.6-compound-boolean-expressions",{"path":538,"title":539,"stem":540},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch05-control-structures\u002F7-comparing-boolean-expressions-de-morgans-laws","Comparing Boolean Expressions (De Morgan's Laws) — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch05-control-structures\u002F5.7-comparing-boolean-expressions-de-morgans-laws",{"path":542,"title":543,"stem":544},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch05-control-structures\u002F8-while-loops","While Loops — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch05-control-structures\u002F5.8-while-loops",{"path":546,"title":547,"stem":548},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch05-control-structures\u002F9-implementing-selection-and-iteration-algorithms","Implementing Selection and Iteration Algorithms — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch05-control-structures\u002F5.9-implementing-selection-and-iteration-algorithms",{"path":550,"title":551,"stem":552},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch06-strings\u002F1-strings","Strings — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch06-strings\u002F6.1-strings",{"path":554,"title":555,"stem":556},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch06-strings\u002F2-string-algorithms","String Algorithms — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch06-strings\u002F6.2-string-algorithms",{"path":558,"title":559,"stem":560},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch07-the-class-blueprint\u002F1-anatomy-of-a-java-class","Anatomy of a Java Class — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch07-the-class-blueprint\u002F7.1-anatomy-of-a-java-class",{"path":562,"title":563,"stem":564},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch07-the-class-blueprint\u002F2-methods-how-to-write-them","Methods: How to Write Them — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch07-the-class-blueprint\u002F7.2-methods-how-to-write-them",{"path":566,"title":567,"stem":568},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch07-the-class-blueprint\u002F3-methods-passing-and-returning-references-of-an-object","Methods: Passing & Returning References of an Object — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch07-the-class-blueprint\u002F7.3-methods-passing-and-returning-references-of-an-object",{"path":570,"title":571,"stem":572},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch07-the-class-blueprint\u002F4-class-static-variables-and-methods","Class (static) Variables & Methods — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch07-the-class-blueprint\u002F7.4-class-static-variables-and-methods",{"path":574,"title":575,"stem":576},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch08-constructors-and-this\u002F1-8.2-constructors-and-this","Constructors & \"this\" — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch08-constructors-and-this\u002F8.1-8.2-constructors-and-this",{"path":578,"title":579,"stem":580},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch09-storing-data\u002F1-array-creation-and-access","Array Creation and Access — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch09-storing-data\u002F9.1-array-creation-and-access",{"path":582,"title":583,"stem":584},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch09-storing-data\u002F2-arraylist-and-its-methods","ArrayList and its Methods — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch09-storing-data\u002F9.2-arraylist-and-its-methods",{"path":586,"title":587,"stem":588},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch09-storing-data\u002F3-optional-hashmap-dictionary-data-structure","HashMap (Dictionary) Data Structure — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch09-storing-data\u002F9.3-optional-hashmap-dictionary-data-structure",{"path":590,"title":591,"stem":592},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch09-storing-data\u002F4-array-traversals","Array Traversals — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch09-storing-data\u002F9.4-array-traversals",{"path":594,"title":595,"stem":596},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch09-storing-data\u002F5-implementing-array-algorithms","Implementing Array Algorithms — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch09-storing-data\u002F9.5-implementing-array-algorithms",{"path":598,"title":599,"stem":600},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch09-storing-data\u002F6-arraylist-traversals","ArrayList Traversals — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch09-storing-data\u002F9.6-arraylist-traversals",{"path":602,"title":603,"stem":604},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch09-storing-data\u002F7-implementing-arraylist-algorithms","Implementing ArrayList Algorithms — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch09-storing-data\u002F9.7-implementing-arraylist-algorithms",{"path":606,"title":607,"stem":608},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch09-storing-data\u002F8-using-text-files","Using Text Files — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch09-storing-data\u002F9.8-using-text-files",{"path":610,"title":611,"stem":612},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch10-2d-arrays\u002F1-2d-array-creation-and-access","2D Array Creation and Access — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch10-2d-arrays\u002F10.1-2d-array-creation-and-access",{"path":614,"title":615,"stem":616},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch10-2d-arrays\u002F2-2d-array-traversals-nested-loops","2D Array Traversals: Nested Loops — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch10-2d-arrays\u002F10.2-2d-array-traversals-nested-loops",{"path":618,"title":619,"stem":620},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch10-2d-arrays\u002F3-implementing-2d-array-algorithms","Implementing 2D Array Algorithms — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch10-2d-arrays\u002F10.3-implementing-2d-array-algorithms",{"path":622,"title":623,"stem":624},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch11-enums-named-choices\u002F11-enums-named-choices","Enums: Named Choices — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch11-enums-named-choices\u002F11-enums-named-choices",{"path":626,"title":627,"stem":628},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch12-exceptions-and-try-catch\u002F12-exceptions-and-try-catch","Exceptions & try\u002Fcatch — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch12-exceptions-and-try-catch\u002F12-exceptions-and-try-catch",{"path":630,"title":631,"stem":632},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch13-common-gotchas\u002F13-common-gotchas","Common Gotchas — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch13-common-gotchas\u002F13-common-gotchas",{"path":634,"title":635,"stem":636},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch15-advanced-collections\u002F15-advanced-collections","Advanced Collections (Set\u002FQueue\u002FMap) — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch15-advanced-collections\u002F15-advanced-collections",{"path":638,"title":639,"stem":640},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch16-writing-your-own-generics\u002F16-writing-your-own-generics","Writing Your Own Generics — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch16-writing-your-own-generics\u002F16-writing-your-own-generics",{"path":642,"title":643,"stem":644},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch17-inheritance-and-abstractions\u002F1-inheritance-superclass-subclass","Inheritance, Superclass, Subclass — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch17-inheritance-and-abstractions\u002F17.1-inheritance-superclass-subclass",{"path":646,"title":647,"stem":648},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch17-inheritance-and-abstractions\u002F2-inheritance-and-constructors","Inheritance and Constructors — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch17-inheritance-and-abstractions\u002F17.2-inheritance-and-constructors",{"path":650,"title":651,"stem":652},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch17-inheritance-and-abstractions\u002F3-inheritance-hierarchies","Inheritance Hierarchies — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch17-inheritance-and-abstractions\u002F17.3-inheritance-hierarchies",{"path":654,"title":655,"stem":656},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch17-inheritance-and-abstractions\u002F4-object-superclass","Object Superclass — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch17-inheritance-and-abstractions\u002F17.4-object-superclass",{"path":658,"title":659,"stem":660},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch17-inheritance-and-abstractions\u002F5-abstract-classes-and-methods","Abstract Classes and Methods — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch17-inheritance-and-abstractions\u002F17.5-abstract-classes-and-methods",{"path":662,"title":663,"stem":664},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch18-polymorphism-many-forms\u002F1-overriding-methods","Overriding Methods — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch18-polymorphism-many-forms\u002F18.1-overriding-methods",{"path":666,"title":667,"stem":668},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch18-polymorphism-many-forms\u002F2-super-keyword","super Keyword — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch18-polymorphism-many-forms\u002F18.2-super-keyword",{"path":670,"title":671,"stem":672},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch18-polymorphism-many-forms\u002F3-polymorphism","Polymorphism — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch18-polymorphism-many-forms\u002F18.3-polymorphism",{"path":674,"title":675,"stem":676},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch19-interfaces-as-contracts\u002F19-interfaces-as-contracts","Interfaces as Contracts — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch19-interfaces-as-contracts\u002F19-interfaces-as-contracts",{"path":678,"title":679,"stem":680},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch19-interfaces-as-contracts\u002F1-lambdas-and-method-references","Lambdas & Method References — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch19-interfaces-as-contracts\u002F19.1-lambdas-and-method-references",{"path":682,"title":683,"stem":684},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch20-the-io-layer-pattern\u002F20-the-io-layer-pattern","The IO-Layer Pattern — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch20-the-io-layer-pattern\u002F20-the-io-layer-pattern",{"path":686,"title":687,"stem":688},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch21-static-factories\u002F21-static-factories","Static Factories — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch21-static-factories\u002F21-static-factories",{"path":690,"title":691,"stem":692},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch22-the-builder-pattern\u002F22-the-builder-pattern","The Builder Pattern — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch22-the-builder-pattern\u002F22-the-builder-pattern",{"path":694,"title":695,"stem":696},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch23-encapsulation-and-final\u002F1-scope-and-access","Access, final, and Immutability — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch23-encapsulation-and-final\u002F23.1-scope-and-access",{"path":698,"title":699,"stem":700},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch24-optional-avoiding-null-pointer-exceptions\u002F24-optional-avoiding-null-pointer-exceptions","Optional: Avoiding Null Pointer Exceptions — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch24-optional-avoiding-null-pointer-exceptions\u002F24-optional-avoiding-null-pointer-exceptions",{"path":702,"title":703,"stem":704},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch25-command-based-programming\u002F1-what-is-command-based-programming","What Is Command-Based Programming? — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch25-command-based-programming\u002F25.1-what-is-command-based-programming",{"path":706,"title":707,"stem":708},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch25-command-based-programming\u002F2-commands-and-command-compositions","Commands & Command Compositions — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch25-command-based-programming\u002F25.2-commands-and-command-compositions",{"path":710,"title":711,"stem":712},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch25-command-based-programming\u002F3-the-command-scheduler","The Command Scheduler — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch25-command-based-programming\u002F25.3-the-command-scheduler",{"path":714,"title":715,"stem":716},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch25-command-based-programming\u002F4-state-machines-logic","State Machines: Logic — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch25-command-based-programming\u002F25.4-state-machines-logic",{"path":718,"title":719,"stem":720},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch25-command-based-programming\u002F5-managing-transitions","Managing Transitions — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch25-command-based-programming\u002F25.5-managing-transitions",{"path":722,"title":723,"stem":724},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch25-command-based-programming\u002F6-binding-commands-to-triggers","Binding Commands to Triggers — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch25-command-based-programming\u002F25.6-binding-commands-to-triggers",{"path":726,"title":727,"stem":728},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch25-command-based-programming\u002F7-structuring-a-command-based-robot-project","Structuring a Command-Based Robot Project — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch25-command-based-programming\u002F25.7-structuring-a-command-based-robot-project",{"path":730,"title":731,"stem":732},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch26-architecture-takeaways\u002F26-architecture-takeaways","Architecture Takeaways — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch26-architecture-takeaways\u002F26-architecture-takeaways",{"path":734,"title":735,"stem":736},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch27-program-design-and-abstraction\u002F1-abstraction-and-program-design","Abstraction and Program Design — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch27-program-design-and-abstraction\u002F27.1-abstraction-and-program-design",{"path":738,"title":739,"stem":740},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch28-algorithms-searching-sorting-recursion\u002F1-searching-algorithms","Searching Algorithms — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch28-algorithms-searching-sorting-recursion\u002F28.1-searching-algorithms",{"path":742,"title":743,"stem":744},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch28-algorithms-searching-sorting-recursion\u002F2-sorting-algorithms","Sorting Algorithms — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch28-algorithms-searching-sorting-recursion\u002F28.2-sorting-algorithms",{"path":746,"title":747,"stem":748},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch28-algorithms-searching-sorting-recursion\u002F3-recursion","Recursion — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch28-algorithms-searching-sorting-recursion\u002F28.3-recursion",{"path":750,"title":751,"stem":752},"\u002Fshockwave-curriculum\u002Fexamples\u002Fch28-algorithms-searching-sorting-recursion\u002F4-recursive-searching-and-sorting","Recursive Searching and Sorting — Worked Example","shockwave-curriculum\u002Fexamples\u002Fch28-algorithms-searching-sorting-recursion\u002F28.4-recursive-searching-and-sorting",[754,758,762,766,770,774,778,782,786,790,794,798,802,806,810,814,818,822,826,830,834,838,842,846,850,854,858,862,866,870,874,878,882,886,890,894,898,902,906,910,914,918,922,926,930,934,938,942,946,950,954,958,962,966,970,974,978,982,986,990,994,998,1002,1006,1010,1014,1018,1022,1026,1030,1034,1038,1042,1046,1050,1054,1058,1062,1066],{"path":755,"title":756,"stem":757},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch01-why-java-for-frc\u002F2-intro-to-algorithms-programming-and-compilers","Intro to Algorithms, Programming and Compilers — Exercises","shockwave-curriculum\u002Fexercises\u002Fch01-why-java-for-frc\u002F1.2-intro-to-algorithms-programming-and-compilers",{"path":759,"title":760,"stem":761},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch02-variables-and-types\u002F1-variables-and-data-types","Variables & Data Types — Exercises","shockwave-curriculum\u002Fexercises\u002Fch02-variables-and-types\u002F2.1-variables-and-data-types",{"path":763,"title":764,"stem":765},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch02-variables-and-types\u002F2-expressions-and-output","Expressions & Output — Exercises","shockwave-curriculum\u002Fexercises\u002Fch02-variables-and-types\u002F2.2-expressions-and-output",{"path":767,"title":768,"stem":769},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch02-variables-and-types\u002F3-assignment-and-input","Assignment & Input — Exercises","shockwave-curriculum\u002Fexercises\u002Fch02-variables-and-types\u002F2.3-assignment-and-input",{"path":771,"title":772,"stem":773},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch02-variables-and-types\u002F4-casting-and-ranges-of-values","Casting & Ranges of Values — Exercises","shockwave-curriculum\u002Fexercises\u002Fch02-variables-and-types\u002F2.4-casting-and-ranges-of-values",{"path":775,"title":776,"stem":777},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch02-variables-and-types\u002F5-compound-assignment-operators","Compound Assignment Operators — Exercises","shockwave-curriculum\u002Fexercises\u002Fch02-variables-and-types\u002F2.5-compound-assignment-operators",{"path":779,"title":780,"stem":781},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch03-apis-libraries-and-documentation\u002F1-apis-and-libraries","APIs and Libraries — Exercises","shockwave-curriculum\u002Fexercises\u002Fch03-apis-libraries-and-documentation\u002F3.1-apis-and-libraries",{"path":783,"title":784,"stem":785},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch03-apis-libraries-and-documentation\u002F2-documentation-with-comments-and-preconditions","Documentation with Comments and Preconditions — Exercises","shockwave-curriculum\u002Fexercises\u002Fch03-apis-libraries-and-documentation\u002F3.2-documentation-with-comments-and-preconditions",{"path":787,"title":788,"stem":789},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch03-apis-libraries-and-documentation\u002F3-packages-and-imports","Packages & Imports — Exercises","shockwave-curriculum\u002Fexercises\u002Fch03-apis-libraries-and-documentation\u002F3.3-packages-and-imports",{"path":791,"title":792,"stem":793},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch04-using-objects-and-calling-methods\u002F1-methods-signatures-and-parameters","Methods, Signatures & Parameters — Exercises","shockwave-curriculum\u002Fexercises\u002Fch04-using-objects-and-calling-methods\u002F4.1-methods-signatures-and-parameters",{"path":795,"title":796,"stem":797},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch04-using-objects-and-calling-methods\u002F2-calling-class-methods","Calling Class Methods — Exercises","shockwave-curriculum\u002Fexercises\u002Fch04-using-objects-and-calling-methods\u002F4.2-calling-class-methods",{"path":799,"title":800,"stem":801},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch04-using-objects-and-calling-methods\u002F3-using-the-math-class","Using the Math Class — Exercises","shockwave-curriculum\u002Fexercises\u002Fch04-using-objects-and-calling-methods\u002F4.3-using-the-math-class",{"path":803,"title":804,"stem":805},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch04-using-objects-and-calling-methods\u002F4-objects-instances-of-classes","Objects — Instances of Classes — Exercises","shockwave-curriculum\u002Fexercises\u002Fch04-using-objects-and-calling-methods\u002F4.4-objects-instances-of-classes",{"path":807,"title":808,"stem":809},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch04-using-objects-and-calling-methods\u002F5-creating-and-initializing-objects-constructors","Creating & Initializing Objects: Constructors — Exercises","shockwave-curriculum\u002Fexercises\u002Fch04-using-objects-and-calling-methods\u002F4.5-creating-and-initializing-objects-constructors",{"path":811,"title":812,"stem":813},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch04-using-objects-and-calling-methods\u002F6-calling-instance-methods","Calling Instance Methods — Exercises","shockwave-curriculum\u002Fexercises\u002Fch04-using-objects-and-calling-methods\u002F4.6-calling-instance-methods",{"path":815,"title":816,"stem":817},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch05-control-structures\u002F1-5.2-if-statements-and-for-loops","if Statements & For Loops — Exercises","shockwave-curriculum\u002Fexercises\u002Fch05-control-structures\u002F5.1-5.2-if-statements-and-for-loops",{"path":819,"title":820,"stem":821},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch05-control-structures\u002F10-nested-iteration","Nested Iteration — Exercises","shockwave-curriculum\u002Fexercises\u002Fch05-control-structures\u002F5.10-nested-iteration",{"path":823,"title":824,"stem":825},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch05-control-structures\u002F11-informal-runtime-analysis-of-loops","Informal Runtime Analysis of Loops — Exercises","shockwave-curriculum\u002Fexercises\u002Fch05-control-structures\u002F5.11-informal-runtime-analysis-of-loops",{"path":827,"title":828,"stem":829},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch05-control-structures\u002F12-switch-statements-and-expressions","switch Statements and Expressions — Exercises","shockwave-curriculum\u002Fexercises\u002Fch05-control-structures\u002F5.12-switch-statements-and-expressions",{"path":831,"title":832,"stem":833},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch05-control-structures\u002F3-algorithms-with-selection-and-repetition","Algorithms with Selection and Repetition — Exercises","shockwave-curriculum\u002Fexercises\u002Fch05-control-structures\u002F5.3-algorithms-with-selection-and-repetition",{"path":835,"title":836,"stem":837},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch05-control-structures\u002F4-boolean-expressions","Boolean Expressions — Exercises","shockwave-curriculum\u002Fexercises\u002Fch05-control-structures\u002F5.4-boolean-expressions",{"path":839,"title":840,"stem":841},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch05-control-structures\u002F5-nested-if-statements","Nested if Statements — Exercises","shockwave-curriculum\u002Fexercises\u002Fch05-control-structures\u002F5.5-nested-if-statements",{"path":843,"title":844,"stem":845},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch05-control-structures\u002F6-compound-boolean-expressions","Compound Boolean Expressions — Exercises","shockwave-curriculum\u002Fexercises\u002Fch05-control-structures\u002F5.6-compound-boolean-expressions",{"path":847,"title":848,"stem":849},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch05-control-structures\u002F7-comparing-boolean-expressions-de-morgans-laws","Comparing Boolean Expressions (De Morgan's Laws) — Exercises","shockwave-curriculum\u002Fexercises\u002Fch05-control-structures\u002F5.7-comparing-boolean-expressions-de-morgans-laws",{"path":851,"title":852,"stem":853},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch05-control-structures\u002F8-while-loops","While Loops — Exercises","shockwave-curriculum\u002Fexercises\u002Fch05-control-structures\u002F5.8-while-loops",{"path":855,"title":856,"stem":857},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch05-control-structures\u002F9-implementing-selection-and-iteration-algorithms","Implementing Selection and Iteration Algorithms — Exercises","shockwave-curriculum\u002Fexercises\u002Fch05-control-structures\u002F5.9-implementing-selection-and-iteration-algorithms",{"path":859,"title":860,"stem":861},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch06-strings\u002F1-strings","Strings — Exercises","shockwave-curriculum\u002Fexercises\u002Fch06-strings\u002F6.1-strings",{"path":863,"title":864,"stem":865},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch06-strings\u002F2-string-algorithms","String Algorithms — Exercises","shockwave-curriculum\u002Fexercises\u002Fch06-strings\u002F6.2-string-algorithms",{"path":867,"title":868,"stem":869},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch07-the-class-blueprint\u002F1-anatomy-of-a-java-class","Anatomy of a Java Class — Exercises","shockwave-curriculum\u002Fexercises\u002Fch07-the-class-blueprint\u002F7.1-anatomy-of-a-java-class",{"path":871,"title":872,"stem":873},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch07-the-class-blueprint\u002F2-methods-how-to-write-them","Methods: How to Write Them — Exercises","shockwave-curriculum\u002Fexercises\u002Fch07-the-class-blueprint\u002F7.2-methods-how-to-write-them",{"path":875,"title":876,"stem":877},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch07-the-class-blueprint\u002F3-methods-passing-and-returning-references-of-an-object","Methods: Passing & Returning References of an Object — Exercises","shockwave-curriculum\u002Fexercises\u002Fch07-the-class-blueprint\u002F7.3-methods-passing-and-returning-references-of-an-object",{"path":879,"title":880,"stem":881},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch07-the-class-blueprint\u002F4-class-static-variables-and-methods","Class (static) Variables & Methods — Exercises","shockwave-curriculum\u002Fexercises\u002Fch07-the-class-blueprint\u002F7.4-class-static-variables-and-methods",{"path":883,"title":884,"stem":885},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch08-constructors-and-this\u002F1-8.2-constructors-and-this","Constructors & \"this\" — Exercises","shockwave-curriculum\u002Fexercises\u002Fch08-constructors-and-this\u002F8.1-8.2-constructors-and-this",{"path":887,"title":888,"stem":889},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch09-storing-data\u002F1-array-creation-and-access","Array Creation and Access — Exercises","shockwave-curriculum\u002Fexercises\u002Fch09-storing-data\u002F9.1-array-creation-and-access",{"path":891,"title":892,"stem":893},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch09-storing-data\u002F2-arraylist-and-its-methods","ArrayList and its Methods — Exercises","shockwave-curriculum\u002Fexercises\u002Fch09-storing-data\u002F9.2-arraylist-and-its-methods",{"path":895,"title":896,"stem":897},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch09-storing-data\u002F3-optional-hashmap-dictionary-data-structure","HashMap (Dictionary) Data Structure — Exercises","shockwave-curriculum\u002Fexercises\u002Fch09-storing-data\u002F9.3-optional-hashmap-dictionary-data-structure",{"path":899,"title":900,"stem":901},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch09-storing-data\u002F4-array-traversals","Array Traversals — Exercises","shockwave-curriculum\u002Fexercises\u002Fch09-storing-data\u002F9.4-array-traversals",{"path":903,"title":904,"stem":905},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch09-storing-data\u002F5-implementing-array-algorithms","Implementing Array Algorithms — Exercises","shockwave-curriculum\u002Fexercises\u002Fch09-storing-data\u002F9.5-implementing-array-algorithms",{"path":907,"title":908,"stem":909},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch09-storing-data\u002F6-arraylist-traversals","ArrayList Traversals — Exercises","shockwave-curriculum\u002Fexercises\u002Fch09-storing-data\u002F9.6-arraylist-traversals",{"path":911,"title":912,"stem":913},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch09-storing-data\u002F7-implementing-arraylist-algorithms","Implementing ArrayList Algorithms — Exercises","shockwave-curriculum\u002Fexercises\u002Fch09-storing-data\u002F9.7-implementing-arraylist-algorithms",{"path":915,"title":916,"stem":917},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch09-storing-data\u002F8-using-text-files","Using Text Files — Exercises","shockwave-curriculum\u002Fexercises\u002Fch09-storing-data\u002F9.8-using-text-files",{"path":919,"title":920,"stem":921},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch10-2d-arrays\u002F1-2d-array-creation-and-access","2D Array Creation and Access — Exercises","shockwave-curriculum\u002Fexercises\u002Fch10-2d-arrays\u002F10.1-2d-array-creation-and-access",{"path":923,"title":924,"stem":925},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch10-2d-arrays\u002F2-2d-array-traversals-nested-loops","2D Array Traversals: Nested Loops — Exercises","shockwave-curriculum\u002Fexercises\u002Fch10-2d-arrays\u002F10.2-2d-array-traversals-nested-loops",{"path":927,"title":928,"stem":929},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch10-2d-arrays\u002F3-implementing-2d-array-algorithms","Implementing 2D Array Algorithms — Exercises","shockwave-curriculum\u002Fexercises\u002Fch10-2d-arrays\u002F10.3-implementing-2d-array-algorithms",{"path":931,"title":932,"stem":933},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch11-enums-named-choices\u002F11-enums-named-choices","Enums: Named Choices — Exercises","shockwave-curriculum\u002Fexercises\u002Fch11-enums-named-choices\u002F11-enums-named-choices",{"path":935,"title":936,"stem":937},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch12-exceptions-and-try-catch\u002F12-exceptions-and-try-catch","Exceptions & try\u002Fcatch — Exercises","shockwave-curriculum\u002Fexercises\u002Fch12-exceptions-and-try-catch\u002F12-exceptions-and-try-catch",{"path":939,"title":940,"stem":941},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch13-common-gotchas\u002F13-common-gotchas","Common Gotchas — Exercises","shockwave-curriculum\u002Fexercises\u002Fch13-common-gotchas\u002F13-common-gotchas",{"path":943,"title":944,"stem":945},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch14-why-design-patterns\u002F14-why-design-patterns","Why Design Patterns? — Exercises","shockwave-curriculum\u002Fexercises\u002Fch14-why-design-patterns\u002F14-why-design-patterns",{"path":947,"title":948,"stem":949},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch15-advanced-collections\u002F15-advanced-collections","Advanced Collections (Set\u002FQueue\u002FMap) — Exercises","shockwave-curriculum\u002Fexercises\u002Fch15-advanced-collections\u002F15-advanced-collections",{"path":951,"title":952,"stem":953},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch16-writing-your-own-generics\u002F16-writing-your-own-generics","Writing Your Own Generics — Exercises","shockwave-curriculum\u002Fexercises\u002Fch16-writing-your-own-generics\u002F16-writing-your-own-generics",{"path":955,"title":956,"stem":957},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch17-inheritance-and-abstractions\u002F1-inheritance-superclass-subclass","Inheritance, Superclass, Subclass — Exercises","shockwave-curriculum\u002Fexercises\u002Fch17-inheritance-and-abstractions\u002F17.1-inheritance-superclass-subclass",{"path":959,"title":960,"stem":961},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch17-inheritance-and-abstractions\u002F2-inheritance-and-constructors","Inheritance and Constructors — Exercises","shockwave-curriculum\u002Fexercises\u002Fch17-inheritance-and-abstractions\u002F17.2-inheritance-and-constructors",{"path":963,"title":964,"stem":965},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch17-inheritance-and-abstractions\u002F3-inheritance-hierarchies","Inheritance Hierarchies — Exercises","shockwave-curriculum\u002Fexercises\u002Fch17-inheritance-and-abstractions\u002F17.3-inheritance-hierarchies",{"path":967,"title":968,"stem":969},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch17-inheritance-and-abstractions\u002F4-object-superclass","Object Superclass — Exercises","shockwave-curriculum\u002Fexercises\u002Fch17-inheritance-and-abstractions\u002F17.4-object-superclass",{"path":971,"title":972,"stem":973},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch17-inheritance-and-abstractions\u002F5-abstract-classes-and-methods","Abstract Classes and Methods — Exercises","shockwave-curriculum\u002Fexercises\u002Fch17-inheritance-and-abstractions\u002F17.5-abstract-classes-and-methods",{"path":975,"title":976,"stem":977},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch18-polymorphism-many-forms\u002F1-overriding-methods","Overriding Methods — Exercises","shockwave-curriculum\u002Fexercises\u002Fch18-polymorphism-many-forms\u002F18.1-overriding-methods",{"path":979,"title":980,"stem":981},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch18-polymorphism-many-forms\u002F2-super-keyword","super Keyword — Exercises","shockwave-curriculum\u002Fexercises\u002Fch18-polymorphism-many-forms\u002F18.2-super-keyword",{"path":983,"title":984,"stem":985},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch18-polymorphism-many-forms\u002F3-polymorphism","Polymorphism — Exercises","shockwave-curriculum\u002Fexercises\u002Fch18-polymorphism-many-forms\u002F18.3-polymorphism",{"path":987,"title":988,"stem":989},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch19-interfaces-as-contracts\u002F19-interfaces-as-contracts","Interfaces as Contracts — Exercises","shockwave-curriculum\u002Fexercises\u002Fch19-interfaces-as-contracts\u002F19-interfaces-as-contracts",{"path":991,"title":992,"stem":993},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch19-interfaces-as-contracts\u002F1-lambdas-and-method-references","Lambdas & Method References — Exercises","shockwave-curriculum\u002Fexercises\u002Fch19-interfaces-as-contracts\u002F19.1-lambdas-and-method-references",{"path":995,"title":996,"stem":997},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch20-the-io-layer-pattern\u002F20-the-io-layer-pattern","The IO-Layer Pattern — Exercises","shockwave-curriculum\u002Fexercises\u002Fch20-the-io-layer-pattern\u002F20-the-io-layer-pattern",{"path":999,"title":1000,"stem":1001},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch21-static-factories\u002F21-static-factories","Static Factories — Exercises","shockwave-curriculum\u002Fexercises\u002Fch21-static-factories\u002F21-static-factories",{"path":1003,"title":1004,"stem":1005},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch22-the-builder-pattern\u002F22-the-builder-pattern","The Builder Pattern — Exercises","shockwave-curriculum\u002Fexercises\u002Fch22-the-builder-pattern\u002F22-the-builder-pattern",{"path":1007,"title":1008,"stem":1009},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch23-encapsulation-and-final\u002F1-scope-and-access","Access, final, and Immutability — Exercises","shockwave-curriculum\u002Fexercises\u002Fch23-encapsulation-and-final\u002F23.1-scope-and-access",{"path":1011,"title":1012,"stem":1013},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch24-optional-avoiding-null-pointer-exceptions\u002F24-optional-avoiding-null-pointer-exceptions","Optional: Avoiding Null Pointer Exceptions — Exercises","shockwave-curriculum\u002Fexercises\u002Fch24-optional-avoiding-null-pointer-exceptions\u002F24-optional-avoiding-null-pointer-exceptions",{"path":1015,"title":1016,"stem":1017},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch25-command-based-programming\u002F1-what-is-command-based-programming","What Is Command-Based Programming? — Exercises","shockwave-curriculum\u002Fexercises\u002Fch25-command-based-programming\u002F25.1-what-is-command-based-programming",{"path":1019,"title":1020,"stem":1021},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch25-command-based-programming\u002F2-commands-and-command-compositions","Commands & Command Compositions — Exercises","shockwave-curriculum\u002Fexercises\u002Fch25-command-based-programming\u002F25.2-commands-and-command-compositions",{"path":1023,"title":1024,"stem":1025},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch25-command-based-programming\u002F3-the-command-scheduler","The Command Scheduler — Exercises","shockwave-curriculum\u002Fexercises\u002Fch25-command-based-programming\u002F25.3-the-command-scheduler",{"path":1027,"title":1028,"stem":1029},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch25-command-based-programming\u002F4-state-machines-logic","State Machines: Logic — Exercises","shockwave-curriculum\u002Fexercises\u002Fch25-command-based-programming\u002F25.4-state-machines-logic",{"path":1031,"title":1032,"stem":1033},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch25-command-based-programming\u002F5-managing-transitions","Managing Transitions — Exercises","shockwave-curriculum\u002Fexercises\u002Fch25-command-based-programming\u002F25.5-managing-transitions",{"path":1035,"title":1036,"stem":1037},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch25-command-based-programming\u002F6-binding-commands-to-triggers","Binding Commands to Triggers — Exercises","shockwave-curriculum\u002Fexercises\u002Fch25-command-based-programming\u002F25.6-binding-commands-to-triggers",{"path":1039,"title":1040,"stem":1041},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch25-command-based-programming\u002F7-structuring-a-command-based-robot-project","Structuring a Command-Based Robot Project — Exercises","shockwave-curriculum\u002Fexercises\u002Fch25-command-based-programming\u002F25.7-structuring-a-command-based-robot-project",{"path":1043,"title":1044,"stem":1045},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch26-architecture-takeaways\u002F26-architecture-takeaways","Architecture Takeaways — Exercises","shockwave-curriculum\u002Fexercises\u002Fch26-architecture-takeaways\u002F26-architecture-takeaways",{"path":1047,"title":1048,"stem":1049},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch27-program-design-and-abstraction\u002F1-abstraction-and-program-design","Abstraction and Program Design — Exercises","shockwave-curriculum\u002Fexercises\u002Fch27-program-design-and-abstraction\u002F27.1-abstraction-and-program-design",{"path":1051,"title":1052,"stem":1053},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch27-program-design-and-abstraction\u002F2-impact-of-program-design","Impact of Program Design — Exercises","shockwave-curriculum\u002Fexercises\u002Fch27-program-design-and-abstraction\u002F27.2-impact-of-program-design",{"path":1055,"title":1056,"stem":1057},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch28-algorithms-searching-sorting-recursion\u002F1-searching-algorithms","Searching Algorithms — Exercises","shockwave-curriculum\u002Fexercises\u002Fch28-algorithms-searching-sorting-recursion\u002F28.1-searching-algorithms",{"path":1059,"title":1060,"stem":1061},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch28-algorithms-searching-sorting-recursion\u002F2-sorting-algorithms","Sorting Algorithms — Exercises","shockwave-curriculum\u002Fexercises\u002Fch28-algorithms-searching-sorting-recursion\u002F28.2-sorting-algorithms",{"path":1063,"title":1064,"stem":1065},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch28-algorithms-searching-sorting-recursion\u002F3-recursion","Recursion — Exercises","shockwave-curriculum\u002Fexercises\u002Fch28-algorithms-searching-sorting-recursion\u002F28.3-recursion",{"path":1067,"title":1068,"stem":1069},"\u002Fshockwave-curriculum\u002Fexercises\u002Fch28-algorithms-searching-sorting-recursion\u002F4-recursive-searching-and-sorting","Recursive Searching and Sorting — Exercises","shockwave-curriculum\u002Fexercises\u002Fch28-algorithms-searching-sorting-recursion\u002F28.4-recursive-searching-and-sorting",{"id":1071,"title":298,"body":1072,"description":1082,"extension":1741,"meta":1742,"navigation":1136,"path":297,"seo":1745,"stem":299,"__hash__":1746},"lessons\u002Fshockwave-curriculum\u002Flessons\u002Fch26-architecture-takeaways\u002F26-architecture-takeaways.md",{"type":1073,"value":1074,"toc":1733},"minimark",[1075,1079,1083,1088,1096,1162,1166,1176,1276,1280,1283,1294,1370,1388,1394,1400,1560,1573,1662,1666,1669,1673,1700,1704,1718,1729],[1076,1077,298],"h1",{"id":1078},"architecture-takeaways",[1080,1081,1082],"p",{},"Java II opened (Ch.14) with why patterns matter at all. This chapter closes out Java II's core sequence by naming the general software-engineering principles that everything since — inheritance, interfaces, the IO-Layer Pattern, factories, builders, command-based itself — has actually been demonstrating in FRC-specific form. These aren't FRC-specific or Java-specific ideas; they're widely known across the software industry, which is exactly why they're worth naming explicitly.",[1084,1085,1087],"h2",{"id":1086},"dry-dont-repeat-yourself","DRY: Don't Repeat Yourself",[1080,1089,1090,1091,1095],{},"If the same logic (or the same literal value) appears in more than one place, a future change has to remember to update every copy — and it's easy to miss one. The fix is almost always one of the tools this curriculum already covered: pull shared behavior into a common superclass (Ch.17), a shared utility method, or a single ",[1092,1093,1094],"code",{},"Constants"," class (Ch.25.7) instead of copy-pasting a magic number into five different files.",[1097,1098,1103],"pre",{"className":1099,"code":1100,"language":1101,"meta":1102,"style":1102},"language-java shiki shiki-themes github-light github-dark","\u002F\u002F NOT DRY — the same speed value is hardcoded in three places\nintakeMotor.setThrottle(0.8);\nindexerMotor.setThrottle(0.8);\nfeederMotor.setThrottle(0.8);\n\n\u002F\u002F DRY — one named constant, one place to change it\nintakeMotor.setThrottle(IntakeConstants.ROLLER_SPEED);\nindexerMotor.setThrottle(IntakeConstants.ROLLER_SPEED);\nfeederMotor.setThrottle(IntakeConstants.ROLLER_SPEED);\n","java","",[1092,1104,1105,1113,1119,1125,1131,1138,1144,1150,1156],{"__ignoreMap":1102},[1106,1107,1110],"span",{"class":1108,"line":1109},"line",1,[1106,1111,1112],{},"\u002F\u002F NOT DRY — the same speed value is hardcoded in three places\n",[1106,1114,1116],{"class":1108,"line":1115},2,[1106,1117,1118],{},"intakeMotor.setThrottle(0.8);\n",[1106,1120,1122],{"class":1108,"line":1121},3,[1106,1123,1124],{},"indexerMotor.setThrottle(0.8);\n",[1106,1126,1128],{"class":1108,"line":1127},4,[1106,1129,1130],{},"feederMotor.setThrottle(0.8);\n",[1106,1132,1134],{"class":1108,"line":1133},5,[1106,1135,1137],{"emptyLinePlaceholder":1136},true,"\n",[1106,1139,1141],{"class":1108,"line":1140},6,[1106,1142,1143],{},"\u002F\u002F DRY — one named constant, one place to change it\n",[1106,1145,1147],{"class":1108,"line":1146},7,[1106,1148,1149],{},"intakeMotor.setThrottle(IntakeConstants.ROLLER_SPEED);\n",[1106,1151,1153],{"class":1108,"line":1152},8,[1106,1154,1155],{},"indexerMotor.setThrottle(IntakeConstants.ROLLER_SPEED);\n",[1106,1157,1159],{"class":1108,"line":1158},9,[1106,1160,1161],{},"feederMotor.setThrottle(IntakeConstants.ROLLER_SPEED);\n",[1084,1163,1165],{"id":1164},"yagni-you-aint-gonna-need-it","YAGNI: You Ain't Gonna Need It",[1080,1167,1168,1169,1172,1173,1175],{},"Don't build flexibility or abstraction for a requirement that doesn't exist yet — every layer of abstraction (a ",[1092,1170,1171],{},"Builder",", Ch.22; a generic type, Ch.16; an extra interface) has a real cost in complexity, and that cost is only worth paying once the actual need shows up. A ",[1092,1174,1171],{}," for a 2-parameter class, or a factory (Ch.21) that only ever returns one concrete implementation, is YAGNI in practice: solving a problem the code doesn't actually have yet, at the expense of a codebase that's harder to read today for a payoff that may never arrive.",[1097,1177,1179],{"className":1099,"code":1178,"language":1101,"meta":1102,"style":1102},"\u002F\u002F YAGNI violation — a Builder for a class that only ever needs two values\npublic class FieldPosition\n{\n    public static class Builder\n    {\n        private double x, y;\n        public Builder x(double x) { this.x = x; return this; }\n        public Builder y(double y) { this.y = y; return this; }\n        public FieldPosition build() { return new FieldPosition(x, y); }\n    }\n    \u002F\u002F ...\n}\n\n\u002F\u002F YAGNI-respecting — a two-parameter constructor is all this ever needs\npublic class FieldPosition\n{\n    public FieldPosition(double x, double y) { \u002F* ... *\u002F }\n}\n",[1092,1180,1181,1186,1191,1196,1201,1206,1211,1216,1221,1226,1232,1238,1244,1249,1255,1260,1265,1271],{"__ignoreMap":1102},[1106,1182,1183],{"class":1108,"line":1109},[1106,1184,1185],{},"\u002F\u002F YAGNI violation — a Builder for a class that only ever needs two values\n",[1106,1187,1188],{"class":1108,"line":1115},[1106,1189,1190],{},"public class FieldPosition\n",[1106,1192,1193],{"class":1108,"line":1121},[1106,1194,1195],{},"{\n",[1106,1197,1198],{"class":1108,"line":1127},[1106,1199,1200],{},"    public static class Builder\n",[1106,1202,1203],{"class":1108,"line":1133},[1106,1204,1205],{},"    {\n",[1106,1207,1208],{"class":1108,"line":1140},[1106,1209,1210],{},"        private double x, y;\n",[1106,1212,1213],{"class":1108,"line":1146},[1106,1214,1215],{},"        public Builder x(double x) { this.x = x; return this; }\n",[1106,1217,1218],{"class":1108,"line":1152},[1106,1219,1220],{},"        public Builder y(double y) { this.y = y; return this; }\n",[1106,1222,1223],{"class":1108,"line":1158},[1106,1224,1225],{},"        public FieldPosition build() { return new FieldPosition(x, y); }\n",[1106,1227,1229],{"class":1108,"line":1228},10,[1106,1230,1231],{},"    }\n",[1106,1233,1235],{"class":1108,"line":1234},11,[1106,1236,1237],{},"    \u002F\u002F ...\n",[1106,1239,1241],{"class":1108,"line":1240},12,[1106,1242,1243],{},"}\n",[1106,1245,1247],{"class":1108,"line":1246},13,[1106,1248,1137],{"emptyLinePlaceholder":1136},[1106,1250,1252],{"class":1108,"line":1251},14,[1106,1253,1254],{},"\u002F\u002F YAGNI-respecting — a two-parameter constructor is all this ever needs\n",[1106,1256,1258],{"class":1108,"line":1257},15,[1106,1259,1190],{},[1106,1261,1263],{"class":1108,"line":1262},16,[1106,1264,1195],{},[1106,1266,1268],{"class":1108,"line":1267},17,[1106,1269,1270],{},"    public FieldPosition(double x, double y) { \u002F* ... *\u002F }\n",[1106,1272,1274],{"class":1108,"line":1273},18,[1106,1275,1243],{},[1084,1277,1279],{"id":1278},"solid-five-principles-one-letter-each","SOLID: Five Principles, One Letter Each",[1080,1281,1282],{},"SOLID isn't a single idea — it's an acronym for five distinct principles, each addressing a different way a class or module's design can go wrong. All five show up somewhere in this curriculum already, even though they weren't named until now:",[1080,1284,1285,1289,1290,1293],{},[1286,1287,1288],"strong",{},"S — Single Responsibility."," A class should have one, and only one, reason to change. A ",[1092,1291,1292],{},"Mechanism"," (Ch.25) that only manages one piece of hardware is a direct application of this — its only job is that hardware, not also handling button bindings or autonomous logic.",[1097,1295,1297],{"className":1099,"code":1296,"language":1101,"meta":1102,"style":1102},"\u002F\u002F Violates SRP — two unrelated reasons to change live in the same class\npublic class MatchReport\n{\n    public double averageCycleTime(double[] cycleTimes) { \u002F* ... *\u002F }\n    public void printToConsole(double average) { \u002F* ... *\u002F }\n}\n\n\u002F\u002F Follows SRP — each class now has exactly one reason to change\npublic class CycleTimeCalculator\n{\n    public double averageCycleTime(double[] cycleTimes) { \u002F* ... *\u002F }\n}\npublic class ReportPrinter\n{\n    public void printToConsole(double average) { \u002F* ... *\u002F }\n}\n",[1092,1298,1299,1304,1309,1313,1318,1323,1327,1331,1336,1341,1345,1349,1353,1358,1362,1366],{"__ignoreMap":1102},[1106,1300,1301],{"class":1108,"line":1109},[1106,1302,1303],{},"\u002F\u002F Violates SRP — two unrelated reasons to change live in the same class\n",[1106,1305,1306],{"class":1108,"line":1115},[1106,1307,1308],{},"public class MatchReport\n",[1106,1310,1311],{"class":1108,"line":1121},[1106,1312,1195],{},[1106,1314,1315],{"class":1108,"line":1127},[1106,1316,1317],{},"    public double averageCycleTime(double[] cycleTimes) { \u002F* ... *\u002F }\n",[1106,1319,1320],{"class":1108,"line":1133},[1106,1321,1322],{},"    public void printToConsole(double average) { \u002F* ... *\u002F }\n",[1106,1324,1325],{"class":1108,"line":1140},[1106,1326,1243],{},[1106,1328,1329],{"class":1108,"line":1146},[1106,1330,1137],{"emptyLinePlaceholder":1136},[1106,1332,1333],{"class":1108,"line":1152},[1106,1334,1335],{},"\u002F\u002F Follows SRP — each class now has exactly one reason to change\n",[1106,1337,1338],{"class":1108,"line":1158},[1106,1339,1340],{},"public class CycleTimeCalculator\n",[1106,1342,1343],{"class":1108,"line":1228},[1106,1344,1195],{},[1106,1346,1347],{"class":1108,"line":1234},[1106,1348,1317],{},[1106,1350,1351],{"class":1108,"line":1240},[1106,1352,1243],{},[1106,1354,1355],{"class":1108,"line":1246},[1106,1356,1357],{},"public class ReportPrinter\n",[1106,1359,1360],{"class":1108,"line":1251},[1106,1361,1195],{},[1106,1363,1364],{"class":1108,"line":1257},[1106,1365,1322],{},[1106,1367,1368],{"class":1108,"line":1262},[1106,1369,1243],{},[1080,1371,1372,1375,1376,1379,1380,1383,1384,1387],{},[1286,1373,1374],{},"O — Open\u002FClosed."," A module should be open for extension, but closed for modification — you should be able to add new behavior without editing code that already works. The IO-Layer Pattern (Ch.20) is a textbook example: adding a brand-new ",[1092,1377,1378],{},"IntakeIOSim"," implementation never requires touching ",[1092,1381,1382],{},"Intake","'s own logic, since both implementations honor the same ",[1092,1385,1386],{},"IntakeIO"," contract.",[1080,1389,1390,1393],{},[1286,1391,1392],{},"L — Liskov Substitution."," A subclass should be usable anywhere its superclass is expected, without breaking anything. This is exactly the is-a substitution test from Ch.17.1 — if substituting a subclass object somewhere a superclass is expected changes the correctness of the code, the inheritance relationship was wrong to begin with.",[1080,1395,1396,1399],{},[1286,1397,1398],{},"I — Interface Segregation (Ch.19)."," Don't force a class to implement methods it doesn't actually need, just because they're bundled into one large interface. Several small, focused interfaces (each describing one real capability) are preferable to one bloated interface everything is forced to implement in full.",[1097,1401,1403],{"className":1099,"code":1402,"language":1101,"meta":1102,"style":1102},"\u002F\u002F Violates ISP — every implementer is forced to have a setAngle() method,\n\u002F\u002F even ones that can't rotate\npublic interface PoweredDevice\n{\n    void setThrottle(double speed);\n    void setAngle(double degrees);\n}\n\npublic class Roller implements PoweredDevice\n{\n    public void setThrottle(double speed) { \u002F* ... *\u002F }\n\n    public void setAngle(double degrees) \u002F\u002F forced, unused\n    {\n        throw new UnsupportedOperationException(\"can't rotate\");\n    }\n}\n\n\u002F\u002F Follows ISP — split into focused interfaces; implement only what you actually support\npublic interface Throttled\n{\n    void setThrottle(double speed);\n}\npublic interface Rotatable\n{\n    void setAngle(double degrees);\n}\n\npublic class Roller implements Throttled\n{\n    public void setThrottle(double speed) { \u002F* ... *\u002F }\n}\n",[1092,1404,1405,1410,1415,1420,1424,1429,1434,1438,1442,1447,1451,1456,1460,1465,1469,1474,1478,1482,1486,1492,1498,1503,1508,1513,1519,1524,1529,1534,1539,1545,1550,1555],{"__ignoreMap":1102},[1106,1406,1407],{"class":1108,"line":1109},[1106,1408,1409],{},"\u002F\u002F Violates ISP — every implementer is forced to have a setAngle() method,\n",[1106,1411,1412],{"class":1108,"line":1115},[1106,1413,1414],{},"\u002F\u002F even ones that can't rotate\n",[1106,1416,1417],{"class":1108,"line":1121},[1106,1418,1419],{},"public interface PoweredDevice\n",[1106,1421,1422],{"class":1108,"line":1127},[1106,1423,1195],{},[1106,1425,1426],{"class":1108,"line":1133},[1106,1427,1428],{},"    void setThrottle(double speed);\n",[1106,1430,1431],{"class":1108,"line":1140},[1106,1432,1433],{},"    void setAngle(double degrees);\n",[1106,1435,1436],{"class":1108,"line":1146},[1106,1437,1243],{},[1106,1439,1440],{"class":1108,"line":1152},[1106,1441,1137],{"emptyLinePlaceholder":1136},[1106,1443,1444],{"class":1108,"line":1158},[1106,1445,1446],{},"public class Roller implements PoweredDevice\n",[1106,1448,1449],{"class":1108,"line":1228},[1106,1450,1195],{},[1106,1452,1453],{"class":1108,"line":1234},[1106,1454,1455],{},"    public void setThrottle(double speed) { \u002F* ... *\u002F }\n",[1106,1457,1458],{"class":1108,"line":1240},[1106,1459,1137],{"emptyLinePlaceholder":1136},[1106,1461,1462],{"class":1108,"line":1246},[1106,1463,1464],{},"    public void setAngle(double degrees) \u002F\u002F forced, unused\n",[1106,1466,1467],{"class":1108,"line":1251},[1106,1468,1205],{},[1106,1470,1471],{"class":1108,"line":1257},[1106,1472,1473],{},"        throw new UnsupportedOperationException(\"can't rotate\");\n",[1106,1475,1476],{"class":1108,"line":1262},[1106,1477,1231],{},[1106,1479,1480],{"class":1108,"line":1267},[1106,1481,1243],{},[1106,1483,1484],{"class":1108,"line":1273},[1106,1485,1137],{"emptyLinePlaceholder":1136},[1106,1487,1489],{"class":1108,"line":1488},19,[1106,1490,1491],{},"\u002F\u002F Follows ISP — split into focused interfaces; implement only what you actually support\n",[1106,1493,1495],{"class":1108,"line":1494},20,[1106,1496,1497],{},"public interface Throttled\n",[1106,1499,1501],{"class":1108,"line":1500},21,[1106,1502,1195],{},[1106,1504,1506],{"class":1108,"line":1505},22,[1106,1507,1428],{},[1106,1509,1511],{"class":1108,"line":1510},23,[1106,1512,1243],{},[1106,1514,1516],{"class":1108,"line":1515},24,[1106,1517,1518],{},"public interface Rotatable\n",[1106,1520,1522],{"class":1108,"line":1521},25,[1106,1523,1195],{},[1106,1525,1527],{"class":1108,"line":1526},26,[1106,1528,1433],{},[1106,1530,1532],{"class":1108,"line":1531},27,[1106,1533,1243],{},[1106,1535,1537],{"class":1108,"line":1536},28,[1106,1538,1137],{"emptyLinePlaceholder":1136},[1106,1540,1542],{"class":1108,"line":1541},29,[1106,1543,1544],{},"public class Roller implements Throttled\n",[1106,1546,1548],{"class":1108,"line":1547},30,[1106,1549,1195],{},[1106,1551,1553],{"class":1108,"line":1552},31,[1106,1554,1455],{},[1106,1556,1558],{"class":1108,"line":1557},32,[1106,1559,1243],{},[1080,1561,1562,1565,1566,1568,1569,1572],{},[1286,1563,1564],{},"D — Dependency Inversion."," Code should depend on abstractions (interfaces), not concrete implementations. Every constructor that accepts an ",[1092,1567,1386],{}," instead of hardcoding ",[1092,1570,1571],{},"new IntakeIOReal()"," directly (Ch.20\u002F21), and every static factory returning an interface type rather than a specific class (Ch.21), is dependency inversion in action.",[1097,1574,1576],{"className":1099,"code":1575,"language":1101,"meta":1102,"style":1102},"\u002F\u002F Violates DIP — IntakeController is hardcoded to one concrete implementation\npublic class IntakeController\n{\n    private final IntakeIOReal io = new IntakeIOReal(); \u002F\u002F depends on a concrete class\n    public void run(double speed) { io.setThrottle(speed); }\n}\n\n\u002F\u002F Follows DIP — IntakeController depends on an abstraction, not a concrete class\npublic class IntakeController\n{\n    private final IntakeIO io;\n\n    public IntakeController(IntakeIO io) \u002F\u002F any IntakeIO implementation works\n    {\n        this.io = io;\n    }\n\n    public void run(double speed) { io.setThrottle(speed); }\n}\n",[1092,1577,1578,1583,1588,1592,1597,1602,1606,1610,1615,1619,1623,1628,1632,1637,1641,1646,1650,1654,1658],{"__ignoreMap":1102},[1106,1579,1580],{"class":1108,"line":1109},[1106,1581,1582],{},"\u002F\u002F Violates DIP — IntakeController is hardcoded to one concrete implementation\n",[1106,1584,1585],{"class":1108,"line":1115},[1106,1586,1587],{},"public class IntakeController\n",[1106,1589,1590],{"class":1108,"line":1121},[1106,1591,1195],{},[1106,1593,1594],{"class":1108,"line":1127},[1106,1595,1596],{},"    private final IntakeIOReal io = new IntakeIOReal(); \u002F\u002F depends on a concrete class\n",[1106,1598,1599],{"class":1108,"line":1133},[1106,1600,1601],{},"    public void run(double speed) { io.setThrottle(speed); }\n",[1106,1603,1604],{"class":1108,"line":1140},[1106,1605,1243],{},[1106,1607,1608],{"class":1108,"line":1146},[1106,1609,1137],{"emptyLinePlaceholder":1136},[1106,1611,1612],{"class":1108,"line":1152},[1106,1613,1614],{},"\u002F\u002F Follows DIP — IntakeController depends on an abstraction, not a concrete class\n",[1106,1616,1617],{"class":1108,"line":1158},[1106,1618,1587],{},[1106,1620,1621],{"class":1108,"line":1228},[1106,1622,1195],{},[1106,1624,1625],{"class":1108,"line":1234},[1106,1626,1627],{},"    private final IntakeIO io;\n",[1106,1629,1630],{"class":1108,"line":1240},[1106,1631,1137],{"emptyLinePlaceholder":1136},[1106,1633,1634],{"class":1108,"line":1246},[1106,1635,1636],{},"    public IntakeController(IntakeIO io) \u002F\u002F any IntakeIO implementation works\n",[1106,1638,1639],{"class":1108,"line":1251},[1106,1640,1205],{},[1106,1642,1643],{"class":1108,"line":1257},[1106,1644,1645],{},"        this.io = io;\n",[1106,1647,1648],{"class":1108,"line":1262},[1106,1649,1231],{},[1106,1651,1652],{"class":1108,"line":1267},[1106,1653,1137],{"emptyLinePlaceholder":1136},[1106,1655,1656],{"class":1108,"line":1273},[1106,1657,1601],{},[1106,1659,1660],{"class":1108,"line":1488},[1106,1661,1243],{},[1084,1663,1665],{"id":1664},"why-name-these-at-all","Why Name These at All",[1080,1667,1668],{},"None of DRY, YAGNI, or SOLID are FRC-specific or even Java-specific — they're widely-used vocabulary across the whole software industry, which is exactly the \"common language\" benefit Ch.14 opened with. Being able to say \"this violates single responsibility\" or \"that's YAGNI\" communicates a specific, well-understood critique in a few words, to any programmer familiar with these terms — not just people who've read this particular curriculum.",[1084,1670,1672],{"id":1671},"common-pitfalls","Common Pitfalls",[1674,1675,1676,1683,1694],"ul",{},[1677,1678,1679,1682],"li",{},[1286,1680,1681],{},"Applying DRY so aggressively that unrelated code gets forced together."," Two pieces of code that happen to look similar today, but for unrelated reasons, don't necessarily belong in one shared abstraction — premature DRY-ing can create awkward, tangled dependencies between things that should stay separate.",[1677,1684,1685,1688,1689,1693],{},[1286,1686,1687],{},"Treating YAGNI as an excuse to never plan ahead."," YAGNI argues against building unneeded flexibility ",[1690,1691,1692],"em",{},"now"," — it doesn't mean ignoring architecture altogether; the IO-Layer Pattern (Ch.20) is worth its overhead in FRC precisely because simulation and hardware-swapping are real, common needs, not speculative ones.",[1677,1695,1696,1699],{},[1286,1697,1698],{},"Only remembering the \"S\" of SOLID."," The common shorthand (\"one class, one responsibility\") is genuinely just Single Responsibility — SOLID names four more distinct principles beyond that one.",[1084,1701,1703],{"id":1702},"key-takeaways","Key Takeaways",[1674,1705,1706,1709,1712,1715],{},[1677,1707,1708],{},"DRY: don't duplicate logic or values — a single source of truth (a constant, a shared method, a superclass) means one place to fix or change something.",[1677,1710,1711],{},"YAGNI: don't build abstraction or flexibility for a need that doesn't exist yet — every layer of indirection has a real cost, worth paying only once it's actually needed.",[1677,1713,1714],{},"SOLID is five separate principles — Single Responsibility, Open\u002FClosed, Liskov Substitution, Interface Segregation, Dependency Inversion — each already demonstrated somewhere in this curriculum's FRC examples.",[1677,1716,1717],{},"These principles are industry-standard vocabulary, not FRC- or Java-specific — naming them precisely is itself a form of the \"common language\" benefit patterns provide (Ch.14).",[1080,1719,1720,1721,1724,1725,1728],{},"Derived from ",[1092,1722,1723],{},"mechacoder-test",": ",[1092,1726,1727],{},"src\u002Flessons\u002Fjava-2.js",", slide 13 (\"Architecture Takeaways\") — original deck content, expanded here since SOLID is a real five-principle acronym the original slide only partially named",[1730,1731,1732],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":1102,"searchDepth":1115,"depth":1115,"links":1734},[1735,1736,1737,1738,1739,1740],{"id":1086,"depth":1115,"text":1087},{"id":1164,"depth":1115,"text":1165},{"id":1278,"depth":1115,"text":1279},{"id":1664,"depth":1115,"text":1665},{"id":1671,"depth":1115,"text":1672},{"id":1702,"depth":1115,"text":1703},"md",{"outlineRef":1743,"status":1744},"26 — Architecture Takeaways (DRY\u002FYAGNI\u002FSOLID) (no citation — deck-original content; neither WPILib nor T5817 teach these as named general principles)","new — authored lesson (fuller depth than the teaser slide)",{"title":298,"description":1082},"91dZnz3uUnhLzhuNhpOKMkjHKFFGuU93rWV5d0601Ms",{"id":1748,"title":731,"body":1749,"description":1102,"extension":1741,"meta":2008,"navigation":1136,"path":730,"seo":2011,"stem":732,"__hash__":2012},"examples\u002Fshockwave-curriculum\u002Fexamples\u002Fch26-architecture-takeaways\u002F26-architecture-takeaways.md",{"type":1073,"value":1750,"toc":1999},[1751,1754,1758,1769,1773,1819,1822,1830,1836,1846,1856,1876,1879,1883,1893,1951,1954,1958,1961,1970,1973,1979,1982,1986,1997],[1076,1752,731],{"id":1753},"architecture-takeaways-worked-example",[1084,1755,1757],{"id":1756},"problem","Problem",[1080,1759,1760,1761,1764,1765,1768],{},"A teammate's climber code reports three settings, and all three happen to be ",[1092,1762,1763],{},"0.5",": the winch speed while extending, the winch speed while retracting, and the brightness of the climber's status light. The drive coach wants the winch sped up to ",[1092,1766,1767],{},"0.6"," in both directions — but the status light should stay exactly as bright as it is. Refactor the code so it follows DRY, without forcing unrelated values together.",[1084,1770,1772],{"id":1771},"step-1-start-from-the-repeated-version","Step 1: Start From the Repeated Version",[1097,1774,1776],{"className":1099,"code":1775,"language":1101,"meta":1102,"style":1102},"public class Climber\n{\n    public static void main(String[] args)\n    {\n        System.out.println(\"Extending at speed \" + 0.5);\n        System.out.println(\"Retracting at speed \" + 0.5);\n        System.out.println(\"Status light brightness \" + 0.5);\n    }\n}\n",[1092,1777,1778,1783,1787,1792,1796,1801,1806,1811,1815],{"__ignoreMap":1102},[1106,1779,1780],{"class":1108,"line":1109},[1106,1781,1782],{},"public class Climber\n",[1106,1784,1785],{"class":1108,"line":1115},[1106,1786,1195],{},[1106,1788,1789],{"class":1108,"line":1121},[1106,1790,1791],{},"    public static void main(String[] args)\n",[1106,1793,1794],{"class":1108,"line":1127},[1106,1795,1205],{},[1106,1797,1798],{"class":1108,"line":1133},[1106,1799,1800],{},"        System.out.println(\"Extending at speed \" + 0.5);\n",[1106,1802,1803],{"class":1108,"line":1140},[1106,1804,1805],{},"        System.out.println(\"Retracting at speed \" + 0.5);\n",[1106,1807,1808],{"class":1108,"line":1146},[1106,1809,1810],{},"        System.out.println(\"Status light brightness \" + 0.5);\n",[1106,1812,1813],{"class":1108,"line":1152},[1106,1814,1231],{},[1106,1816,1817],{"class":1108,"line":1158},[1106,1818,1243],{},[1080,1820,1821],{},"Prints:",[1097,1823,1828],{"className":1824,"code":1826,"language":1827},[1825],"language-text","Extending at speed 0.5\nRetracting at speed 0.5\nStatus light brightness 0.5\n","text",[1092,1829,1826],{"__ignoreMap":1102},[1080,1831,1832,1833,1835],{},"The same literal ",[1092,1834,1763],{}," appears three times. To make the coach's change, someone has to find every copy and decide which ones to edit — and missing one (say, updating extend but not retract) would leave the winch running at two different speeds, with nothing to warn anyone.",[1084,1837,1839,1840,1843,1844],{"id":1838},"step-2-ask-why-each-value-is-05","Step 2: Ask ",[1690,1841,1842],{},"Why"," Each Value Is ",[1092,1845,1763],{},[1080,1847,1848,1849,1852,1853,1855],{},"DRY is about duplicated ",[1690,1850,1851],{},"knowledge",", not duplicated characters. Before merging anything, check what each ",[1092,1854,1763],{}," actually means:",[1674,1857,1858,1865],{},[1677,1859,1860,1861,1864],{},"Extending speed and retracting speed are the ",[1286,1862,1863],{},"same fact"," — \"how fast the winch runs.\" The coach's request changes both together, so they should come from one source.",[1677,1866,1867,1868,1871,1872,1875],{},"Status light brightness is a ",[1286,1869,1870],{},"different fact"," that just happens to have the same value today. The coach's request should ",[1690,1873,1874],{},"not"," change it.",[1080,1877,1878],{},"This is the lesson's first Common Pitfall in action: forcing all three into one shared constant because they look the same would tie the light's brightness to the winch speed — an awkward, accidental dependency between two things that should stay separate.",[1084,1880,1882],{"id":1881},"step-3-one-named-constant-per-real-fact","Step 3: One Named Constant per Real Fact",[1080,1884,1885,1886,1889,1890,1892],{},"Use ",[1092,1887,1888],{},"public static final"," constants (Ch.7.4, and the same ",[1092,1891,1094],{}," style as Ch.25.7) — one for each distinct fact:",[1097,1894,1896],{"className":1099,"code":1895,"language":1101,"meta":1102,"style":1102},"public class Climber\n{\n    public static final double WINCH_SPEED = 0.5;\n    public static final double LED_BRIGHTNESS = 0.5;\n\n    public static void main(String[] args)\n    {\n        System.out.println(\"Extending at speed \" + WINCH_SPEED);\n        System.out.println(\"Retracting at speed \" + WINCH_SPEED);\n        System.out.println(\"Status light brightness \" + LED_BRIGHTNESS);\n    }\n}\n",[1092,1897,1898,1902,1906,1911,1916,1920,1924,1928,1933,1938,1943,1947],{"__ignoreMap":1102},[1106,1899,1900],{"class":1108,"line":1109},[1106,1901,1782],{},[1106,1903,1904],{"class":1108,"line":1115},[1106,1905,1195],{},[1106,1907,1908],{"class":1108,"line":1121},[1106,1909,1910],{},"    public static final double WINCH_SPEED = 0.5;\n",[1106,1912,1913],{"class":1108,"line":1127},[1106,1914,1915],{},"    public static final double LED_BRIGHTNESS = 0.5;\n",[1106,1917,1918],{"class":1108,"line":1133},[1106,1919,1137],{"emptyLinePlaceholder":1136},[1106,1921,1922],{"class":1108,"line":1140},[1106,1923,1791],{},[1106,1925,1926],{"class":1108,"line":1146},[1106,1927,1205],{},[1106,1929,1930],{"class":1108,"line":1152},[1106,1931,1932],{},"        System.out.println(\"Extending at speed \" + WINCH_SPEED);\n",[1106,1934,1935],{"class":1108,"line":1158},[1106,1936,1937],{},"        System.out.println(\"Retracting at speed \" + WINCH_SPEED);\n",[1106,1939,1940],{"class":1108,"line":1228},[1106,1941,1942],{},"        System.out.println(\"Status light brightness \" + LED_BRIGHTNESS);\n",[1106,1944,1945],{"class":1108,"line":1234},[1106,1946,1231],{},[1106,1948,1949],{"class":1108,"line":1240},[1106,1950,1243],{},[1080,1952,1953],{},"The output is identical to Step 1 — refactoring for DRY changes where a value lives, not what the program does.",[1084,1955,1957],{"id":1956},"step-4-make-the-coachs-change-in-one-place","Step 4: Make the Coach's Change — in One Place",[1080,1959,1960],{},"Now the requested change is a single edit:",[1097,1962,1964],{"className":1099,"code":1963,"language":1101,"meta":1102,"style":1102},"public static final double WINCH_SPEED = 0.6;\n",[1092,1965,1966],{"__ignoreMap":1102},[1106,1967,1968],{"class":1108,"line":1109},[1106,1969,1963],{},[1080,1971,1972],{},"With everything else left exactly as in Step 3, it prints:",[1097,1974,1977],{"className":1975,"code":1976,"language":1827},[1825],"Extending at speed 0.6\nRetracting at speed 0.6\nStatus light brightness 0.5\n",[1092,1978,1976],{"__ignoreMap":1102},[1080,1980,1981],{},"Both winch directions moved together because they share one source of truth, and the light stayed put because it has its own. Neither outcome depended on anyone remembering to hunt down every copy.",[1084,1983,1985],{"id":1984},"recap","Recap",[1674,1987,1988,1991,1994],{},[1677,1989,1990],{},"DRY means one source of truth for each piece of knowledge — here, one named constant per real setting.",[1677,1992,1993],{},"Before merging duplicated values, ask whether they're the same fact or just the same number today; only the same fact belongs in one shared constant.",[1677,1995,1996],{},"A DRY refactor shouldn't change behavior on its own — it changes how many places a future edit has to touch (ideally, one).",[1730,1998,1732],{},{"title":1102,"searchDepth":1115,"depth":1115,"links":2000},[2001,2002,2003,2005,2006,2007],{"id":1756,"depth":1115,"text":1757},{"id":1771,"depth":1115,"text":1772},{"id":1838,"depth":1115,"text":2004},"Step 2: Ask Why Each Value Is 0.5",{"id":1881,"depth":1115,"text":1882},{"id":1956,"depth":1115,"text":1957},{"id":1984,"depth":1115,"text":1985},{"outlineRef":1743,"pairsWith":2009,"status":2010},"[`lessons\u002Fch26-architecture-takeaways\u002F26-architecture-takeaways.md`](..\u002F..\u002Flessons\u002Fch26-architecture-takeaways\u002F26-architecture-takeaways.md)","new — authored worked example (fully solved, walked step by step — not a problem to attempt)",{"title":731,"description":1102},"NvCpadE2A1_XzfWK3EchvQYRCwouPIU7R7La0M0JQBU",{"id":2014,"title":1044,"body":2015,"description":1102,"extension":1741,"meta":3689,"navigation":1136,"path":1043,"seo":3691,"stem":1045,"__hash__":3692},"exercises\u002Fshockwave-curriculum\u002Fexercises\u002Fch26-architecture-takeaways\u002F26-architecture-takeaways.md",{"type":1073,"value":2016,"toc":3684},[2017,2020,2024,2034,2039,2053,2059,2068,2082,2086,2096,2099,2155,2160,2209,2277,2281,2287,2308,2404,2417,2422,2831,2836,2841,2847,2852,2858,2863,2867,2873,2877,2883,2888,2892,2898,2902,2908,2913,2917,2923,2927,2933,2938,2942,2948,2952,2958,2963,2967,2973,2977,2982,2987,3617,3682],[1076,2018,1044],{"id":2019},"architecture-takeaways-exercises",[1084,2021,2023],{"id":2022},"multiple-choice","Multiple Choice",[1080,2025,2026,2029,2030,2033],{},[1286,2027,2028],{},"Question:"," A team's ",[1092,2031,2032],{},"Elevator"," mechanism class moves the elevator motor to a target height — and it also reads the driver's joystick buttons and decides which autonomous routine to run at the start of a match. Which SOLID principle does this design most directly violate?",[1080,2035,2036],{},[1286,2037,2038],{},"Options:",[1674,2040,2041,2044,2047,2050],{},[1677,2042,2043],{},"A. Single Responsibility",[1677,2045,2046],{},"B. Open\u002FClosed",[1677,2048,2049],{},"C. Liskov Substitution",[1677,2051,2052],{},"D. Dependency Inversion",[1080,2054,2055,2058],{},[1286,2056,2057],{},"Answer:"," A",[1080,2060,2061,2064,2065,2067],{},[1286,2062,2063],{},"Why:"," Single Responsibility says a class should have one, and only one, reason to change. This ",[1092,2066,2032],{}," has at least three: a change to the elevator hardware, a change to the button layout, and a change to the autonomous plan would all force edits to the same class. A mechanism's only job should be its own piece of hardware.",[1674,2069,2070,2073,2076],{},[1677,2071,2072],{},"B is wrong — Open\u002FClosed is about adding new behavior without editing code that already works (like adding a new IO implementation without touching the mechanism). Nothing here describes extending the class; the problem is how many unrelated jobs it already has.",[1677,2074,2075],{},"C is wrong — Liskov Substitution is about a subclass being usable anywhere its superclass is expected. No subclass or substitution is involved in this description at all.",[1677,2077,2078,2079,2081],{},"D is wrong — Dependency Inversion is about depending on interfaces rather than concrete implementations. The description doesn't say anything about what types ",[1092,2080,2032],{}," depends on; its problem is doing too many different jobs.",[1084,2083,2085],{"id":2084},"micro-parsons","Micro-Parsons",[1080,2087,2088,2091,2092,2095],{},[1286,2089,2090],{},"Problem:"," These lines, once correctly ordered, form a complete program that prints the controller rumble strength for the driver first, then for the operator — with the strength defined once, as a single named constant, instead of repeating the same number in both places. Declare the constant field before ",[1092,2093,2094],{},"main",".",[1080,2097,2098],{},"Reorder the fragments below into a working program:",[1674,2100,2101,2107,2113,2119,2125,2131,2137,2143,2149],{},[1677,2102,2103,2104],{},"a. ",[1092,2105,2106],{},"        System.out.println(\"Operator rumble: \" + RUMBLE_STRENGTH);",[1677,2108,2109,2110],{},"b. ",[1092,2111,2112],{},"    {",[1677,2114,2115,2116],{},"c. ",[1092,2117,2118],{},"public class RumbleAlert",[1677,2120,2121,2122],{},"d. ",[1092,2123,2124],{},"}",[1677,2126,2127,2128],{},"e. ",[1092,2129,2130],{},"    public static final double RUMBLE_STRENGTH = 0.7;",[1677,2132,2133,2134],{},"f. ",[1092,2135,2136],{},"        System.out.println(\"Driver rumble: \" + RUMBLE_STRENGTH);",[1677,2138,2139,2140],{},"g. ",[1092,2141,2142],{},"{",[1677,2144,2145,2146],{},"h. ",[1092,2147,2148],{},"    public static void main(String[] args)",[1677,2150,2151,2152],{},"i. ",[1092,2153,2154],{},"    }",[1080,2156,2157,2159],{},[1286,2158,2057],{}," c, g, e, h, b, f, a, i, d",[1097,2161,2163],{"className":1099,"code":2162,"language":1101,"meta":1102,"style":1102},"public class RumbleAlert\n{\n    public static final double RUMBLE_STRENGTH = 0.7;\n\n    public static void main(String[] args)\n    {\n        System.out.println(\"Driver rumble: \" + RUMBLE_STRENGTH);\n        System.out.println(\"Operator rumble: \" + RUMBLE_STRENGTH);\n    }\n}\n",[1092,2164,2165,2170,2174,2179,2183,2187,2191,2196,2201,2205],{"__ignoreMap":1102},[1106,2166,2167],{"class":1108,"line":1109},[1106,2168,2169],{},"public class RumbleAlert\n",[1106,2171,2172],{"class":1108,"line":1115},[1106,2173,1195],{},[1106,2175,2176],{"class":1108,"line":1121},[1106,2177,2178],{},"    public static final double RUMBLE_STRENGTH = 0.7;\n",[1106,2180,2181],{"class":1108,"line":1127},[1106,2182,1137],{"emptyLinePlaceholder":1136},[1106,2184,2185],{"class":1108,"line":1133},[1106,2186,1791],{},[1106,2188,2189],{"class":1108,"line":1140},[1106,2190,1205],{},[1106,2192,2193],{"class":1108,"line":1146},[1106,2194,2195],{},"        System.out.println(\"Driver rumble: \" + RUMBLE_STRENGTH);\n",[1106,2197,2198],{"class":1108,"line":1152},[1106,2199,2200],{},"        System.out.println(\"Operator rumble: \" + RUMBLE_STRENGTH);\n",[1106,2202,2203],{"class":1108,"line":1158},[1106,2204,1231],{},[1106,2206,2207],{"class":1108,"line":1228},[1106,2208,1243],{},[1080,2210,2211,2214,2215,2218,2219,2222,2223,2226,2227,2229,2230,2232,2233,2236,2237,2239,2240,2243,2244,2247,2248,2251,2252,2255,2256,2259,2260,2262,2263,2265,2266,2268,2269,2272,2273,2276],{},[1286,2212,2213],{},"Why this order:"," The class line (",[1092,2216,2217],{},"c",") comes first, with its opening brace (",[1092,2220,2221],{},"g",") right after. The constant (",[1092,2224,2225],{},"e",") is declared at the class level, not inside ",[1092,2228,2094],{}," — a ",[1092,2231,1888],{}," field belongs to the class itself, and that's what makes it the single source of truth both ",[1092,2234,2235],{},"println"," lines can read. ",[1092,2238,2094],{}," (",[1092,2241,2242],{},"h",") and its opening brace (",[1092,2245,2246],{},"b",") come next. The driver's line (",[1092,2249,2250],{},"f",") goes before the operator's line (",[1092,2253,2254],{},"a",") because the Problem asks for the driver's value to print first — both read the same ",[1092,2257,2258],{},"RUMBLE_STRENGTH",", so changing the strength later means editing only ",[1092,2261,2225],{},", never either ",[1092,2264,2235],{},". Then the braces close in reverse order: ",[1092,2267,2094],{},"'s body (",[1092,2270,2271],{},"i","), then the class's body (",[1092,2274,2275],{},"d",").",[1084,2278,2280],{"id":2279},"coding","Coding",[1080,2282,2283,2286],{},[1286,2284,2285],{},"Mode:"," full-program",[1080,2288,2289,2291,2292,2295,2296,2299,2300,2303,2304,2307],{},[1286,2290,2090],{}," Apply three principles from the lesson (DRY, Interface Segregation, Dependency Inversion) to one small intake design. ",[1092,2293,2294],{},"Roller"," and ",[1092,2297,2298],{},"Feeder"," are given;\nthey implement an interface called ",[1092,2301,2302],{},"Throttled"," that ",[1286,2305,2306],{},"you"," write. You also write the remaining pieces:",[1674,2309,2310,2323,2334,2359,2377],{},[1677,2311,2312,2315,2316,2239,2319,2322],{},[1092,2313,2314],{},"IntakeConstants"," holds one constant, ",[1092,2317,2318],{},"public static final double ROLLER_SPEED = 0.8",[1286,2320,2321],{},"DRY",": the number lives in one place).",[1677,2324,2325,2327,2328,2295,2331,2095],{},[1092,2326,2302],{}," declares ",[1092,2329,2330],{},"void setThrottle(double speed)",[1092,2332,2333],{},"double getThrottle()",[1677,2335,2336,2339,2340,2343,2344,2295,2347,2350,2351,1724,2354,2295,2356,2358],{},[1092,2337,2338],{},"Rotatable"," is a ",[1286,2341,2342],{},"separate"," small interface declaring ",[1092,2345,2346],{},"void setAngle(double degrees)",[1092,2348,2349],{},"double getAngle()","\n(",[1286,2352,2353],{},"Interface Segregation",[1092,2355,2294],{},[1092,2357,2298],{}," can't rotate, so they must not be forced to implement it).",[1677,2360,2361,2364,2365,2367,2368,2367,2371,2373,2374,2276],{},[1092,2362,2363],{},"Pivot"," can do both: it implements ",[1092,2366,2302],{}," ",[1286,2369,2370],{},"and",[1092,2372,2338],{},", keeping its own throttle and angle (both start at ",[1092,2375,2376],{},"0.0",[1677,2378,2379,2382,2383,2385,2386,2389,2390,2393,2394,2397,2398,2401,2402,2095],{},[1092,2380,2381],{},"IntakeController"," gets its device through its constructor as a ",[1092,2384,2302],{},", never a concrete class (",[1286,2387,2388],{},"Dependency Inversion",").\n",[1092,2391,2392],{},"run()"," sets the device's throttle to ",[1092,2395,2396],{},"IntakeConstants.ROLLER_SPEED","; ",[1092,2399,2400],{},"stop()"," sets it to ",[1092,2403,2376],{},[1080,2405,2406,2408,2409,2412,2413,2416],{},[1092,2407,2094],{}," reads a device name (",[1092,2410,2411],{},"roller",", ",[1092,2414,2415],{},"feeder",", or anything else for a pivot) and an angle.",[1080,2418,2419],{},[1286,2420,2421],{},"Starter:",[1097,2423,2425],{"className":1099,"code":2424,"language":1101,"meta":1102,"style":1102},"import java.util.Scanner;\n\npublic class Main\n{\n    public static void main(String[] args) \u002F\u002F Don't change main\n    {\n        Scanner in = new Scanner(System.in);\n        String kind = in.next();\n        double angle = in.nextDouble();\n\n        Throttled device;\n        if (kind.equals(\"roller\"))\n        {\n            device = new Roller();\n        }\n        else if (kind.equals(\"feeder\"))\n        {\n            device = new Feeder();\n        }\n        else\n        {\n            device = new Pivot();\n        }\n\n        IntakeController controller = new IntakeController(device);\n        controller.run();\n        System.out.println(kind + \" throttle: \" + device.getThrottle());\n        controller.stop();\n        System.out.println(kind + \" after stop: \" + device.getThrottle());\n\n        if (device instanceof Rotatable rotatable)\n        {\n            rotatable.setAngle(angle);\n            System.out.println(kind + \" angle: \" + rotatable.getAngle());\n        }\n        else\n        {\n            System.out.println(kind + \" can't rotate\");\n        }\n        System.out.println(\"Roller speed constant: \" + IntakeConstants.ROLLER_SPEED);\n    }\n}\n\nclass Roller implements Throttled\n{\n    private double throttle = 0.0;\n\n    public void setThrottle(double speed)\n    {\n        throttle = speed;\n    }\n\n    public double getThrottle()\n    {\n        return throttle;\n    }\n}\n\nclass Feeder implements Throttled\n{\n    private double throttle = 0.0;\n\n    public void setThrottle(double speed)\n    {\n        throttle = speed;\n    }\n\n    public double getThrottle()\n    {\n        return throttle;\n    }\n}\n\n\u002F\u002F TODO: write IntakeConstants\n\n\u002F\u002F TODO: write the interfaces Throttled and Rotatable\n\n\u002F\u002F TODO: write the class Pivot\n\n\u002F\u002F TODO: write the class IntakeController\n",[1092,2426,2427,2432,2436,2441,2445,2450,2454,2459,2464,2469,2473,2478,2483,2488,2493,2498,2503,2507,2512,2516,2521,2525,2530,2534,2538,2543,2548,2553,2558,2563,2567,2572,2576,2582,2588,2593,2598,2603,2609,2614,2620,2625,2630,2635,2641,2646,2652,2657,2663,2668,2674,2679,2684,2690,2695,2701,2706,2711,2716,2722,2727,2732,2737,2742,2747,2752,2757,2762,2767,2772,2777,2782,2787,2792,2798,2803,2809,2814,2820,2825],{"__ignoreMap":1102},[1106,2428,2429],{"class":1108,"line":1109},[1106,2430,2431],{},"import java.util.Scanner;\n",[1106,2433,2434],{"class":1108,"line":1115},[1106,2435,1137],{"emptyLinePlaceholder":1136},[1106,2437,2438],{"class":1108,"line":1121},[1106,2439,2440],{},"public class Main\n",[1106,2442,2443],{"class":1108,"line":1127},[1106,2444,1195],{},[1106,2446,2447],{"class":1108,"line":1133},[1106,2448,2449],{},"    public static void main(String[] args) \u002F\u002F Don't change main\n",[1106,2451,2452],{"class":1108,"line":1140},[1106,2453,1205],{},[1106,2455,2456],{"class":1108,"line":1146},[1106,2457,2458],{},"        Scanner in = new Scanner(System.in);\n",[1106,2460,2461],{"class":1108,"line":1152},[1106,2462,2463],{},"        String kind = in.next();\n",[1106,2465,2466],{"class":1108,"line":1158},[1106,2467,2468],{},"        double angle = in.nextDouble();\n",[1106,2470,2471],{"class":1108,"line":1228},[1106,2472,1137],{"emptyLinePlaceholder":1136},[1106,2474,2475],{"class":1108,"line":1234},[1106,2476,2477],{},"        Throttled device;\n",[1106,2479,2480],{"class":1108,"line":1240},[1106,2481,2482],{},"        if (kind.equals(\"roller\"))\n",[1106,2484,2485],{"class":1108,"line":1246},[1106,2486,2487],{},"        {\n",[1106,2489,2490],{"class":1108,"line":1251},[1106,2491,2492],{},"            device = new Roller();\n",[1106,2494,2495],{"class":1108,"line":1257},[1106,2496,2497],{},"        }\n",[1106,2499,2500],{"class":1108,"line":1262},[1106,2501,2502],{},"        else if (kind.equals(\"feeder\"))\n",[1106,2504,2505],{"class":1108,"line":1267},[1106,2506,2487],{},[1106,2508,2509],{"class":1108,"line":1273},[1106,2510,2511],{},"            device = new Feeder();\n",[1106,2513,2514],{"class":1108,"line":1488},[1106,2515,2497],{},[1106,2517,2518],{"class":1108,"line":1494},[1106,2519,2520],{},"        else\n",[1106,2522,2523],{"class":1108,"line":1500},[1106,2524,2487],{},[1106,2526,2527],{"class":1108,"line":1505},[1106,2528,2529],{},"            device = new Pivot();\n",[1106,2531,2532],{"class":1108,"line":1510},[1106,2533,2497],{},[1106,2535,2536],{"class":1108,"line":1515},[1106,2537,1137],{"emptyLinePlaceholder":1136},[1106,2539,2540],{"class":1108,"line":1521},[1106,2541,2542],{},"        IntakeController controller = new IntakeController(device);\n",[1106,2544,2545],{"class":1108,"line":1526},[1106,2546,2547],{},"        controller.run();\n",[1106,2549,2550],{"class":1108,"line":1531},[1106,2551,2552],{},"        System.out.println(kind + \" throttle: \" + device.getThrottle());\n",[1106,2554,2555],{"class":1108,"line":1536},[1106,2556,2557],{},"        controller.stop();\n",[1106,2559,2560],{"class":1108,"line":1541},[1106,2561,2562],{},"        System.out.println(kind + \" after stop: \" + device.getThrottle());\n",[1106,2564,2565],{"class":1108,"line":1547},[1106,2566,1137],{"emptyLinePlaceholder":1136},[1106,2568,2569],{"class":1108,"line":1552},[1106,2570,2571],{},"        if (device instanceof Rotatable rotatable)\n",[1106,2573,2574],{"class":1108,"line":1557},[1106,2575,2487],{},[1106,2577,2579],{"class":1108,"line":2578},33,[1106,2580,2581],{},"            rotatable.setAngle(angle);\n",[1106,2583,2585],{"class":1108,"line":2584},34,[1106,2586,2587],{},"            System.out.println(kind + \" angle: \" + rotatable.getAngle());\n",[1106,2589,2591],{"class":1108,"line":2590},35,[1106,2592,2497],{},[1106,2594,2596],{"class":1108,"line":2595},36,[1106,2597,2520],{},[1106,2599,2601],{"class":1108,"line":2600},37,[1106,2602,2487],{},[1106,2604,2606],{"class":1108,"line":2605},38,[1106,2607,2608],{},"            System.out.println(kind + \" can't rotate\");\n",[1106,2610,2612],{"class":1108,"line":2611},39,[1106,2613,2497],{},[1106,2615,2617],{"class":1108,"line":2616},40,[1106,2618,2619],{},"        System.out.println(\"Roller speed constant: \" + IntakeConstants.ROLLER_SPEED);\n",[1106,2621,2623],{"class":1108,"line":2622},41,[1106,2624,1231],{},[1106,2626,2628],{"class":1108,"line":2627},42,[1106,2629,1243],{},[1106,2631,2633],{"class":1108,"line":2632},43,[1106,2634,1137],{"emptyLinePlaceholder":1136},[1106,2636,2638],{"class":1108,"line":2637},44,[1106,2639,2640],{},"class Roller implements Throttled\n",[1106,2642,2644],{"class":1108,"line":2643},45,[1106,2645,1195],{},[1106,2647,2649],{"class":1108,"line":2648},46,[1106,2650,2651],{},"    private double throttle = 0.0;\n",[1106,2653,2655],{"class":1108,"line":2654},47,[1106,2656,1137],{"emptyLinePlaceholder":1136},[1106,2658,2660],{"class":1108,"line":2659},48,[1106,2661,2662],{},"    public void setThrottle(double speed)\n",[1106,2664,2666],{"class":1108,"line":2665},49,[1106,2667,1205],{},[1106,2669,2671],{"class":1108,"line":2670},50,[1106,2672,2673],{},"        throttle = speed;\n",[1106,2675,2677],{"class":1108,"line":2676},51,[1106,2678,1231],{},[1106,2680,2682],{"class":1108,"line":2681},52,[1106,2683,1137],{"emptyLinePlaceholder":1136},[1106,2685,2687],{"class":1108,"line":2686},53,[1106,2688,2689],{},"    public double getThrottle()\n",[1106,2691,2693],{"class":1108,"line":2692},54,[1106,2694,1205],{},[1106,2696,2698],{"class":1108,"line":2697},55,[1106,2699,2700],{},"        return throttle;\n",[1106,2702,2704],{"class":1108,"line":2703},56,[1106,2705,1231],{},[1106,2707,2709],{"class":1108,"line":2708},57,[1106,2710,1243],{},[1106,2712,2714],{"class":1108,"line":2713},58,[1106,2715,1137],{"emptyLinePlaceholder":1136},[1106,2717,2719],{"class":1108,"line":2718},59,[1106,2720,2721],{},"class Feeder implements Throttled\n",[1106,2723,2725],{"class":1108,"line":2724},60,[1106,2726,1195],{},[1106,2728,2730],{"class":1108,"line":2729},61,[1106,2731,2651],{},[1106,2733,2735],{"class":1108,"line":2734},62,[1106,2736,1137],{"emptyLinePlaceholder":1136},[1106,2738,2740],{"class":1108,"line":2739},63,[1106,2741,2662],{},[1106,2743,2745],{"class":1108,"line":2744},64,[1106,2746,1205],{},[1106,2748,2750],{"class":1108,"line":2749},65,[1106,2751,2673],{},[1106,2753,2755],{"class":1108,"line":2754},66,[1106,2756,1231],{},[1106,2758,2760],{"class":1108,"line":2759},67,[1106,2761,1137],{"emptyLinePlaceholder":1136},[1106,2763,2765],{"class":1108,"line":2764},68,[1106,2766,2689],{},[1106,2768,2770],{"class":1108,"line":2769},69,[1106,2771,1205],{},[1106,2773,2775],{"class":1108,"line":2774},70,[1106,2776,2700],{},[1106,2778,2780],{"class":1108,"line":2779},71,[1106,2781,1231],{},[1106,2783,2785],{"class":1108,"line":2784},72,[1106,2786,1243],{},[1106,2788,2790],{"class":1108,"line":2789},73,[1106,2791,1137],{"emptyLinePlaceholder":1136},[1106,2793,2795],{"class":1108,"line":2794},74,[1106,2796,2797],{},"\u002F\u002F TODO: write IntakeConstants\n",[1106,2799,2801],{"class":1108,"line":2800},75,[1106,2802,1137],{"emptyLinePlaceholder":1136},[1106,2804,2806],{"class":1108,"line":2805},76,[1106,2807,2808],{},"\u002F\u002F TODO: write the interfaces Throttled and Rotatable\n",[1106,2810,2812],{"class":1108,"line":2811},77,[1106,2813,1137],{"emptyLinePlaceholder":1136},[1106,2815,2817],{"class":1108,"line":2816},78,[1106,2818,2819],{},"\u002F\u002F TODO: write the class Pivot\n",[1106,2821,2823],{"class":1108,"line":2822},79,[1106,2824,1137],{"emptyLinePlaceholder":1136},[1106,2826,2828],{"class":1108,"line":2827},80,[1106,2829,2830],{},"\u002F\u002F TODO: write the class IntakeController\n",[1080,2832,2833],{},[1286,2834,2835],{},"Scenario 1 (visible):",[1080,2837,2838],{},[1286,2839,2840],{},"Input:",[1097,2842,2845],{"className":2843,"code":2844,"language":1827,"meta":1102},[1825],"roller 30.0\n",[1092,2846,2844],{"__ignoreMap":1102},[1080,2848,2849],{},[1286,2850,2851],{},"Expected output:",[1097,2853,2856],{"className":2854,"code":2855,"language":1827,"meta":1102},[1825],"roller throttle: 0.8\nroller after stop: 0.0\nroller can't rotate\nRoller speed constant: 0.8\n",[1092,2857,2855],{"__ignoreMap":1102},[1080,2859,2860],{},[1286,2861,2862],{},"Scenario 2 (visible):",[1080,2864,2865],{},[1286,2866,2840],{},[1097,2868,2871],{"className":2869,"code":2870,"language":1827,"meta":1102},[1825],"pivot 45.5\n",[1092,2872,2870],{"__ignoreMap":1102},[1080,2874,2875],{},[1286,2876,2851],{},[1097,2878,2881],{"className":2879,"code":2880,"language":1827,"meta":1102},[1825],"pivot throttle: 0.8\npivot after stop: 0.0\npivot angle: 45.5\nRoller speed constant: 0.8\n",[1092,2882,2880],{"__ignoreMap":1102},[1080,2884,2885],{},[1286,2886,2887],{},"Scenario 3 (visible):",[1080,2889,2890],{},[1286,2891,2840],{},[1097,2893,2896],{"className":2894,"code":2895,"language":1827,"meta":1102},[1825],"feeder 0.0\n",[1092,2897,2895],{"__ignoreMap":1102},[1080,2899,2900],{},[1286,2901,2851],{},[1097,2903,2906],{"className":2904,"code":2905,"language":1827,"meta":1102},[1825],"feeder throttle: 0.8\nfeeder after stop: 0.0\nfeeder can't rotate\nRoller speed constant: 0.8\n",[1092,2907,2905],{"__ignoreMap":1102},[1080,2909,2910],{},[1286,2911,2912],{},"Scenario 4 (hidden):",[1080,2914,2915],{},[1286,2916,2840],{},[1097,2918,2921],{"className":2919,"code":2920,"language":1827,"meta":1102},[1825],"pivot -90.0\n",[1092,2922,2920],{"__ignoreMap":1102},[1080,2924,2925],{},[1286,2926,2851],{},[1097,2928,2931],{"className":2929,"code":2930,"language":1827,"meta":1102},[1825],"pivot throttle: 0.8\npivot after stop: 0.0\npivot angle: -90.0\nRoller speed constant: 0.8\n",[1092,2932,2930],{"__ignoreMap":1102},[1080,2934,2935],{},[1286,2936,2937],{},"Scenario 5 (hidden):",[1080,2939,2940],{},[1286,2941,2840],{},[1097,2943,2946],{"className":2944,"code":2945,"language":1827,"meta":1102},[1825],"turret 180.0\n",[1092,2947,2945],{"__ignoreMap":1102},[1080,2949,2950],{},[1286,2951,2851],{},[1097,2953,2956],{"className":2954,"code":2955,"language":1827,"meta":1102},[1825],"turret throttle: 0.8\nturret after stop: 0.0\nturret angle: 180.0\nRoller speed constant: 0.8\n",[1092,2957,2955],{"__ignoreMap":1102},[1080,2959,2960],{},[1286,2961,2962],{},"Scenario 6 (hidden):",[1080,2964,2965],{},[1286,2966,2840],{},[1097,2968,2971],{"className":2969,"code":2970,"language":1827,"meta":1102},[1825],"feeder 12.0\n",[1092,2972,2970],{"__ignoreMap":1102},[1080,2974,2975],{},[1286,2976,2851],{},[1097,2978,2980],{"className":2979,"code":2905,"language":1827,"meta":1102},[1825],[1092,2981,2905],{"__ignoreMap":1102},[1080,2983,2984],{},[1286,2985,2986],{},"Solution:",[1097,2988,2990],{"className":1099,"code":2989,"language":1101,"meta":1102,"style":1102},"import java.util.Scanner;\n\npublic class Main\n{\n    public static void main(String[] args) \u002F\u002F Don't change main\n    {\n        Scanner in = new Scanner(System.in);\n        String kind = in.next();\n        double angle = in.nextDouble();\n\n        Throttled device;\n        if (kind.equals(\"roller\"))\n        {\n            device = new Roller();\n        }\n        else if (kind.equals(\"feeder\"))\n        {\n            device = new Feeder();\n        }\n        else\n        {\n            device = new Pivot();\n        }\n\n        IntakeController controller = new IntakeController(device);\n        controller.run();\n        System.out.println(kind + \" throttle: \" + device.getThrottle());\n        controller.stop();\n        System.out.println(kind + \" after stop: \" + device.getThrottle());\n\n        if (device instanceof Rotatable rotatable)\n        {\n            rotatable.setAngle(angle);\n            System.out.println(kind + \" angle: \" + rotatable.getAngle());\n        }\n        else\n        {\n            System.out.println(kind + \" can't rotate\");\n        }\n        System.out.println(\"Roller speed constant: \" + IntakeConstants.ROLLER_SPEED);\n    }\n}\n\nclass Roller implements Throttled\n{\n    private double throttle = 0.0;\n\n    public void setThrottle(double speed)\n    {\n        throttle = speed;\n    }\n\n    public double getThrottle()\n    {\n        return throttle;\n    }\n}\n\nclass Feeder implements Throttled\n{\n    private double throttle = 0.0;\n\n    public void setThrottle(double speed)\n    {\n        throttle = speed;\n    }\n\n    public double getThrottle()\n    {\n        return throttle;\n    }\n}\n\nclass IntakeConstants\n{\n    public static final double ROLLER_SPEED = 0.8;\n}\n\ninterface Throttled\n{\n    void setThrottle(double speed);\n\n    double getThrottle();\n}\n\ninterface Rotatable\n{\n    void setAngle(double degrees);\n\n    double getAngle();\n}\n\nclass Pivot implements Throttled, Rotatable\n{\n    private double throttle = 0.0;\n    private double angle = 0.0;\n\n    public void setThrottle(double speed)\n    {\n        throttle = speed;\n    }\n\n    public double getThrottle()\n    {\n        return throttle;\n    }\n\n    public void setAngle(double degrees)\n    {\n        angle = degrees;\n    }\n\n    public double getAngle()\n    {\n        return angle;\n    }\n}\n\nclass IntakeController\n{\n    private final Throttled device;\n\n    public IntakeController(Throttled device)\n    {\n        this.device = device;\n    }\n\n    public void run()\n    {\n        device.setThrottle(IntakeConstants.ROLLER_SPEED);\n    }\n\n    public void stop()\n    {\n        device.setThrottle(0.0);\n    }\n}\n",[1092,2991,2992,2996,3000,3004,3008,3012,3016,3020,3024,3028,3032,3036,3040,3044,3048,3052,3056,3060,3064,3068,3072,3076,3080,3084,3088,3092,3096,3100,3104,3108,3112,3116,3120,3124,3128,3132,3136,3140,3144,3148,3152,3156,3160,3164,3168,3172,3176,3180,3184,3188,3192,3196,3200,3204,3208,3212,3216,3220,3224,3228,3232,3236,3240,3244,3248,3252,3256,3260,3264,3268,3272,3276,3280,3284,3289,3293,3298,3302,3306,3311,3315,3320,3325,3331,3336,3341,3347,3352,3357,3362,3368,3373,3378,3384,3389,3394,3400,3405,3410,3415,3420,3425,3430,3435,3440,3445,3450,3455,3461,3466,3472,3477,3482,3488,3493,3499,3504,3509,3514,3520,3525,3531,3536,3542,3547,3553,3558,3563,3569,3574,3580,3585,3590,3596,3601,3607,3612],{"__ignoreMap":1102},[1106,2993,2994],{"class":1108,"line":1109},[1106,2995,2431],{},[1106,2997,2998],{"class":1108,"line":1115},[1106,2999,1137],{"emptyLinePlaceholder":1136},[1106,3001,3002],{"class":1108,"line":1121},[1106,3003,2440],{},[1106,3005,3006],{"class":1108,"line":1127},[1106,3007,1195],{},[1106,3009,3010],{"class":1108,"line":1133},[1106,3011,2449],{},[1106,3013,3014],{"class":1108,"line":1140},[1106,3015,1205],{},[1106,3017,3018],{"class":1108,"line":1146},[1106,3019,2458],{},[1106,3021,3022],{"class":1108,"line":1152},[1106,3023,2463],{},[1106,3025,3026],{"class":1108,"line":1158},[1106,3027,2468],{},[1106,3029,3030],{"class":1108,"line":1228},[1106,3031,1137],{"emptyLinePlaceholder":1136},[1106,3033,3034],{"class":1108,"line":1234},[1106,3035,2477],{},[1106,3037,3038],{"class":1108,"line":1240},[1106,3039,2482],{},[1106,3041,3042],{"class":1108,"line":1246},[1106,3043,2487],{},[1106,3045,3046],{"class":1108,"line":1251},[1106,3047,2492],{},[1106,3049,3050],{"class":1108,"line":1257},[1106,3051,2497],{},[1106,3053,3054],{"class":1108,"line":1262},[1106,3055,2502],{},[1106,3057,3058],{"class":1108,"line":1267},[1106,3059,2487],{},[1106,3061,3062],{"class":1108,"line":1273},[1106,3063,2511],{},[1106,3065,3066],{"class":1108,"line":1488},[1106,3067,2497],{},[1106,3069,3070],{"class":1108,"line":1494},[1106,3071,2520],{},[1106,3073,3074],{"class":1108,"line":1500},[1106,3075,2487],{},[1106,3077,3078],{"class":1108,"line":1505},[1106,3079,2529],{},[1106,3081,3082],{"class":1108,"line":1510},[1106,3083,2497],{},[1106,3085,3086],{"class":1108,"line":1515},[1106,3087,1137],{"emptyLinePlaceholder":1136},[1106,3089,3090],{"class":1108,"line":1521},[1106,3091,2542],{},[1106,3093,3094],{"class":1108,"line":1526},[1106,3095,2547],{},[1106,3097,3098],{"class":1108,"line":1531},[1106,3099,2552],{},[1106,3101,3102],{"class":1108,"line":1536},[1106,3103,2557],{},[1106,3105,3106],{"class":1108,"line":1541},[1106,3107,2562],{},[1106,3109,3110],{"class":1108,"line":1547},[1106,3111,1137],{"emptyLinePlaceholder":1136},[1106,3113,3114],{"class":1108,"line":1552},[1106,3115,2571],{},[1106,3117,3118],{"class":1108,"line":1557},[1106,3119,2487],{},[1106,3121,3122],{"class":1108,"line":2578},[1106,3123,2581],{},[1106,3125,3126],{"class":1108,"line":2584},[1106,3127,2587],{},[1106,3129,3130],{"class":1108,"line":2590},[1106,3131,2497],{},[1106,3133,3134],{"class":1108,"line":2595},[1106,3135,2520],{},[1106,3137,3138],{"class":1108,"line":2600},[1106,3139,2487],{},[1106,3141,3142],{"class":1108,"line":2605},[1106,3143,2608],{},[1106,3145,3146],{"class":1108,"line":2611},[1106,3147,2497],{},[1106,3149,3150],{"class":1108,"line":2616},[1106,3151,2619],{},[1106,3153,3154],{"class":1108,"line":2622},[1106,3155,1231],{},[1106,3157,3158],{"class":1108,"line":2627},[1106,3159,1243],{},[1106,3161,3162],{"class":1108,"line":2632},[1106,3163,1137],{"emptyLinePlaceholder":1136},[1106,3165,3166],{"class":1108,"line":2637},[1106,3167,2640],{},[1106,3169,3170],{"class":1108,"line":2643},[1106,3171,1195],{},[1106,3173,3174],{"class":1108,"line":2648},[1106,3175,2651],{},[1106,3177,3178],{"class":1108,"line":2654},[1106,3179,1137],{"emptyLinePlaceholder":1136},[1106,3181,3182],{"class":1108,"line":2659},[1106,3183,2662],{},[1106,3185,3186],{"class":1108,"line":2665},[1106,3187,1205],{},[1106,3189,3190],{"class":1108,"line":2670},[1106,3191,2673],{},[1106,3193,3194],{"class":1108,"line":2676},[1106,3195,1231],{},[1106,3197,3198],{"class":1108,"line":2681},[1106,3199,1137],{"emptyLinePlaceholder":1136},[1106,3201,3202],{"class":1108,"line":2686},[1106,3203,2689],{},[1106,3205,3206],{"class":1108,"line":2692},[1106,3207,1205],{},[1106,3209,3210],{"class":1108,"line":2697},[1106,3211,2700],{},[1106,3213,3214],{"class":1108,"line":2703},[1106,3215,1231],{},[1106,3217,3218],{"class":1108,"line":2708},[1106,3219,1243],{},[1106,3221,3222],{"class":1108,"line":2713},[1106,3223,1137],{"emptyLinePlaceholder":1136},[1106,3225,3226],{"class":1108,"line":2718},[1106,3227,2721],{},[1106,3229,3230],{"class":1108,"line":2724},[1106,3231,1195],{},[1106,3233,3234],{"class":1108,"line":2729},[1106,3235,2651],{},[1106,3237,3238],{"class":1108,"line":2734},[1106,3239,1137],{"emptyLinePlaceholder":1136},[1106,3241,3242],{"class":1108,"line":2739},[1106,3243,2662],{},[1106,3245,3246],{"class":1108,"line":2744},[1106,3247,1205],{},[1106,3249,3250],{"class":1108,"line":2749},[1106,3251,2673],{},[1106,3253,3254],{"class":1108,"line":2754},[1106,3255,1231],{},[1106,3257,3258],{"class":1108,"line":2759},[1106,3259,1137],{"emptyLinePlaceholder":1136},[1106,3261,3262],{"class":1108,"line":2764},[1106,3263,2689],{},[1106,3265,3266],{"class":1108,"line":2769},[1106,3267,1205],{},[1106,3269,3270],{"class":1108,"line":2774},[1106,3271,2700],{},[1106,3273,3274],{"class":1108,"line":2779},[1106,3275,1231],{},[1106,3277,3278],{"class":1108,"line":2784},[1106,3279,1243],{},[1106,3281,3282],{"class":1108,"line":2789},[1106,3283,1137],{"emptyLinePlaceholder":1136},[1106,3285,3286],{"class":1108,"line":2794},[1106,3287,3288],{},"class IntakeConstants\n",[1106,3290,3291],{"class":1108,"line":2800},[1106,3292,1195],{},[1106,3294,3295],{"class":1108,"line":2805},[1106,3296,3297],{},"    public static final double ROLLER_SPEED = 0.8;\n",[1106,3299,3300],{"class":1108,"line":2811},[1106,3301,1243],{},[1106,3303,3304],{"class":1108,"line":2816},[1106,3305,1137],{"emptyLinePlaceholder":1136},[1106,3307,3308],{"class":1108,"line":2822},[1106,3309,3310],{},"interface Throttled\n",[1106,3312,3313],{"class":1108,"line":2827},[1106,3314,1195],{},[1106,3316,3318],{"class":1108,"line":3317},81,[1106,3319,1428],{},[1106,3321,3323],{"class":1108,"line":3322},82,[1106,3324,1137],{"emptyLinePlaceholder":1136},[1106,3326,3328],{"class":1108,"line":3327},83,[1106,3329,3330],{},"    double getThrottle();\n",[1106,3332,3334],{"class":1108,"line":3333},84,[1106,3335,1243],{},[1106,3337,3339],{"class":1108,"line":3338},85,[1106,3340,1137],{"emptyLinePlaceholder":1136},[1106,3342,3344],{"class":1108,"line":3343},86,[1106,3345,3346],{},"interface Rotatable\n",[1106,3348,3350],{"class":1108,"line":3349},87,[1106,3351,1195],{},[1106,3353,3355],{"class":1108,"line":3354},88,[1106,3356,1433],{},[1106,3358,3360],{"class":1108,"line":3359},89,[1106,3361,1137],{"emptyLinePlaceholder":1136},[1106,3363,3365],{"class":1108,"line":3364},90,[1106,3366,3367],{},"    double getAngle();\n",[1106,3369,3371],{"class":1108,"line":3370},91,[1106,3372,1243],{},[1106,3374,3376],{"class":1108,"line":3375},92,[1106,3377,1137],{"emptyLinePlaceholder":1136},[1106,3379,3381],{"class":1108,"line":3380},93,[1106,3382,3383],{},"class Pivot implements Throttled, Rotatable\n",[1106,3385,3387],{"class":1108,"line":3386},94,[1106,3388,1195],{},[1106,3390,3392],{"class":1108,"line":3391},95,[1106,3393,2651],{},[1106,3395,3397],{"class":1108,"line":3396},96,[1106,3398,3399],{},"    private double angle = 0.0;\n",[1106,3401,3403],{"class":1108,"line":3402},97,[1106,3404,1137],{"emptyLinePlaceholder":1136},[1106,3406,3408],{"class":1108,"line":3407},98,[1106,3409,2662],{},[1106,3411,3413],{"class":1108,"line":3412},99,[1106,3414,1205],{},[1106,3416,3418],{"class":1108,"line":3417},100,[1106,3419,2673],{},[1106,3421,3423],{"class":1108,"line":3422},101,[1106,3424,1231],{},[1106,3426,3428],{"class":1108,"line":3427},102,[1106,3429,1137],{"emptyLinePlaceholder":1136},[1106,3431,3433],{"class":1108,"line":3432},103,[1106,3434,2689],{},[1106,3436,3438],{"class":1108,"line":3437},104,[1106,3439,1205],{},[1106,3441,3443],{"class":1108,"line":3442},105,[1106,3444,2700],{},[1106,3446,3448],{"class":1108,"line":3447},106,[1106,3449,1231],{},[1106,3451,3453],{"class":1108,"line":3452},107,[1106,3454,1137],{"emptyLinePlaceholder":1136},[1106,3456,3458],{"class":1108,"line":3457},108,[1106,3459,3460],{},"    public void setAngle(double degrees)\n",[1106,3462,3464],{"class":1108,"line":3463},109,[1106,3465,1205],{},[1106,3467,3469],{"class":1108,"line":3468},110,[1106,3470,3471],{},"        angle = degrees;\n",[1106,3473,3475],{"class":1108,"line":3474},111,[1106,3476,1231],{},[1106,3478,3480],{"class":1108,"line":3479},112,[1106,3481,1137],{"emptyLinePlaceholder":1136},[1106,3483,3485],{"class":1108,"line":3484},113,[1106,3486,3487],{},"    public double getAngle()\n",[1106,3489,3491],{"class":1108,"line":3490},114,[1106,3492,1205],{},[1106,3494,3496],{"class":1108,"line":3495},115,[1106,3497,3498],{},"        return angle;\n",[1106,3500,3502],{"class":1108,"line":3501},116,[1106,3503,1231],{},[1106,3505,3507],{"class":1108,"line":3506},117,[1106,3508,1243],{},[1106,3510,3512],{"class":1108,"line":3511},118,[1106,3513,1137],{"emptyLinePlaceholder":1136},[1106,3515,3517],{"class":1108,"line":3516},119,[1106,3518,3519],{},"class IntakeController\n",[1106,3521,3523],{"class":1108,"line":3522},120,[1106,3524,1195],{},[1106,3526,3528],{"class":1108,"line":3527},121,[1106,3529,3530],{},"    private final Throttled device;\n",[1106,3532,3534],{"class":1108,"line":3533},122,[1106,3535,1137],{"emptyLinePlaceholder":1136},[1106,3537,3539],{"class":1108,"line":3538},123,[1106,3540,3541],{},"    public IntakeController(Throttled device)\n",[1106,3543,3545],{"class":1108,"line":3544},124,[1106,3546,1205],{},[1106,3548,3550],{"class":1108,"line":3549},125,[1106,3551,3552],{},"        this.device = device;\n",[1106,3554,3556],{"class":1108,"line":3555},126,[1106,3557,1231],{},[1106,3559,3561],{"class":1108,"line":3560},127,[1106,3562,1137],{"emptyLinePlaceholder":1136},[1106,3564,3566],{"class":1108,"line":3565},128,[1106,3567,3568],{},"    public void run()\n",[1106,3570,3572],{"class":1108,"line":3571},129,[1106,3573,1205],{},[1106,3575,3577],{"class":1108,"line":3576},130,[1106,3578,3579],{},"        device.setThrottle(IntakeConstants.ROLLER_SPEED);\n",[1106,3581,3583],{"class":1108,"line":3582},131,[1106,3584,1231],{},[1106,3586,3588],{"class":1108,"line":3587},132,[1106,3589,1137],{"emptyLinePlaceholder":1136},[1106,3591,3593],{"class":1108,"line":3592},133,[1106,3594,3595],{},"    public void stop()\n",[1106,3597,3599],{"class":1108,"line":3598},134,[1106,3600,1205],{},[1106,3602,3604],{"class":1108,"line":3603},135,[1106,3605,3606],{},"        device.setThrottle(0.0);\n",[1106,3608,3610],{"class":1108,"line":3609},136,[1106,3611,1231],{},[1106,3613,3615],{"class":1108,"line":3614},137,[1106,3616,1243],{},[1080,3618,3619,3621,3622,3624,3625,3627,3628,3630,3631,2412,3633,3635,3636,3638,3639,3641,3642,3645,3646,2295,3648,3650,3651,3653,3654,3656,3657,2412,3659,2295,3661,3663,3664,3667,3668,3670,3671,3674,3675,3678,3679,3681],{},[1286,3620,2063],{}," Because ",[1092,3623,2094],{}," gives the controller a ",[1092,3626,2294],{},", a ",[1092,3629,2298],{}," or a ",[1092,3632,2363],{},[1092,3634,2381],{}," has to accept the interface ",[1092,3637,2302],{},"; a controller that declares ",[1092,3640,2294],{}," (or builds its own with ",[1092,3643,3644],{},"new Roller()",") can't\ndrive the others and stops matching the scenarios. ",[1092,3647,2302],{},[1092,3649,2338],{}," are kept apart so a ",[1092,3652,2294],{}," only promises what it can do. If ",[1092,3655,2338],{},"'s methods were squeezed into ",[1092,3658,2302],{},[1092,3660,2294],{},[1092,3662,2298],{}," would\nhave to supply a fake ",[1092,3665,3666],{},"setAngle",", and ",[1092,3669,2094],{},"'s ",[1092,3672,3673],{},"instanceof Rotatable"," check would no longer tell a pivot from a roller. The ",[1092,3676,3677],{},"0.8"," appears exactly once, in ",[1092,3680,2314],{},", which is what DRY asks for.",[1730,3683,1732],{},{"title":1102,"searchDepth":1115,"depth":1115,"links":3685},[3686,3687,3688],{"id":2022,"depth":1115,"text":2023},{"id":2084,"depth":1115,"text":2085},{"id":2279,"depth":1115,"text":2280},{"outlineRef":1743,"pairsWith":2009,"status":3690},"new — authored exercises (Multiple Choice + Micro-Parsons + Coding)",{"title":1044,"description":1102},"KAQi5xHb9C7jlGmJ7JiH0AMA3rjrfR_EgWmm5ZxGc5c",1792718166842]