[{"data":1,"prerenderedAt":3400},["ShallowReactive",2],{"item-lessons-light-ch17-inheritance-and-abstractions":3,"item-examples-light-ch17-inheritance-and-abstractions":444,"item-exercises-light-ch17-inheritance-and-abstractions":753,"item-lesson-full-ch17-inheritance-and-abstractions-17.1":1070,"item-example-full-ch17-inheritance-and-abstractions-17.1":1537,"item-exercise-full-ch17-inheritance-and-abstractions-17.1":2176},[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":210,"body":1072,"description":1115,"extension":1531,"meta":1532,"navigation":1143,"path":209,"seo":1535,"stem":211,"__hash__":1536},"lessons\u002Fshockwave-curriculum\u002Flessons\u002Fch17-inheritance-and-abstractions\u002F17.1-inheritance-superclass-subclass.md",{"type":1073,"value":1074,"toc":1523},"minimark",[1075,1079,1084,1109,1219,1224,1255,1259,1311,1315,1342,1370,1383,1387,1390,1433,1437,1476,1480,1504,1519],[1076,1077,210],"h1",{"id":1078},"inheritance-superclass-subclass",[1080,1081,1083],"h2",{"id":1082},"what-inheritance-does","What Inheritance Does",[1085,1086,1087,1091,1092,1095,1096,1099,1100,1104,1105,1108],"p",{},[1088,1089,1090],"strong",{},"Inheritance"," lets one class inherit fields and methods from another. The class being inherited from is the ",[1088,1093,1094],{},"superclass"," (or parent class); the class doing the inheriting is the ",[1088,1097,1098],{},"subclass"," (or child class). The parts of an FRC robot — an intake, a shooter, a climber — share real structure: each has a name for logging, a way to print a labeled message, and a ",[1101,1102,1103],"code",{},"stop()"," method. That makes them a natural fit for a shared superclass. Chapters 17 and 18 use one such superclass, ",[1101,1106,1107],{},"RobotPart",", throughout:",[1110,1111,1116],"pre",{"className":1112,"code":1113,"language":1114,"meta":1115,"style":1115},"language-java shiki shiki-themes github-light github-dark","public class RobotPart\n{\n    private String name;\n\n    public RobotPart(String name) { this.name = name; }\n    public String getName() { return name; }\n    public void log(String msg) { System.out.println(\"[\" + name + \"] \" + msg); }\n    public void stop() { log(\"stopped\"); }\n}\n\npublic class Intake extends RobotPart\n{\n    \u002F\u002F passes the name up to RobotPart's constructor (Lesson 17.2)\n    public Intake(String name) { super(name); }\n\n    \u002F\u002F inherits getName(), log(), and stop() for free\n}\n","java","",[1101,1117,1118,1126,1132,1138,1145,1151,1157,1163,1169,1175,1180,1186,1191,1197,1203,1208,1214],{"__ignoreMap":1115},[1119,1120,1123],"span",{"class":1121,"line":1122},"line",1,[1119,1124,1125],{},"public class RobotPart\n",[1119,1127,1129],{"class":1121,"line":1128},2,[1119,1130,1131],{},"{\n",[1119,1133,1135],{"class":1121,"line":1134},3,[1119,1136,1137],{},"    private String name;\n",[1119,1139,1141],{"class":1121,"line":1140},4,[1119,1142,1144],{"emptyLinePlaceholder":1143},true,"\n",[1119,1146,1148],{"class":1121,"line":1147},5,[1119,1149,1150],{},"    public RobotPart(String name) { this.name = name; }\n",[1119,1152,1154],{"class":1121,"line":1153},6,[1119,1155,1156],{},"    public String getName() { return name; }\n",[1119,1158,1160],{"class":1121,"line":1159},7,[1119,1161,1162],{},"    public void log(String msg) { System.out.println(\"[\" + name + \"] \" + msg); }\n",[1119,1164,1166],{"class":1121,"line":1165},8,[1119,1167,1168],{},"    public void stop() { log(\"stopped\"); }\n",[1119,1170,1172],{"class":1121,"line":1171},9,[1119,1173,1174],{},"}\n",[1119,1176,1178],{"class":1121,"line":1177},10,[1119,1179,1144],{"emptyLinePlaceholder":1143},[1119,1181,1183],{"class":1121,"line":1182},11,[1119,1184,1185],{},"public class Intake extends RobotPart\n",[1119,1187,1189],{"class":1121,"line":1188},12,[1119,1190,1131],{},[1119,1192,1194],{"class":1121,"line":1193},13,[1119,1195,1196],{},"    \u002F\u002F passes the name up to RobotPart's constructor (Lesson 17.2)\n",[1119,1198,1200],{"class":1121,"line":1199},14,[1119,1201,1202],{},"    public Intake(String name) { super(name); }\n",[1119,1204,1206],{"class":1121,"line":1205},15,[1119,1207,1144],{"emptyLinePlaceholder":1143},[1119,1209,1211],{"class":1121,"line":1210},16,[1119,1212,1213],{},"    \u002F\u002F inherits getName(), log(), and stop() for free\n",[1119,1215,1217],{"class":1121,"line":1216},17,[1119,1218,1174],{},[1085,1220,1221,1223],{},[1101,1222,1107],{}," is the team's own class, written for this course — it isn't part of WPILib. This is its one full definition: later lessons show only what they add to it.",[1085,1225,1226,1229,1230,1233,1234,1236,1237,1240,1241,1243,1244,1247,1248,1250,1251,1254],{},[1101,1227,1228],{},"extends"," is the keyword that sets up inheritance. ",[1101,1231,1232],{},"Intake","'s one line of its own, the constructor, hands the name up to ",[1101,1235,1107],{}," with ",[1101,1238,1239],{},"super(name)"," — Lesson 17.2 explains exactly how that works. A Java class can only ",[1101,1242,1228],{}," ",[1088,1245,1246],{},"one"," superclass — unlike a person with two biological parents, there's no multiple inheritance of this kind in Java. Omitting ",[1101,1249,1228],{}," entirely doesn't mean \"no parent\" — it means the class implicitly inherits from Java's built-in ",[1101,1252,1253],{},"Object"," class (Lesson 17.4).",[1080,1256,1258],{"id":1257},"the-is-a-relationship","The is-a Relationship",[1085,1260,1261,1262,1265,1266,1243,1268,1243,1272,1274,1275,1243,1278,1243,1280,1282,1283,1286,1287,1289,1290,1293,1294,1296,1297,1300,1301,1304,1305,1243,1308,1310],{},"Inheritance should only model a genuine ",[1088,1263,1264],{},"is-a"," relationship: an ",[1101,1267,1232],{},[1269,1270,1271],"em",{},"is a",[1101,1273,1107],{},", a ",[1101,1276,1277],{},"Climber",[1269,1279,1271],{},[1101,1281,1107],{},". The test to apply: could you substitute the subclass anywhere the superclass is expected, and have it still make sense? A ",[1101,1284,1285],{},"Vision"," processor being asked to ",[1101,1288,1103],{}," and get ",[1101,1291,1292],{},"log()","ed makes sense as a ",[1101,1295,1107],{}," — but a ",[1101,1298,1299],{},"Robot"," class itself, or a ",[1101,1302,1303],{},"Controller"," wrapping a joystick, isn't a ",[1269,1306,1307],{},"kind of",[1101,1309,1107],{},", even if it happens to interact with one.",[1080,1312,1314],{"id":1313},"is-a-vs-has-a","is-a vs. has-a",[1085,1316,1317,1318,1321,1322,1325,1326,1243,1328,1243,1331,1334,1335,1337,1338,1341],{},"The ",[1088,1319,1320],{},"has-a"," relationship (also called ",[1088,1323,1324],{},"association",") is different: it's when one class simply holds a reference to another, without being a specialized kind of it. A ",[1101,1327,1299],{},[1269,1329,1330],{},"has a",[1101,1332,1333],{},"Drivetrain",", an ",[1101,1336,1232],{},", and a ",[1101,1339,1340],{},"Shooter"," — it isn't a subclass of any of them:",[1110,1343,1345],{"className":1112,"code":1344,"language":1114,"meta":1115,"style":1115},"public class Robot\n{\n    private Drivetrain drivetrain;  \u002F\u002F has-a: Robot holds a Drivetrain, isn't one\n    private Intake intake;          \u002F\u002F has-a\n}\n",[1101,1346,1347,1352,1356,1361,1366],{"__ignoreMap":1115},[1119,1348,1349],{"class":1121,"line":1122},[1119,1350,1351],{},"public class Robot\n",[1119,1353,1354],{"class":1121,"line":1128},[1119,1355,1131],{},[1119,1357,1358],{"class":1121,"line":1134},[1119,1359,1360],{},"    private Drivetrain drivetrain;  \u002F\u002F has-a: Robot holds a Drivetrain, isn't one\n",[1119,1362,1363],{"class":1121,"line":1140},[1119,1364,1365],{},"    private Intake intake;          \u002F\u002F has-a\n",[1119,1367,1368],{"class":1121,"line":1147},[1119,1369,1174],{},[1085,1371,1372,1373,1376,1377,1379,1380,1382],{},"Compare that to ",[1101,1374,1375],{},"Intake extends RobotPart"," — that's is-a: an ",[1101,1378,1232],{}," really is a specialized kind of ",[1101,1381,1107],{},", not just something that happens to reference one.",[1080,1384,1386],{"id":1385},"why-bother","Why Bother",[1085,1388,1389],{},"Two forces motivate reaching for a superclass:",[1391,1392,1393,1418],"ul",{},[1394,1395,1396,1399,1400,1402,1403,1405,1406,1408,1409,1411,1412,1414,1415,1417],"li",{},[1088,1397,1398],{},"Generalization"," — several classes already share data\u002Fbehavior, so pull the shared parts up into one common parent. ",[1101,1401,1232],{},", ",[1101,1404,1340],{},", and ",[1101,1407,1277],{}," all need a name, a ",[1101,1410,1292],{}," method, and a ",[1101,1413,1103],{}," method — that's exactly what ",[1101,1416,1107],{}," is for.",[1394,1419,1420,1423,1424,1426,1427,1429,1430,1432],{},[1088,1421,1422],{},"Specialization"," — a class wants most of a parent's behavior, but needs to add something of its own or do one thing differently. ",[1101,1425,1232],{}," inherits ",[1101,1428,1292],{}," unchanged, but will eventually want its own ",[1101,1431,1103],{}," that's specific to its own rollers — replacing an inherited method like that is called overriding (Lesson 18.1).",[1080,1434,1436],{"id":1435},"common-pitfalls","Common Pitfalls",[1391,1438,1439,1448,1460],{},[1394,1440,1441,1444,1445,1447],{},[1088,1442,1443],{},"Using inheritance purely to reuse code, without a real is-a relationship."," If the substitution test fails — the subclass wouldn't actually make sense wherever the superclass is expected — model it as has-a (a field) instead of ",[1101,1446,1228],{},".",[1394,1449,1450,1453,1454,1456,1457,1459],{},[1088,1451,1452],{},"Forgetting a class always has exactly one superclass."," Omitting ",[1101,1455,1228],{}," doesn't mean \"no parent\" — it means the implicit parent is ",[1101,1458,1253],{}," (Lesson 17.4).",[1394,1461,1462,1243,1465,1468,1469,1471,1472,1475],{},[1088,1463,1464],{},"Assuming a class can extend more than one class.",[1101,1466,1467],{},"class Intake extends RobotPart, Loggable"," doesn't compile — Java allows only one ",[1101,1470,1228],{},", though a class can ",[1101,1473,1474],{},"implements"," multiple interfaces (Ch.19).",[1080,1477,1479],{"id":1478},"key-takeaways","Key Takeaways",[1391,1481,1482,1487,1498,1501],{},[1394,1483,1484,1486],{},[1101,1485,1228],{}," declares inheritance: the subclass gains the superclass's fields and methods.",[1394,1488,1489,1490,1492,1493,1495,1496,1447],{},"A class can only ",[1101,1491,1228],{}," one superclass; omitting ",[1101,1494,1228],{}," implicitly means extending ",[1101,1497,1253],{},[1394,1499,1500],{},"Use inheritance only for a genuine is-a relationship — verify with the substitution test (does the subclass make sense wherever the superclass is expected?).",[1394,1502,1503],{},"has-a (association: one class simply holding a reference to another) is the right model when is-a doesn't genuinely apply.",[1085,1505,1506,1507,1510,1511,1514,1515,1518],{},"Derived from ",[1101,1508,1509],{},"csawesome-2026",": ",[1101,1512,1513],{},"unit-5-inheritance-optional\u002F5.01-inheritance-superclass-subclass.md"," (CSA 5.1)\n",[1088,1516,1517],{},"Deck context:"," mechacoder-test\u002Fsrc\u002Flessons\u002Fjava-2.js, slide 4 (\"Inheritance & Abstractions\")",[1520,1521,1522],"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":1115,"searchDepth":1128,"depth":1128,"links":1524},[1525,1526,1527,1528,1529,1530],{"id":1082,"depth":1128,"text":1083},{"id":1257,"depth":1128,"text":1258},{"id":1313,"depth":1128,"text":1314},{"id":1385,"depth":1128,"text":1386},{"id":1435,"depth":1128,"text":1436},{"id":1478,"depth":1128,"text":1479},"md",{"outlineRef":1533,"status":1534},"17.1 — Inheritance, Superclass, Subclass (CSA 5.1)","new — authored lesson (fuller depth than the teaser slide)",{"title":210,"description":1115},"ABF96I-98kuwHjoec599nF7Bt1Us45KzrcESmh0PA_Q",{"id":1538,"title":643,"body":1539,"description":1115,"extension":1531,"meta":2171,"navigation":1143,"path":642,"seo":2174,"stem":644,"__hash__":2175},"examples\u002Fshockwave-curriculum\u002Fexamples\u002Fch17-inheritance-and-abstractions\u002F17.1-inheritance-superclass-subclass.md",{"type":1073,"value":1540,"toc":2159},[1541,1544,1548,1555,1559,1570,1663,1669,1675,1684,1690,1726,1763,1767,1803,1996,2023,2027,2035,2043,2047,2074,2097,2107,2111,2157],[1076,1542,643],{"id":1543},"inheritance-superclass-subclass-worked-example",[1080,1545,1547],{"id":1546},"problem","Problem",[1085,1549,1550,1551,1554],{},"A robot has several sensors, and every one of them needs the same two things: a label (like ",[1101,1552,1553],{},"\"Elevator Bottom\"",") and a way to print a labeled reading to the console. One of those sensors is a limit switch at the bottom of the elevator, which also needs its own shortcut for reporting that it's been pressed. Write the shared sensor code once, and have the limit switch reuse it instead of copying it.",[1080,1556,1558],{"id":1557},"step-1-write-the-shared-superclass","Step 1: Write the Shared Superclass",[1085,1560,1561,1562,1565,1566,1569],{},"Start with everything ",[1269,1563,1564],{},"every"," sensor needs, in one class. This is ",[1088,1567,1568],{},"generalization"," — pulling the shared parts up into one common parent:",[1110,1571,1573],{"className":1112,"code":1572,"language":1114,"meta":1115,"style":1115},"class Sensor\n{\n    private String label;\n\n    public void setLabel(String label)\n    {\n        this.label = label;\n    }\n\n    public String getLabel()\n    {\n        return label;\n    }\n\n    public void report(String reading)\n    {\n        System.out.println(\"[\" + label + \"] \" + reading);\n    }\n}\n",[1101,1574,1575,1580,1584,1589,1593,1598,1603,1608,1613,1617,1622,1626,1631,1635,1639,1644,1648,1653,1658],{"__ignoreMap":1115},[1119,1576,1577],{"class":1121,"line":1122},[1119,1578,1579],{},"class Sensor\n",[1119,1581,1582],{"class":1121,"line":1128},[1119,1583,1131],{},[1119,1585,1586],{"class":1121,"line":1134},[1119,1587,1588],{},"    private String label;\n",[1119,1590,1591],{"class":1121,"line":1140},[1119,1592,1144],{"emptyLinePlaceholder":1143},[1119,1594,1595],{"class":1121,"line":1147},[1119,1596,1597],{},"    public void setLabel(String label)\n",[1119,1599,1600],{"class":1121,"line":1153},[1119,1601,1602],{},"    {\n",[1119,1604,1605],{"class":1121,"line":1159},[1119,1606,1607],{},"        this.label = label;\n",[1119,1609,1610],{"class":1121,"line":1165},[1119,1611,1612],{},"    }\n",[1119,1614,1615],{"class":1121,"line":1171},[1119,1616,1144],{"emptyLinePlaceholder":1143},[1119,1618,1619],{"class":1121,"line":1177},[1119,1620,1621],{},"    public String getLabel()\n",[1119,1623,1624],{"class":1121,"line":1182},[1119,1625,1602],{},[1119,1627,1628],{"class":1121,"line":1188},[1119,1629,1630],{},"        return label;\n",[1119,1632,1633],{"class":1121,"line":1193},[1119,1634,1612],{},[1119,1636,1637],{"class":1121,"line":1199},[1119,1638,1144],{"emptyLinePlaceholder":1143},[1119,1640,1641],{"class":1121,"line":1205},[1119,1642,1643],{},"    public void report(String reading)\n",[1119,1645,1646],{"class":1121,"line":1210},[1119,1647,1602],{},[1119,1649,1650],{"class":1121,"line":1216},[1119,1651,1652],{},"        System.out.println(\"[\" + label + \"] \" + reading);\n",[1119,1654,1656],{"class":1121,"line":1655},18,[1119,1657,1612],{},[1119,1659,1661],{"class":1121,"line":1660},19,[1119,1662,1174],{},[1085,1664,1665,1666,1668],{},"Nothing here is new — it's an ordinary class with one field, a setter, a getter, and one more method (Ch.7). What makes it a ",[1269,1667,1094],{}," is only how the next class uses it.",[1080,1670,1672,1673],{"id":1671},"step-2-apply-the-is-a-test-before-writing-extends","Step 2: Apply the is-a Test Before Writing ",[1101,1674,1228],{},[1085,1676,1677,1678,1680,1681,1683],{},"Before reaching for inheritance, check that the relationship is genuinely is-a: a limit switch ",[1269,1679,1271],{}," sensor. Substitution test — anywhere the code expects \"a sensor\" (give it a label, ask it to report a reading), a limit switch would make complete sense. It passes, so ",[1101,1682,1228],{}," is the right tool.",[1080,1685,1687,1688],{"id":1686},"step-3-write-the-subclass-with-extends","Step 3: Write the Subclass with ",[1101,1689,1228],{},[1110,1691,1693],{"className":1112,"code":1692,"language":1114,"meta":1115,"style":1115},"class LimitSwitch extends Sensor\n{\n    public void reportPressed()\n    {\n        report(\"pressed\");\n    }\n}\n",[1101,1694,1695,1700,1704,1709,1713,1718,1722],{"__ignoreMap":1115},[1119,1696,1697],{"class":1121,"line":1122},[1119,1698,1699],{},"class LimitSwitch extends Sensor\n",[1119,1701,1702],{"class":1121,"line":1128},[1119,1703,1131],{},[1119,1705,1706],{"class":1121,"line":1134},[1119,1707,1708],{},"    public void reportPressed()\n",[1119,1710,1711],{"class":1121,"line":1140},[1119,1712,1602],{},[1119,1714,1715],{"class":1121,"line":1147},[1119,1716,1717],{},"        report(\"pressed\");\n",[1119,1719,1720],{"class":1121,"line":1153},[1119,1721,1612],{},[1119,1723,1724],{"class":1121,"line":1159},[1119,1725,1174],{},[1085,1727,1728,1731,1732,1735,1736,1402,1739,1405,1742,1745,1746,1749,1750,1753,1754,1756,1757,1760,1761,1447],{},[1101,1729,1730],{},"extends Sensor"," is the whole inheritance setup. ",[1101,1733,1734],{},"LimitSwitch"," now has ",[1101,1737,1738],{},"setLabel()",[1101,1740,1741],{},"getLabel()",[1101,1743,1744],{},"report()"," without writing any of them again. It adds one method of its own, ",[1101,1747,1748],{},"reportPressed()"," — that's ",[1088,1751,1752],{},"specialization",": most of the parent's behavior, plus something specific to this kind of sensor. Notice ",[1101,1755,1748],{}," doesn't rebuild the ",[1101,1758,1759],{},"\"[\" + label + \"] \""," formatting; it just calls the inherited ",[1101,1762,1744],{},[1080,1764,1766],{"id":1765},"step-4-put-it-together-in-one-file","Step 4: Put It Together in One File",[1085,1768,1769,1770,1773,1774,1777,1778,1781,1782,1784,1785,1787,1788,1791,1792,1795,1796,1799,1800,1802],{},"To run this as one file, all three classes go in ",[1101,1771,1772],{},"SensorDemo.java",". Java allows only one ",[1101,1775,1776],{},"public"," class per file — the one whose name matches the file — so ",[1101,1779,1780],{},"Sensor"," and ",[1101,1783,1734],{}," are written without ",[1101,1786,1776],{},". The class holding ",[1101,1789,1790],{},"main"," goes first: on Java 17, running a file with ",[1101,1793,1794],{},"java SensorDemo.java"," starts the ",[1269,1797,1798],{},"first"," class in the file, so ",[1101,1801,1790],{}," must live there. Java 25 is more forgiving (it also finds the class named after the file), but main-class-first works on both, so every multi-class program in this course uses it. (In a real robot project, each class would get its own file, like the lesson's examples.)",[1110,1804,1806],{"className":1112,"code":1805,"language":1114,"meta":1115,"style":1115},"public class SensorDemo\n{\n    public static void main(String[] args)\n    {\n        LimitSwitch bottomSwitch = new LimitSwitch();\n        bottomSwitch.setLabel(\"Elevator Bottom\");\n\n        bottomSwitch.report(\"online\");   \u002F\u002F inherited from Sensor\n        bottomSwitch.reportPressed();    \u002F\u002F LimitSwitch's own method\n        System.out.println(\"Label: \" + bottomSwitch.getLabel()); \u002F\u002F inherited from Sensor\n    }\n}\n\nclass Sensor\n{\n    private String label;\n\n    public void setLabel(String label)\n    {\n        this.label = label;\n    }\n\n    public String getLabel()\n    {\n        return label;\n    }\n\n    public void report(String reading)\n    {\n        System.out.println(\"[\" + label + \"] \" + reading);\n    }\n}\n\nclass LimitSwitch extends Sensor\n{\n    public void reportPressed()\n    {\n        report(\"pressed\");\n    }\n}\n",[1101,1807,1808,1813,1817,1822,1826,1831,1836,1840,1845,1850,1855,1859,1863,1867,1871,1875,1879,1883,1887,1891,1896,1901,1906,1911,1916,1921,1926,1931,1936,1941,1946,1951,1956,1961,1966,1971,1976,1981,1986,1991],{"__ignoreMap":1115},[1119,1809,1810],{"class":1121,"line":1122},[1119,1811,1812],{},"public class SensorDemo\n",[1119,1814,1815],{"class":1121,"line":1128},[1119,1816,1131],{},[1119,1818,1819],{"class":1121,"line":1134},[1119,1820,1821],{},"    public static void main(String[] args)\n",[1119,1823,1824],{"class":1121,"line":1140},[1119,1825,1602],{},[1119,1827,1828],{"class":1121,"line":1147},[1119,1829,1830],{},"        LimitSwitch bottomSwitch = new LimitSwitch();\n",[1119,1832,1833],{"class":1121,"line":1153},[1119,1834,1835],{},"        bottomSwitch.setLabel(\"Elevator Bottom\");\n",[1119,1837,1838],{"class":1121,"line":1159},[1119,1839,1144],{"emptyLinePlaceholder":1143},[1119,1841,1842],{"class":1121,"line":1165},[1119,1843,1844],{},"        bottomSwitch.report(\"online\");   \u002F\u002F inherited from Sensor\n",[1119,1846,1847],{"class":1121,"line":1171},[1119,1848,1849],{},"        bottomSwitch.reportPressed();    \u002F\u002F LimitSwitch's own method\n",[1119,1851,1852],{"class":1121,"line":1177},[1119,1853,1854],{},"        System.out.println(\"Label: \" + bottomSwitch.getLabel()); \u002F\u002F inherited from Sensor\n",[1119,1856,1857],{"class":1121,"line":1182},[1119,1858,1612],{},[1119,1860,1861],{"class":1121,"line":1188},[1119,1862,1174],{},[1119,1864,1865],{"class":1121,"line":1193},[1119,1866,1144],{"emptyLinePlaceholder":1143},[1119,1868,1869],{"class":1121,"line":1199},[1119,1870,1579],{},[1119,1872,1873],{"class":1121,"line":1205},[1119,1874,1131],{},[1119,1876,1877],{"class":1121,"line":1210},[1119,1878,1588],{},[1119,1880,1881],{"class":1121,"line":1216},[1119,1882,1144],{"emptyLinePlaceholder":1143},[1119,1884,1885],{"class":1121,"line":1655},[1119,1886,1597],{},[1119,1888,1889],{"class":1121,"line":1660},[1119,1890,1602],{},[1119,1892,1894],{"class":1121,"line":1893},20,[1119,1895,1607],{},[1119,1897,1899],{"class":1121,"line":1898},21,[1119,1900,1612],{},[1119,1902,1904],{"class":1121,"line":1903},22,[1119,1905,1144],{"emptyLinePlaceholder":1143},[1119,1907,1909],{"class":1121,"line":1908},23,[1119,1910,1621],{},[1119,1912,1914],{"class":1121,"line":1913},24,[1119,1915,1602],{},[1119,1917,1919],{"class":1121,"line":1918},25,[1119,1920,1630],{},[1119,1922,1924],{"class":1121,"line":1923},26,[1119,1925,1612],{},[1119,1927,1929],{"class":1121,"line":1928},27,[1119,1930,1144],{"emptyLinePlaceholder":1143},[1119,1932,1934],{"class":1121,"line":1933},28,[1119,1935,1643],{},[1119,1937,1939],{"class":1121,"line":1938},29,[1119,1940,1602],{},[1119,1942,1944],{"class":1121,"line":1943},30,[1119,1945,1652],{},[1119,1947,1949],{"class":1121,"line":1948},31,[1119,1950,1612],{},[1119,1952,1954],{"class":1121,"line":1953},32,[1119,1955,1174],{},[1119,1957,1959],{"class":1121,"line":1958},33,[1119,1960,1144],{"emptyLinePlaceholder":1143},[1119,1962,1964],{"class":1121,"line":1963},34,[1119,1965,1699],{},[1119,1967,1969],{"class":1121,"line":1968},35,[1119,1970,1131],{},[1119,1972,1974],{"class":1121,"line":1973},36,[1119,1975,1708],{},[1119,1977,1979],{"class":1121,"line":1978},37,[1119,1980,1602],{},[1119,1982,1984],{"class":1121,"line":1983},38,[1119,1985,1717],{},[1119,1987,1989],{"class":1121,"line":1988},39,[1119,1990,1612],{},[1119,1992,1994],{"class":1121,"line":1993},40,[1119,1995,1174],{},[1085,1997,1998,2001,2002,2004,2005,2007,2008,1402,2010,1405,2012,2014,2015,2017,2018,2020,2021,1447],{},[1101,1999,2000],{},"bottomSwitch"," is a ",[1101,2003,1734],{},", yet ",[1101,2006,1790],{}," calls ",[1101,2009,1738],{},[1101,2011,1744],{},[1101,2013,1741],{}," on it — none of which are written inside ",[1101,2016,1734],{},". They come from ",[1101,2019,1780],{},", through ",[1101,2022,1228],{},[1080,2024,2026],{"id":2025},"what-it-prints","What It Prints",[1110,2028,2033],{"className":2029,"code":2031,"language":2032},[2030],"language-text","[Elevator Bottom] online\n[Elevator Bottom] pressed\nLabel: Elevator Bottom\n","text",[1101,2034,2031],{"__ignoreMap":1115},[1085,2036,2037,2038,2040,2041,1447],{},"The first two lines have identical formatting because both go through the same inherited ",[1101,2039,1744],{}," method — there's only one copy of that code, in ",[1101,2042,1780],{},[1080,2044,2046],{"id":2045},"step-5-where-has-a-fits-instead","Step 5: Where has-a Fits Instead",[1085,2048,2049,2050,2053,2054,2057,2058,2060,2061,2063,2064,2066,2067,2070,2071,2073],{},"The elevator itself ",[1269,2051,2052],{},"uses"," this limit switch. Should ",[1101,2055,2056],{},"Elevator"," extend ",[1101,2059,1734],{}," (or ",[1101,2062,1780],{},") to get access to it? Run the substitution test: would an elevator make sense anywhere the code expects \"a sensor\"? No — an elevator isn't a ",[1269,2065,1307],{}," sensor; it just ",[1269,2068,2069],{},"has"," one. That's has-a, so it's modeled as a field, not ",[1101,2072,1228],{},":",[1110,2075,2077],{"className":1112,"code":2076,"language":1114,"meta":1115,"style":1115},"class Elevator\n{\n    private LimitSwitch bottomSwitch; \u002F\u002F has-a: an Elevator holds a LimitSwitch, isn't one\n}\n",[1101,2078,2079,2084,2088,2093],{"__ignoreMap":1115},[1119,2080,2081],{"class":1121,"line":1122},[1119,2082,2083],{},"class Elevator\n",[1119,2085,2086],{"class":1121,"line":1128},[1119,2087,1131],{},[1119,2089,2090],{"class":1121,"line":1134},[1119,2091,2092],{},"    private LimitSwitch bottomSwitch; \u002F\u002F has-a: an Elevator holds a LimitSwitch, isn't one\n",[1119,2094,2095],{"class":1121,"line":1140},[1119,2096,1174],{},[1085,2098,2099,2101,2102,2104,2105,1447],{},[1101,2100,2056],{}," has no ",[1101,2103,1228],{}," at all — which, as the lesson notes, means its implicit superclass is ",[1101,2106,1253],{},[1080,2108,2110],{"id":2109},"recap","Recap",[1391,2112,2113,2128,2140,2146],{},[1394,2114,2115,2117,2118,2121,2122,2124,2125,2127],{},[1101,2116,1228],{}," sets up inheritance: ",[1101,2119,2120],{},"LimitSwitch extends Sensor"," gives ",[1101,2123,1734],{}," every method ",[1101,2126,1780],{}," has, without rewriting them.",[1394,2129,2130,2131,2133,2134,2136,2137,2139],{},"Generalization pulled the shared label\u002Freport code up into ",[1101,2132,1780],{},"; specialization let ",[1101,2135,1734],{}," add its own ",[1101,2138,1748],{}," on top.",[1394,2141,2142,2143,2145],{},"Run the is-a substitution test before writing ",[1101,2144,1228],{}," — a limit switch passes as \"a sensor\"; an elevator doesn't.",[1394,2147,2148,2149,2151,2152,2154,2155,1447],{},"When one class just holds and uses another (an ",[1101,2150,2056],{}," holding a ",[1101,2153,1734],{},"), that's has-a — a field, not ",[1101,2156,1228],{},[1520,2158,1522],{},{"title":1115,"searchDepth":1128,"depth":1128,"links":2160},[2161,2162,2163,2165,2167,2168,2169,2170],{"id":1546,"depth":1128,"text":1547},{"id":1557,"depth":1128,"text":1558},{"id":1671,"depth":1128,"text":2164},"Step 2: Apply the is-a Test Before Writing extends",{"id":1686,"depth":1128,"text":2166},"Step 3: Write the Subclass with extends",{"id":1765,"depth":1128,"text":1766},{"id":2025,"depth":1128,"text":2026},{"id":2045,"depth":1128,"text":2046},{"id":2109,"depth":1128,"text":2110},{"outlineRef":1533,"pairsWith":2172,"status":2173},"[`lessons\u002Fch17-inheritance-and-abstractions\u002F17.1-inheritance-superclass-subclass.md`](..\u002F..\u002Flessons\u002Fch17-inheritance-and-abstractions\u002F17.1-inheritance-superclass-subclass.md)","new — authored worked example (fully solved, walked step by step — not a problem to attempt)",{"title":643,"description":1115},"lsZoQOZNupOSKyrWcrzk1gHN2aRgGRkuSoUifrHUKpM",{"id":2177,"title":956,"body":2178,"description":1115,"extension":1531,"meta":3396,"navigation":1143,"path":955,"seo":3398,"stem":957,"__hash__":3399},"exercises\u002Fshockwave-curriculum\u002Fexercises\u002Fch17-inheritance-and-abstractions\u002F17.1-inheritance-superclass-subclass.md",{"type":1073,"value":2179,"toc":3391},[2180,2183,2187,2199,2204,2234,2240,2249,2280,2284,2312,2387,2402,2452,2457,2566,2634,2638,2644,2651,2704,2730,2736,2741,2920,2925,2930,2936,2941,2946,2951,2955,2961,2965,2971,2976,2980,2986,2990,2996,3001,3005,3011,3015,3021,3026,3030,3036,3040,3046,3051,3345,3389],[1076,2181,956],{"id":2182},"inheritance-superclass-subclass-exercises",[1080,2184,2186],{"id":2185},"multiple-choice","Multiple Choice",[1085,2188,2189,2192,2193,2195,2196,2198],{},[1088,2190,2191],{},"Question:"," A teammate is deciding where to use ",[1101,2194,1228],{},". Which of these is a genuine is-a relationship, where ",[1101,2197,1228],{}," is the right choice?",[1085,2200,2201],{},[1088,2202,2203],{},"Options:",[1391,2205,2206,2213,2220,2227],{},[1394,2207,2208,2209,2212],{},"A. ",[1101,2210,2211],{},"class Shooter extends Flywheel"," — because a shooter contains a flywheel",[1394,2214,2215,2216,2219],{},"B. ",[1101,2217,2218],{},"class BrushlessMotor extends Motor"," — because a brushless motor is a kind of motor",[1394,2221,2222,2223,2226],{},"C. ",[1101,2224,2225],{},"class Robot extends Battery"," — because a robot runs on a battery",[1394,2228,2229,2230,2233],{},"D. ",[1101,2231,2232],{},"class SwerveModule extends Drivetrain"," — because a drivetrain is built from swerve modules",[1085,2235,2236,2239],{},[1088,2237,2238],{},"Answer:"," B",[1085,2241,2242,2245,2246,2248],{},[1088,2243,2244],{},"Why:"," Apply the substitution test: anywhere the code expects \"a motor,\" a brushless motor makes complete sense — it really is a specialized kind of motor. That's is-a, which is exactly what ",[1101,2247,1228],{}," models.",[1391,2250,2251,2264,2270],{},[1394,2252,2253,2254,2256,2257,2259,2260,2263],{},"A is wrong — a shooter ",[1269,2255,1330],{}," flywheel as one of its parts; a shooter isn't a kind of flywheel. That's has-a, so ",[1101,2258,1340],{}," should hold a ",[1101,2261,2262],{},"Flywheel"," field instead.",[1394,2265,2266,2267,2269],{},"C is wrong — a robot ",[1269,2268,1330],{}," battery. A robot wouldn't make sense anywhere the code expects \"a battery,\" so the substitution test fails.",[1394,2271,2272,2273,2276,2277,2279],{},"D is wrong — a swerve module is one ",[1269,2274,2275],{},"part"," of a drivetrain, not a kind of drivetrain. The drivetrain ",[1269,2278,2069],{}," swerve modules (has-a); a single module can't stand in anywhere a whole drivetrain is expected.",[1080,2281,2283],{"id":2282},"micro-parsons","Micro-Parsons",[1085,2285,2286,2289,2290,1337,2293,2296,2297,2299,2300,2303,2304,2307,2308,2311],{},[1088,2287,2288],{},"Problem:"," A pit display has a basic ",[1101,2291,2292],{},"Light",[1101,2294,2295],{},"StatusLight"," that is a kind of ",[1101,2298,2292],{}," with one extra ability: ",[1101,2301,2302],{},"flash()",", which turns the light on (using the inherited ",[1101,2305,2306],{},"turnOn()"," method) and then prints ",[1101,2309,2310],{},"Flashing",". Given this main class and superclass, which are already written:",[1110,2313,2315],{"className":1112,"code":2314,"language":1114,"meta":1115,"style":1115},"public class PitLights\n{\n    public static void main(String[] args)\n    {\n        StatusLight ring = new StatusLight();\n        ring.flash();\n    }\n}\n\nclass Light\n{\n    public void turnOn()\n    {\n        System.out.println(\"Light on\");\n    }\n}\n",[1101,2316,2317,2322,2326,2330,2334,2339,2344,2348,2352,2356,2361,2365,2370,2374,2379,2383],{"__ignoreMap":1115},[1119,2318,2319],{"class":1121,"line":1122},[1119,2320,2321],{},"public class PitLights\n",[1119,2323,2324],{"class":1121,"line":1128},[1119,2325,1131],{},[1119,2327,2328],{"class":1121,"line":1134},[1119,2329,1821],{},[1119,2331,2332],{"class":1121,"line":1140},[1119,2333,1602],{},[1119,2335,2336],{"class":1121,"line":1147},[1119,2337,2338],{},"        StatusLight ring = new StatusLight();\n",[1119,2340,2341],{"class":1121,"line":1153},[1119,2342,2343],{},"        ring.flash();\n",[1119,2345,2346],{"class":1121,"line":1159},[1119,2347,1612],{},[1119,2349,2350],{"class":1121,"line":1165},[1119,2351,1174],{},[1119,2353,2354],{"class":1121,"line":1171},[1119,2355,1144],{"emptyLinePlaceholder":1143},[1119,2357,2358],{"class":1121,"line":1177},[1119,2359,2360],{},"class Light\n",[1119,2362,2363],{"class":1121,"line":1182},[1119,2364,1131],{},[1119,2366,2367],{"class":1121,"line":1188},[1119,2368,2369],{},"    public void turnOn()\n",[1119,2371,2372],{"class":1121,"line":1193},[1119,2373,1602],{},[1119,2375,2376],{"class":1121,"line":1199},[1119,2377,2378],{},"        System.out.println(\"Light on\");\n",[1119,2380,2381],{"class":1121,"line":1205},[1119,2382,1612],{},[1119,2384,2385],{"class":1121,"line":1210},[1119,2386,1174],{},[1085,2388,2389,2390,2392,2393,2395,2396,2399,2400,2073],{},"Reorder the fragments below into the ",[1101,2391,2295],{}," class that goes right after ",[1101,2394,2292],{},", so the program prints ",[1101,2397,2398],{},"Light on"," and then ",[1101,2401,2310],{},[1391,2403,2404,2410,2416,2422,2428,2434,2440,2446],{},[1394,2405,2406,2407],{},"a. ",[1101,2408,2409],{},"        turnOn();",[1394,2411,2412,2413],{},"b. ",[1101,2414,2415],{},"class StatusLight extends Light",[1394,2417,2418,2419],{},"c. ",[1101,2420,2421],{},"    }",[1394,2423,2424,2425],{},"d. ",[1101,2426,2427],{},"    public void flash()",[1394,2429,2430,2431],{},"e. ",[1101,2432,2433],{},"}",[1394,2435,2436,2437],{},"f. ",[1101,2438,2439],{},"        System.out.println(\"Flashing\");",[1394,2441,2442,2443],{},"g. ",[1101,2444,2445],{},"{",[1394,2447,2448,2449],{},"h. ",[1101,2450,2451],{},"    {",[1085,2453,2454,2456],{},[1088,2455,2238],{}," b, g, d, h, a, f, c, e",[1110,2458,2460],{"className":1112,"code":2459,"language":1114,"meta":1115,"style":1115},"public class PitLights\n{\n    public static void main(String[] args)\n    {\n        StatusLight ring = new StatusLight();\n        ring.flash();\n    }\n}\n\nclass Light\n{\n    public void turnOn()\n    {\n        System.out.println(\"Light on\");\n    }\n}\n\nclass StatusLight extends Light\n{\n    public void flash()\n    {\n        turnOn();\n        System.out.println(\"Flashing\");\n    }\n}\n",[1101,2461,2462,2466,2470,2474,2478,2482,2486,2490,2494,2498,2502,2506,2510,2514,2518,2522,2526,2530,2535,2539,2544,2548,2553,2558,2562],{"__ignoreMap":1115},[1119,2463,2464],{"class":1121,"line":1122},[1119,2465,2321],{},[1119,2467,2468],{"class":1121,"line":1128},[1119,2469,1131],{},[1119,2471,2472],{"class":1121,"line":1134},[1119,2473,1821],{},[1119,2475,2476],{"class":1121,"line":1140},[1119,2477,1602],{},[1119,2479,2480],{"class":1121,"line":1147},[1119,2481,2338],{},[1119,2483,2484],{"class":1121,"line":1153},[1119,2485,2343],{},[1119,2487,2488],{"class":1121,"line":1159},[1119,2489,1612],{},[1119,2491,2492],{"class":1121,"line":1165},[1119,2493,1174],{},[1119,2495,2496],{"class":1121,"line":1171},[1119,2497,1144],{"emptyLinePlaceholder":1143},[1119,2499,2500],{"class":1121,"line":1177},[1119,2501,2360],{},[1119,2503,2504],{"class":1121,"line":1182},[1119,2505,1131],{},[1119,2507,2508],{"class":1121,"line":1188},[1119,2509,2369],{},[1119,2511,2512],{"class":1121,"line":1193},[1119,2513,1602],{},[1119,2515,2516],{"class":1121,"line":1199},[1119,2517,2378],{},[1119,2519,2520],{"class":1121,"line":1205},[1119,2521,1612],{},[1119,2523,2524],{"class":1121,"line":1210},[1119,2525,1174],{},[1119,2527,2528],{"class":1121,"line":1216},[1119,2529,1144],{"emptyLinePlaceholder":1143},[1119,2531,2532],{"class":1121,"line":1655},[1119,2533,2534],{},"class StatusLight extends Light\n",[1119,2536,2537],{"class":1121,"line":1660},[1119,2538,1131],{},[1119,2540,2541],{"class":1121,"line":1893},[1119,2542,2543],{},"    public void flash()\n",[1119,2545,2546],{"class":1121,"line":1898},[1119,2547,1602],{},[1119,2549,2550],{"class":1121,"line":1903},[1119,2551,2552],{},"        turnOn();\n",[1119,2554,2555],{"class":1121,"line":1908},[1119,2556,2557],{},"        System.out.println(\"Flashing\");\n",[1119,2559,2560],{"class":1121,"line":1913},[1119,2561,1612],{},[1119,2563,2564],{"class":1121,"line":1918},[1119,2565,1174],{},[1085,2567,2568,2571,2572,2575,2576,2579,2580,2582,2583,2586,2587,2590,2591,2594,2595,1402,2597,2599,2600,2603,2604,2599,2607,2610,2611,2613,2614,2616,2617,2619,2620,2622,2623,2625,2626,2629,2630,2633],{},[1088,2569,2570],{},"Why this order:"," The class line (",[1101,2573,2574],{},"b",") comes first — ",[1101,2577,2578],{},"extends Light"," is what makes ",[1101,2581,2295],{}," a subclass, and it belongs in the class declaration itself, before the class's opening brace (",[1101,2584,2585],{},"g","). The new method's signature (",[1101,2588,2589],{},"d",") and its opening brace (",[1101,2592,2593],{},"h",") come next. Inside ",[1101,2596,2302],{},[1101,2598,2306],{}," (",[1101,2601,2602],{},"a",") must come before the ",[1101,2605,2606],{},"println",[1101,2608,2609],{},"f","), since the program has to print ",[1101,2612,2398],{}," before ",[1101,2615,2310],{},". ",[1101,2618,2295],{}," never defines ",[1101,2621,2306],{}," itself — it can call it only because it inherited it from ",[1101,2624,2292],{},". Then the braces close in reverse order: the method's body (",[1101,2627,2628],{},"c","), then the class's body (",[1101,2631,2632],{},"e",").",[1080,2635,2637],{"id":2636},"coding","Coding",[1085,2639,2640,2643],{},[1088,2641,2642],{},"Mode:"," full-program",[1085,2645,2646,1243,2648,2650],{},[1088,2647,2288],{},[1101,2649,1107],{}," (below, already written, and not to be changed) is the course's\nsuperclass for robot mechanisms. Write two classes:",[1391,2652,2653,2686],{},[1394,2654,2655,1274,2657,2659,2660,2662,2663,2665,2666,2616,2669,2672,2673,2676,2677,2679,2680,2683,2684,1447],{},[1101,2656,1232],{},[1088,2658,1098],{}," of ",[1101,2661,1107],{}," (an intake ",[1269,2664,1271],{}," robot part). It holds a count of game\npieces, starting at ",[1101,2667,2668],{},"0",[1101,2670,2671],{},"addPiece()"," adds one piece, but an intake holds at most ",[1101,2674,2675],{},"MAX_PIECES = 2",";\nonce it is full, ",[1101,2678,2671],{}," does nothing. ",[1101,2681,2682],{},"getPieceCount()"," returns the count. The constructor\ntakes the intake's name and hands it to ",[1101,2685,1107],{},[1394,2687,2688,2690,2691,1243,2694,2696,2697,2699,2700,2703],{},[1101,2689,1299],{},", which ",[1088,2692,2693],{},"has an",[1101,2695,1232],{}," (a field, not a superclass). Its constructor takes the intake's\nname and builds the ",[1101,2698,1232],{},"; ",[1101,2701,2702],{},"getIntake()"," returns it.",[1085,2705,2706,2708,2709,2712,2713,2716,2717,2720,2721,2723,2724,2726,2727,2073],{},[1101,2707,1232],{}," should ",[1269,2710,2711],{},"not"," write its own ",[1101,2714,2715],{},"log"," or ",[1101,2718,2719],{},"stop",": it inherits them from ",[1101,2722,1107],{},". The fixed\n",[1101,2725,1790],{}," reads an intake name and a number of pieces to pick up, then logs how many the intake ended\nup holding and stops it. For the input ",[1101,2728,2729],{},"Front 3",[1110,2731,2734],{"className":2732,"code":2733,"language":2032,"meta":1115},[2030],"[Front] holding 2\n[Front] stopped\n",[1101,2735,2733],{"__ignoreMap":1115},[1085,2737,2738],{},[1088,2739,2740],{},"Starter:",[1110,2742,2744],{"className":1112,"code":2743,"language":1114,"meta":1115,"style":1115},"import java.util.*;\n\npublic class Main\n{\n    \u002F\u002F Don't change main\n    public static void main(String[] args)\n    {\n        Scanner in = new Scanner(System.in);\n        Robot robot = new Robot(in.next());\n        int pickups = in.nextInt();\n        for (int i = 0; i \u003C pickups; i++)\n        {\n            robot.getIntake().addPiece();\n        }\n        robot.getIntake().log(\"holding \" + robot.getIntake().getPieceCount());\n        robot.getIntake().stop();\n    }\n}\n\n\u002F\u002F Don't change RobotPart\nclass RobotPart\n{\n    private String name;\n\n    public RobotPart(String name) { this.name = name; }\n    public String getName() { return name; }\n    public void log(String msg) { System.out.println(\"[\" + name + \"] \" + msg); }\n    public void stop() { log(\"stopped\"); }\n}\n\nclass Intake\n{\n    \u002F\u002F TODO: make Intake a subclass of RobotPart; add the piece count, addPiece(), getPieceCount()\n}\n\nclass Robot\n{\n    \u002F\u002F TODO: a field for the Intake, a constructor that builds it, and getIntake()\n}\n",[1101,2745,2746,2751,2755,2760,2764,2769,2773,2777,2782,2787,2792,2797,2802,2807,2812,2817,2822,2826,2830,2834,2839,2844,2848,2852,2856,2860,2864,2868,2872,2876,2880,2885,2889,2894,2898,2902,2907,2911,2916],{"__ignoreMap":1115},[1119,2747,2748],{"class":1121,"line":1122},[1119,2749,2750],{},"import java.util.*;\n",[1119,2752,2753],{"class":1121,"line":1128},[1119,2754,1144],{"emptyLinePlaceholder":1143},[1119,2756,2757],{"class":1121,"line":1134},[1119,2758,2759],{},"public class Main\n",[1119,2761,2762],{"class":1121,"line":1140},[1119,2763,1131],{},[1119,2765,2766],{"class":1121,"line":1147},[1119,2767,2768],{},"    \u002F\u002F Don't change main\n",[1119,2770,2771],{"class":1121,"line":1153},[1119,2772,1821],{},[1119,2774,2775],{"class":1121,"line":1159},[1119,2776,1602],{},[1119,2778,2779],{"class":1121,"line":1165},[1119,2780,2781],{},"        Scanner in = new Scanner(System.in);\n",[1119,2783,2784],{"class":1121,"line":1171},[1119,2785,2786],{},"        Robot robot = new Robot(in.next());\n",[1119,2788,2789],{"class":1121,"line":1177},[1119,2790,2791],{},"        int pickups = in.nextInt();\n",[1119,2793,2794],{"class":1121,"line":1182},[1119,2795,2796],{},"        for (int i = 0; i \u003C pickups; i++)\n",[1119,2798,2799],{"class":1121,"line":1188},[1119,2800,2801],{},"        {\n",[1119,2803,2804],{"class":1121,"line":1193},[1119,2805,2806],{},"            robot.getIntake().addPiece();\n",[1119,2808,2809],{"class":1121,"line":1199},[1119,2810,2811],{},"        }\n",[1119,2813,2814],{"class":1121,"line":1205},[1119,2815,2816],{},"        robot.getIntake().log(\"holding \" + robot.getIntake().getPieceCount());\n",[1119,2818,2819],{"class":1121,"line":1210},[1119,2820,2821],{},"        robot.getIntake().stop();\n",[1119,2823,2824],{"class":1121,"line":1216},[1119,2825,1612],{},[1119,2827,2828],{"class":1121,"line":1655},[1119,2829,1174],{},[1119,2831,2832],{"class":1121,"line":1660},[1119,2833,1144],{"emptyLinePlaceholder":1143},[1119,2835,2836],{"class":1121,"line":1893},[1119,2837,2838],{},"\u002F\u002F Don't change RobotPart\n",[1119,2840,2841],{"class":1121,"line":1898},[1119,2842,2843],{},"class RobotPart\n",[1119,2845,2846],{"class":1121,"line":1903},[1119,2847,1131],{},[1119,2849,2850],{"class":1121,"line":1908},[1119,2851,1137],{},[1119,2853,2854],{"class":1121,"line":1913},[1119,2855,1144],{"emptyLinePlaceholder":1143},[1119,2857,2858],{"class":1121,"line":1918},[1119,2859,1150],{},[1119,2861,2862],{"class":1121,"line":1923},[1119,2863,1156],{},[1119,2865,2866],{"class":1121,"line":1928},[1119,2867,1162],{},[1119,2869,2870],{"class":1121,"line":1933},[1119,2871,1168],{},[1119,2873,2874],{"class":1121,"line":1938},[1119,2875,1174],{},[1119,2877,2878],{"class":1121,"line":1943},[1119,2879,1144],{"emptyLinePlaceholder":1143},[1119,2881,2882],{"class":1121,"line":1948},[1119,2883,2884],{},"class Intake\n",[1119,2886,2887],{"class":1121,"line":1953},[1119,2888,1131],{},[1119,2890,2891],{"class":1121,"line":1958},[1119,2892,2893],{},"    \u002F\u002F TODO: make Intake a subclass of RobotPart; add the piece count, addPiece(), getPieceCount()\n",[1119,2895,2896],{"class":1121,"line":1963},[1119,2897,1174],{},[1119,2899,2900],{"class":1121,"line":1968},[1119,2901,1144],{"emptyLinePlaceholder":1143},[1119,2903,2904],{"class":1121,"line":1973},[1119,2905,2906],{},"class Robot\n",[1119,2908,2909],{"class":1121,"line":1978},[1119,2910,1131],{},[1119,2912,2913],{"class":1121,"line":1983},[1119,2914,2915],{},"    \u002F\u002F TODO: a field for the Intake, a constructor that builds it, and getIntake()\n",[1119,2917,2918],{"class":1121,"line":1988},[1119,2919,1174],{},[1085,2921,2922],{},[1088,2923,2924],{},"Scenario 1 (visible):",[1085,2926,2927],{},[1088,2928,2929],{},"Input:",[1110,2931,2934],{"className":2932,"code":2933,"language":2032,"meta":1115},[2030],"Front 3\n",[1101,2935,2933],{"__ignoreMap":1115},[1085,2937,2938],{},[1088,2939,2940],{},"Expected output:",[1110,2942,2944],{"className":2943,"code":2733,"language":2032,"meta":1115},[2030],[1101,2945,2733],{"__ignoreMap":1115},[1085,2947,2948],{},[1088,2949,2950],{},"Scenario 2 (visible):",[1085,2952,2953],{},[1088,2954,2929],{},[1110,2956,2959],{"className":2957,"code":2958,"language":2032,"meta":1115},[2030],"Back 1\n",[1101,2960,2958],{"__ignoreMap":1115},[1085,2962,2963],{},[1088,2964,2940],{},[1110,2966,2969],{"className":2967,"code":2968,"language":2032,"meta":1115},[2030],"[Back] holding 1\n[Back] stopped\n",[1101,2970,2968],{"__ignoreMap":1115},[1085,2972,2973],{},[1088,2974,2975],{},"Scenario 3 (hidden):",[1085,2977,2978],{},[1088,2979,2929],{},[1110,2981,2984],{"className":2982,"code":2983,"language":2032,"meta":1115},[2030],"Rear 0\n",[1101,2985,2983],{"__ignoreMap":1115},[1085,2987,2988],{},[1088,2989,2940],{},[1110,2991,2994],{"className":2992,"code":2993,"language":2032,"meta":1115},[2030],"[Rear] holding 0\n[Rear] stopped\n",[1101,2995,2993],{"__ignoreMap":1115},[1085,2997,2998],{},[1088,2999,3000],{},"Scenario 4 (hidden):",[1085,3002,3003],{},[1088,3004,2929],{},[1110,3006,3009],{"className":3007,"code":3008,"language":2032,"meta":1115},[2030],"Wide 2\n",[1101,3010,3008],{"__ignoreMap":1115},[1085,3012,3013],{},[1088,3014,2940],{},[1110,3016,3019],{"className":3017,"code":3018,"language":2032,"meta":1115},[2030],"[Wide] holding 2\n[Wide] stopped\n",[1101,3020,3018],{"__ignoreMap":1115},[1085,3022,3023],{},[1088,3024,3025],{},"Scenario 5 (hidden):",[1085,3027,3028],{},[1088,3029,2929],{},[1110,3031,3034],{"className":3032,"code":3033,"language":2032,"meta":1115},[2030],"Top 9\n",[1101,3035,3033],{"__ignoreMap":1115},[1085,3037,3038],{},[1088,3039,2940],{},[1110,3041,3044],{"className":3042,"code":3043,"language":2032,"meta":1115},[2030],"[Top] holding 2\n[Top] stopped\n",[1101,3045,3043],{"__ignoreMap":1115},[1085,3047,3048],{},[1088,3049,3050],{},"Solution:",[1110,3052,3054],{"className":1112,"code":3053,"language":1114,"meta":1115,"style":1115},"import java.util.*;\n\npublic class Main\n{\n    \u002F\u002F Don't change main\n    public static void main(String[] args)\n    {\n        Scanner in = new Scanner(System.in);\n        Robot robot = new Robot(in.next());\n        int pickups = in.nextInt();\n        for (int i = 0; i \u003C pickups; i++)\n        {\n            robot.getIntake().addPiece();\n        }\n        robot.getIntake().log(\"holding \" + robot.getIntake().getPieceCount());\n        robot.getIntake().stop();\n    }\n}\n\n\u002F\u002F Don't change RobotPart\nclass RobotPart\n{\n    private String name;\n\n    public RobotPart(String name) { this.name = name; }\n    public String getName() { return name; }\n    public void log(String msg) { System.out.println(\"[\" + name + \"] \" + msg); }\n    public void stop() { log(\"stopped\"); }\n}\n\nclass Intake extends RobotPart\n{\n    private static final int MAX_PIECES = 2;\n    private int pieceCount;\n\n    public Intake(String name)\n    {\n        super(name);\n        pieceCount = 0;\n    }\n\n    public void addPiece()\n    {\n        if (pieceCount \u003C MAX_PIECES)\n        {\n            pieceCount++;\n        }\n    }\n\n    public int getPieceCount() { return pieceCount; }\n}\n\nclass Robot\n{\n    private Intake intake;\n\n    public Robot(String intakeName)\n    {\n        intake = new Intake(intakeName);\n    }\n\n    public Intake getIntake() { return intake; }\n}\n",[1101,3055,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,3181,3185,3190,3195,3199,3204,3208,3213,3218,3222,3227,3233,3238,3244,3249,3255,3260,3265,3270,3276,3281,3286,3291,3296,3302,3307,3313,3318,3324,3329,3334,3340],{"__ignoreMap":1115},[1119,3057,3058],{"class":1121,"line":1122},[1119,3059,2750],{},[1119,3061,3062],{"class":1121,"line":1128},[1119,3063,1144],{"emptyLinePlaceholder":1143},[1119,3065,3066],{"class":1121,"line":1134},[1119,3067,2759],{},[1119,3069,3070],{"class":1121,"line":1140},[1119,3071,1131],{},[1119,3073,3074],{"class":1121,"line":1147},[1119,3075,2768],{},[1119,3077,3078],{"class":1121,"line":1153},[1119,3079,1821],{},[1119,3081,3082],{"class":1121,"line":1159},[1119,3083,1602],{},[1119,3085,3086],{"class":1121,"line":1165},[1119,3087,2781],{},[1119,3089,3090],{"class":1121,"line":1171},[1119,3091,2786],{},[1119,3093,3094],{"class":1121,"line":1177},[1119,3095,2791],{},[1119,3097,3098],{"class":1121,"line":1182},[1119,3099,2796],{},[1119,3101,3102],{"class":1121,"line":1188},[1119,3103,2801],{},[1119,3105,3106],{"class":1121,"line":1193},[1119,3107,2806],{},[1119,3109,3110],{"class":1121,"line":1199},[1119,3111,2811],{},[1119,3113,3114],{"class":1121,"line":1205},[1119,3115,2816],{},[1119,3117,3118],{"class":1121,"line":1210},[1119,3119,2821],{},[1119,3121,3122],{"class":1121,"line":1216},[1119,3123,1612],{},[1119,3125,3126],{"class":1121,"line":1655},[1119,3127,1174],{},[1119,3129,3130],{"class":1121,"line":1660},[1119,3131,1144],{"emptyLinePlaceholder":1143},[1119,3133,3134],{"class":1121,"line":1893},[1119,3135,2838],{},[1119,3137,3138],{"class":1121,"line":1898},[1119,3139,2843],{},[1119,3141,3142],{"class":1121,"line":1903},[1119,3143,1131],{},[1119,3145,3146],{"class":1121,"line":1908},[1119,3147,1137],{},[1119,3149,3150],{"class":1121,"line":1913},[1119,3151,1144],{"emptyLinePlaceholder":1143},[1119,3153,3154],{"class":1121,"line":1918},[1119,3155,1150],{},[1119,3157,3158],{"class":1121,"line":1923},[1119,3159,1156],{},[1119,3161,3162],{"class":1121,"line":1928},[1119,3163,1162],{},[1119,3165,3166],{"class":1121,"line":1933},[1119,3167,1168],{},[1119,3169,3170],{"class":1121,"line":1938},[1119,3171,1174],{},[1119,3173,3174],{"class":1121,"line":1943},[1119,3175,1144],{"emptyLinePlaceholder":1143},[1119,3177,3178],{"class":1121,"line":1948},[1119,3179,3180],{},"class Intake extends RobotPart\n",[1119,3182,3183],{"class":1121,"line":1953},[1119,3184,1131],{},[1119,3186,3187],{"class":1121,"line":1958},[1119,3188,3189],{},"    private static final int MAX_PIECES = 2;\n",[1119,3191,3192],{"class":1121,"line":1963},[1119,3193,3194],{},"    private int pieceCount;\n",[1119,3196,3197],{"class":1121,"line":1968},[1119,3198,1144],{"emptyLinePlaceholder":1143},[1119,3200,3201],{"class":1121,"line":1973},[1119,3202,3203],{},"    public Intake(String name)\n",[1119,3205,3206],{"class":1121,"line":1978},[1119,3207,1602],{},[1119,3209,3210],{"class":1121,"line":1983},[1119,3211,3212],{},"        super(name);\n",[1119,3214,3215],{"class":1121,"line":1988},[1119,3216,3217],{},"        pieceCount = 0;\n",[1119,3219,3220],{"class":1121,"line":1993},[1119,3221,1612],{},[1119,3223,3225],{"class":1121,"line":3224},41,[1119,3226,1144],{"emptyLinePlaceholder":1143},[1119,3228,3230],{"class":1121,"line":3229},42,[1119,3231,3232],{},"    public void addPiece()\n",[1119,3234,3236],{"class":1121,"line":3235},43,[1119,3237,1602],{},[1119,3239,3241],{"class":1121,"line":3240},44,[1119,3242,3243],{},"        if (pieceCount \u003C MAX_PIECES)\n",[1119,3245,3247],{"class":1121,"line":3246},45,[1119,3248,2801],{},[1119,3250,3252],{"class":1121,"line":3251},46,[1119,3253,3254],{},"            pieceCount++;\n",[1119,3256,3258],{"class":1121,"line":3257},47,[1119,3259,2811],{},[1119,3261,3263],{"class":1121,"line":3262},48,[1119,3264,1612],{},[1119,3266,3268],{"class":1121,"line":3267},49,[1119,3269,1144],{"emptyLinePlaceholder":1143},[1119,3271,3273],{"class":1121,"line":3272},50,[1119,3274,3275],{},"    public int getPieceCount() { return pieceCount; }\n",[1119,3277,3279],{"class":1121,"line":3278},51,[1119,3280,1174],{},[1119,3282,3284],{"class":1121,"line":3283},52,[1119,3285,1144],{"emptyLinePlaceholder":1143},[1119,3287,3289],{"class":1121,"line":3288},53,[1119,3290,2906],{},[1119,3292,3294],{"class":1121,"line":3293},54,[1119,3295,1131],{},[1119,3297,3299],{"class":1121,"line":3298},55,[1119,3300,3301],{},"    private Intake intake;\n",[1119,3303,3305],{"class":1121,"line":3304},56,[1119,3306,1144],{"emptyLinePlaceholder":1143},[1119,3308,3310],{"class":1121,"line":3309},57,[1119,3311,3312],{},"    public Robot(String intakeName)\n",[1119,3314,3316],{"class":1121,"line":3315},58,[1119,3317,1602],{},[1119,3319,3321],{"class":1121,"line":3320},59,[1119,3322,3323],{},"        intake = new Intake(intakeName);\n",[1119,3325,3327],{"class":1121,"line":3326},60,[1119,3328,1612],{},[1119,3330,3332],{"class":1121,"line":3331},61,[1119,3333,1144],{"emptyLinePlaceholder":1143},[1119,3335,3337],{"class":1121,"line":3336},62,[1119,3338,3339],{},"    public Intake getIntake() { return intake; }\n",[1119,3341,3343],{"class":1121,"line":3342},63,[1119,3344,1174],{},[1085,3346,3347,1243,3349,3351,3352,1781,3354,3356,3357,3359,3360,3362,3363,3365,3366,3368,3369,3371,3372,3374,3375,3377,3378,3381,3382,3385,3386,1447],{},[1088,3348,2244],{},[1101,3350,1375],{}," is the is-a relationship, so ",[1101,3353,2715],{},[1101,3355,2719],{}," come for free and\n",[1101,3358,1790],{}," can call them on an ",[1101,3361,1232],{},". The constructor passes the name up with ",[1101,3364,1239],{},"\n(Lesson 17.2 explains why). ",[1101,3367,1299],{}," is has-a: it holds an ",[1101,3370,1232],{}," in a field and builds it,\nand is ",[1269,3373,2711],{}," a subclass of anything. The cap lives in ",[1101,3376,2671],{},"; forgetting it is caught by the\n",[1101,3379,3380],{},"Top 9"," scenario, which expects ",[1101,3383,3384],{},"2"," pieces rather than ",[1101,3387,3388],{},"9",[1520,3390,1522],{},{"title":1115,"searchDepth":1128,"depth":1128,"links":3392},[3393,3394,3395],{"id":2185,"depth":1128,"text":2186},{"id":2282,"depth":1128,"text":2283},{"id":2636,"depth":1128,"text":2637},{"outlineRef":1533,"pairsWith":2172,"status":3397},"new — authored exercises (Multiple Choice + Micro-Parsons + Coding)",{"title":956,"description":1115},"AlhI34ZZ4-wPnz0e5SSO5Akm1DbA6b0506FmVGOje7Y",1792718166107]