Skip to content

Commit db32d23

Browse files
committed
Continued work to condense the exercises into 1 ts file.
1 parent a5467a4 commit db32d23

File tree

8 files changed

+42
-189
lines changed

8 files changed

+42
-189
lines changed

exercises/SpaceLocation.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

exercises/SpaceLocation.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1 @@
11
// Paste in the provided code here:
2-
export class SpaceLocation {
3-
kilometersAway: number;
4-
name: string;
5-
6-
constructor(name: string, kilometersAway: number) {
7-
this.name = name;
8-
this.kilometersAway = kilometersAway;
9-
}
10-
}

exercises/part1-2.js

Lines changed: 0 additions & 40 deletions
This file was deleted.

exercises/part1-2.ts

Lines changed: 0 additions & 61 deletions
This file was deleted.

exercises/part3.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

exercises/part4.ts

Lines changed: 0 additions & 25 deletions
This file was deleted.

exercises/part5.ts

Lines changed: 0 additions & 27 deletions
This file was deleted.

exercises/parts1-5.ts

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// URL for the instructions:
2+
// https://education.launchcode.org/intro-to-professional-web-dev/chapters/typescript/exercises.html
3+
4+
5+
// Part 1: Add the 5 variables here
6+
7+
8+
9+
// Part 2:
10+
11+
12+
// Code the output statement here (use a template literal):
13+
14+
15+
16+
// Part 3:
17+
// Code the "getDaysToLocation" function here:
18+
19+
20+
// Call the function and print the outputs for the Mars trip and the moon trip:
21+
22+
23+
// Part 4:
24+
/* Move the variables spacecraftName, speedMph, and milesPerKilometer into the
25+
Spacecraft class. Also move your getDaysToLocation function into the Spacecraft
26+
class. */
27+
28+
// Define your Spacecraft class here:
29+
30+
31+
// Create an instance of the class here:
32+
33+
34+
35+
// Print two outputs - one for the trip to Mars and one for the trip to the moon.
36+
37+
// Part 5: Add the required import statement BEFORE the part 1 concent.
38+
39+
40+
// Add the printDaysToLocation function to the Spacecraft class.
41+
42+
// Paste in the code from step 6 here:

0 commit comments

Comments
 (0)