diff --git a/exercises/part1-2.ts b/exercises/part1-2.ts deleted file mode 100644 index 67314919..00000000 --- a/exercises/part1-2.ts +++ /dev/null @@ -1,16 +0,0 @@ -// URL for the instructions: -// https://education.launchcode.org/intro-to-professional-web-dev/chapters/typescript/exercises.html - -// Part 1: Add the 5 variables here - - - - - -// Code part 2 here: - - - - -// Code the output statement here (use a template literal): - diff --git a/exercises/part3.ts b/exercises/part3.ts deleted file mode 100644 index 7d8ceab1..00000000 --- a/exercises/part3.ts +++ /dev/null @@ -1,16 +0,0 @@ -// URL for the instructions: -// https://education.launchcode.org/intro-to-professional-web-dev/chapters/typescript/exercises.html - -let spacecraftName: string = "Determination"; -let speedMph: number = 17500; -let kilometersToMars: number = 225000000; -let kilometersToTheMoon: number = 384400; -let milesPerKilometer: number = 0.621; - -// Code the "getDaysToLocation" function here: - - - - - -// Call the function and print the outputs for the Mars trip and the moon trip: diff --git a/exercises/part4.ts b/exercises/part4.ts deleted file mode 100644 index bab6eb19..00000000 --- a/exercises/part4.ts +++ /dev/null @@ -1,25 +0,0 @@ -let kilometersToMars: number = 225000000; -let kilometersToTheMoon: number = 384400; - - -// The variables that are commented out will be moved into the Spacecraft class -// let spaceCraft: string = "Determination"; -// let speedMph: number = 17500; -// let milesPerKilometer: number = 0.621; - -// This function will also be moved into the Spacecraft class -// function getDaysToLocation(kilometersAway: number): number { -// let milesAway: number = kilometersAway * milesPerKilometer; -// let hours: number = milesAway / speedMph; -// return hours / 24; -// } - -// Define your Spacecraft class here: - - - -// Create an instance of the class here: - - -// Print two outputs - one for the trip to Mars and one for the trip to the moon. - diff --git a/exercises/part5.ts b/exercises/part5.ts deleted file mode 100644 index 71704214..00000000 --- a/exercises/part5.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Add your import statement here: - - -let kilometersToMars: number = 225000000; -let kilometersToTheMoon: number = 384400; - -class Spacecraft { - milesPerKilometer: number = 0.621; - name: string; - speedMph: number; - - constructor(name: string, speedMph: number) { - this.name = name; - this.speedMph = speedMph; - } - - getDaysToLocation(kilometersAway: number): number { - let milesAway: number = kilometersAway * this.milesPerKilometer; - let hours: number = milesAway / this.speedMph; - return hours / 24; - } - - // Add the printDaysToLocation function here. - -} - -// Paste in the code from step 6 here: diff --git a/exercises/parts1-5.ts b/exercises/parts1-5.ts new file mode 100644 index 00000000..96e73001 --- /dev/null +++ b/exercises/parts1-5.ts @@ -0,0 +1,46 @@ +// URL for the instructions: +// https://education.launchcode.org/intro-to-professional-web-dev/chapters/typescript/exercises.html + + +// Part 1: Add the 5 variables here. + + + +// Part 2: Declare and assign the 3 new variables here. + + + +// Code an output statement here (use a template literal): + + + +// Part 3: Code the "getDaysToLocation" function here: + + + +// Move your output statement from part 2 here. Update the template literal to call +// the function and print the outputs for a Mars trip and a moon trip. + + + + +// Part 4: Move the function and 3 variables into a class. +// Define your Spacecraft class here: + + + +// Create an instance of the class here: + + + +// Move your output statements from part 3 here. Update the template literals use the +// instance of the class. + + + +// Part 5: Add the required import statement BEFORE the part 1 concent. + + +// Add the printDaysToLocation function to the Spacecraft class. + +// Paste in the code from step 6 here: \ No newline at end of file