- Open your command-line application and navigate to your workspace.
- Create a new folder named 09-01-defining-steps-with-template-functions.
- Copy or create an index.html file that loads and runs a main function from main.js.
- Create a main.js file that defines a new abstract class named Mission:
// main.js class Mission { constructor () { if (this.constructor === Mission) { throw new Error('Mission is an abstract class, must extend'); } } }
- Add a function named execute that calls three instance methods—determineDestination, determinPayload, and launch:
// main.js class Mission { execute () { this.determinDestination(); this.determinePayload(); this.launch(); } }
- Create a LunarRover class that extends the Mission class: ...