Open your command-line application and navigate to your workspace.
Create a new folder named 09-02-assembling-instances-with-builders.
Create a main.js file that defines a new class named Mission, which that takes a name constructor argument and assigns it to an instance property. Also, create a describe method that prints out some details:
// main.js
class Mission {
constructor (name) {
this.name = name;
}
describe () {
console.log(` The ${this.name} mission will be launched by a ${this.rocket.name} rocket, and deliver a ${this.payload.name} to ${this.destination.name}.
`);
}
}
Create classes named Destination, Payload, and Rocket, which receive a name property as a constructor parameter and assign it to an instance property: