Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Primary/lesson05 Quiz / User Reviews #221

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
192 changes: 192 additions & 0 deletions lesson_02/quiz/cdbluejr/lesson2.ts
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have a bunch of other files that should not be in this pull request. I should only see lesson_05 files here.

Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
import {
AnswerChoice,
MultipleChoiceQuizQuestion,
QuizPrinter,
QuizQuestion,
} from "codedifferently-instructional";

export class Lesson2 {
run(): void {
const quizQuestions = Lesson2.makeQuizQuestions();
if (!quizQuestions) throw new Error("Quiz questions cannot be null");
const printer = new QuizPrinter();
printer.printQuiz(quizQuestions);
}

static makeQuizQuestions(): QuizQuestion[] {
return [
Lesson2.makeQuestion0(),
Lesson2.makeQuestion1(),
Lesson2.makeQuestion2(),
Lesson2.makeQuestion3(),
Lesson2.makeQuestion4(),
Lesson2.makeQuestion5(),
Lesson2.makeQuestion6(),
Lesson2.makeQuestion7(),
Lesson2.makeQuestion8(),
Lesson2.makeQuestion9(),
Lesson2.makeQuestion10(),
];
}

private static makeQuestion0(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
0,
"What is the main purpose of version control?",
new Map([
[AnswerChoice.A, "To make backups of files"],
[AnswerChoice.B, "To keep a record of changes over time"],
[AnswerChoice.C, "To delete unnecessary files"],
[AnswerChoice.D, "To run code more efficiently"],
]),
AnswerChoice.B, // Replace `UNANSWERED` with the correct answer.
);
}

private static makeQuestion1(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
1,
"What is a fork in Git?",
new Map([
[
AnswerChoice.A,
"A duplicate copy of a repository that you own and modify",
],
[AnswerChoice.B, "A temporary backup of the code"],
[AnswerChoice.C, "A tool for merging branches"],
[AnswerChoice.D, "A way to delete a repository"],
]),
AnswerChoice.A, // Replace `UNANSWERED` with the correct answer.
);
}

private static makeQuestion2(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
2,
"Which of the following is NOT part of the basic Git workflow?",
new Map([
[AnswerChoice.A, "Pull the latest changes"],
[AnswerChoice.B, "Commit changes locally"],
[AnswerChoice.C, "Push changes to the server"],
[AnswerChoice.D, "Write code directly in GitHub"],
]),
AnswerChoice.D, // Replace `UNANSWERED` with the correct answer.
);
}

private static makeQuestion3(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
3,
"What command is used to combine changes from different branches?",
new Map([
[AnswerChoice.A, "git commit"],
[AnswerChoice.B, "git merge"],
[AnswerChoice.C, "git branch"],
[AnswerChoice.D, "git pull"],
]),
AnswerChoice.B, // Replace `UNANSWERED` with the correct answer.
);
}

private static makeQuestion4(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
4,
"Which IDE is being used in the class?",
new Map([
[AnswerChoice.A, "Eclipse"],
[AnswerChoice.B, "IntelliJ IDEA"],
[AnswerChoice.C, "NetBeans"],
[AnswerChoice.D, "VS Code"],
]),
AnswerChoice.D, // Replace `UNANSWERED` with the correct answer.
);
}

private static makeQuestion5(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
5,
"What feature allows developers to work from the same pre-configured environment in VS Code?",
new Map([
[AnswerChoice.A, "Extensions"],
[AnswerChoice.B, "Debugger"],
[AnswerChoice.C, "Dev Containers"],
[AnswerChoice.D, "Source Control"],
]),
AnswerChoice.C, // Replace `UNANSWERED` with the correct answer.
);
}

private static makeQuestion6(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
6,
"What is NOT a reason for using an IDE?",
new Map([
[AnswerChoice.A, "Editing and refactoring code"],
[AnswerChoice.B, "Browsing code"],
[AnswerChoice.C, "Playing music"],
[AnswerChoice.D, "Managing source control"],
]),
AnswerChoice.C, // Replace `UNANSWERED` with the correct answer.
);
}

private static makeQuestion7(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
7,
"What is the command to list files in the current directory?",
new Map([
[AnswerChoice.A, "pwd"],
[AnswerChoice.B, "ls"],
[AnswerChoice.C, "cd"],
[AnswerChoice.D, "mkdir"],
]),
AnswerChoice.B, // Replace `UNANSWERED` with the correct answer.
);
}

private static makeQuestion8(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
8,
"Which command is used to change directories in the terminal?",
new Map([
[AnswerChoice.A, "pwd"],
[AnswerChoice.B, "ls"],
[AnswerChoice.C, "cd"],
[AnswerChoice.D, "mkdir"],
]),
AnswerChoice.C, // Replace `UNANSWERED` with the correct answer.
);
}

private static makeQuestion9(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
9,
"What does the command `chmod` do?",
new Map([
[AnswerChoice.A, "Change file or directory permissions"],
[AnswerChoice.B, "List files in a directory"],
[AnswerChoice.C, "Remove a file or directory"],
[AnswerChoice.D, "Copy a file or directory"],
]),
AnswerChoice.A, // Replace `UNANSWERED` with the correct answer.
);
}

private static makeQuestion10(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
10,
"What is the shortcut for getting to the Mac terminal?",
new Map([
[AnswerChoice.A, "⌘ + Shift + T"],
[AnswerChoice.B, '⌘ + Spacebar, then type "terminal"'],
[AnswerChoice.C, "⌘ + Q"],
[AnswerChoice.D, '⌘ + S, then type "terminal"'],
]),
AnswerChoice.B, // Replace `UNANSWERED` with the correct answer.
);
}
}

if (!process.env.JEST_WORKER_ID) {
new Lesson2().run();
}
22 changes: 11 additions & 11 deletions lesson_02/quiz/src/lesson2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class Lesson2 {
[AnswerChoice.C, "To delete unnecessary files"],
[AnswerChoice.D, "To run code more efficiently"],
]),
AnswerChoice.UNANSWERED, // Replace `UNANSWERED` with the correct answer.
AnswerChoice.B, // Replace `UNANSWERED` with the correct answer.
);
}

Expand All @@ -56,7 +56,7 @@ export class Lesson2 {
[AnswerChoice.C, "A tool for merging branches"],
[AnswerChoice.D, "A way to delete a repository"],
]),
AnswerChoice.UNANSWERED, // Replace `UNANSWERED` with the correct answer.
AnswerChoice.A, // Replace `UNANSWERED` with the correct answer.
);
}

Expand All @@ -70,7 +70,7 @@ export class Lesson2 {
[AnswerChoice.C, "Push changes to the server"],
[AnswerChoice.D, "Write code directly in GitHub"],
]),
AnswerChoice.UNANSWERED, // Replace `UNANSWERED` with the correct answer.
AnswerChoice.D, // Replace `UNANSWERED` with the correct answer.
);
}

Expand All @@ -84,7 +84,7 @@ export class Lesson2 {
[AnswerChoice.C, "git branch"],
[AnswerChoice.D, "git pull"],
]),
AnswerChoice.UNANSWERED, // Replace `UNANSWERED` with the correct answer.
AnswerChoice.B, // Replace `UNANSWERED` with the correct answer.
);
}

Expand All @@ -98,7 +98,7 @@ export class Lesson2 {
[AnswerChoice.C, "NetBeans"],
[AnswerChoice.D, "VS Code"],
]),
AnswerChoice.UNANSWERED, // Replace `UNANSWERED` with the correct answer.
AnswerChoice.D, // Replace `UNANSWERED` with the correct answer.
);
}

Expand All @@ -112,7 +112,7 @@ export class Lesson2 {
[AnswerChoice.C, "Dev Containers"],
[AnswerChoice.D, "Source Control"],
]),
AnswerChoice.UNANSWERED, // Replace `UNANSWERED` with the correct answer.
AnswerChoice.C, // Replace `UNANSWERED` with the correct answer.
);
}

Expand All @@ -126,7 +126,7 @@ export class Lesson2 {
[AnswerChoice.C, "Playing music"],
[AnswerChoice.D, "Managing source control"],
]),
AnswerChoice.UNANSWERED, // Replace `UNANSWERED` with the correct answer.
AnswerChoice.C, // Replace `UNANSWERED` with the correct answer.
);
}

Expand All @@ -140,7 +140,7 @@ export class Lesson2 {
[AnswerChoice.C, "cd"],
[AnswerChoice.D, "mkdir"],
]),
AnswerChoice.UNANSWERED, // Replace `UNANSWERED` with the correct answer.
AnswerChoice.B, // Replace `UNANSWERED` with the correct answer.
);
}

Expand All @@ -154,7 +154,7 @@ export class Lesson2 {
[AnswerChoice.C, "cd"],
[AnswerChoice.D, "mkdir"],
]),
AnswerChoice.UNANSWERED, // Replace `UNANSWERED` with the correct answer.
AnswerChoice.C, // Replace `UNANSWERED` with the correct answer.
);
}

Expand All @@ -168,7 +168,7 @@ export class Lesson2 {
[AnswerChoice.C, "Remove a file or directory"],
[AnswerChoice.D, "Copy a file or directory"],
]),
AnswerChoice.UNANSWERED, // Replace `UNANSWERED` with the correct answer.
AnswerChoice.A, // Replace `UNANSWERED` with the correct answer.
);
}

Expand All @@ -182,7 +182,7 @@ export class Lesson2 {
[AnswerChoice.C, "⌘ + Q"],
[AnswerChoice.D, '⌘ + S, then type "terminal"'],
]),
AnswerChoice.UNANSWERED, // Replace `UNANSWERED` with the correct answer.
AnswerChoice.B, // Replace `UNANSWERED` with the correct answer.
);
}
}
Expand Down
24 changes: 24 additions & 0 deletions lesson_05/cdbluejr/User_Stories.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please read the article in the homework assignment that describes the purpose and structure of user stories. These are not it.

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
1.

Future - Star Trek era

I am calling an issue with your teleporter, the new updater. We were transporting two people and when they reimaged on the ship they exchanged from the hips down. How do we exactly fix them? And get an update to fix this issue?

2.

Present

Customer: I am checking on my order it hasn't shipped yet (now 2 weeks after order).
Company: Oh we don't ship them out for 20 business days after receiving the order.
Customer: (drops phone).
Company: Any else I can help you with?

3.

Past

Revolutionany War

British: They are hiding behind things, they aren't supposed to that.
Americans: We got the new update for the war.
Company: Try updating your technique.
Loading