CS 136 - Spring 2020 - Assignment 0

Due Date: Friday, May 22nd, 2020 at 9:00pm.



There are NO marks for assignment 0.  However, you will not receive marks for other assignments until this assignment has been 100% completed correctly.

IMPORTANT!

Before every assignment, make sure you read the preamble.

The preamble will be updated for each assignment.


BLACK QUESTION (moderate collaboration allowed)

Question 1: Microsoft Teams

We are using Microsoft Teams as the delivery medium for the course. Login into the CS 136 Microsoft Teams page to ensure that you have access.


GOLD QUESTION (no collaboration allowed)

Question 2: Setting your CS Password

The University of Waterloo uses a CAS (Central Authentication Service) to authenticate users. This is sometimes referred to as your WatIAM credentials. These are the credentials used to log into Quest for example. If you're interested in security, you can read more about it.

Some tools we use in CS 136 use your credentials (username/password) on the student.cs environment. For example, when you log into or reset Seashell. Technically, these are different than your CAS credentials and you can have a different password in this environment (for security reasons you really should use a different password in each environment). To choose a secure yet easy to remember passwords (passphrases actually), your can use diceware. More information about diceware can be found here.

It is also possible that you have not yet set your password for the student.cs environment (which can create problems). This question ensures that you can log in to the student.cs environment.

  1. Login to this website, to find the secret word.
  2. If you cannot log in, visit this website to set your password.
  3. Go into the A0 project in Seashell and click on q2 (you should see the file secret.txt already there).
  4. Modify the file secret.txt to contain the secret word
  5. Click on 'SUBMIT QUESTION' to submit secret.txt to Marmoset.

BLACK QUESTION (moderate collaboration allowed)

Question 3: Introduction to The Seashell Environment and Marmoset

In CS 136, we have developed an online environment called Seashell in which you can write, test and submit your assignments. To access it, go to this website.

Note: This uses the same environment used to test and evaluate your assignment submissions. We recommend that you use this environment to develop your programs for CS 136. Other environments may behave differently and we will not provide any support for other environments.

Please report any issues with Seashell immediately to seashell@cs.uwaterloo.ca.

Note: If you have taken CS 136 before or have launched seashell previously, you may have projects from previous terms. Before you start working on this assignment, you should archive your old seashell projects. To do this, click on the help button at the top right of the seashell home page and then click 'archive all projects' under Cluttered old projects?. If you are using seashell for the first time, this operation is harmless.

  1. Go into the A0 project in Seashell and click on q3 (you should see several files already there).
  2. Click on runme-racket.rkt and follow the instructions in that file (click 'SET AS ⧁ FILE", press the 'RUN ⧁' button, etc.).
  3. Click on runme-c.c and follow the same instructions.
  4. Modify your my-numbers.txt to insert your student number, Racket magic number and C magic number. NOTE: you don't have a secret number yet, so leave it as XXXXXXXX.
  5. Click on 'SUBMIT QUESTION' to submit my-numbers.txt to Marmoset.
    (ignore any "late" warnings: the deadline for this question is intentionally set early so you can see your results)
  6. Marmoset has two types of tests: Public and Secret tests.
    • Public tests are very basic and simple, and may not actually test your code. You can see your public tests in Seashell. After you submit from Seashell and Marmoset finishes testing your submission, your public test results will appear beside the submit button. Click there to view them in more detail.
    • Secret tests are more comprehensive and thoroughly test your code. Your assignment grade is primarily based on the secret tests. However, secret test results are not available until after the deadline has passed. To see your secret test results, you must log into the Marmoset submission system.
  7. Make sure you see that, in Seashell, the public test score is 1/1. This means that your assignment has passed a very basic and simple test. It does NOT mean that your code is correct or that it has passed the secret tests.
    Note: Often it takes Marmoset several minutes to test your file.  If it says "not tested yet", then be patient and refresh your browser after a few minutes.
  8. For this assignment ONLY, the results of your secret tests will be available immediately.
  9. Log into Marmoset to view your results. When you click on view beside q3, your secret number should be posted in the results of your secret test.
  10. Now you should know your secret number, so modify your my-numbers.txt file and resubmit your assignment.
  11. Finally, check on Marmoset that you have passed your secret test.

BLACK QUESTION (moderate collaboration allowed)

Question 4: I/O Testing in Seashell

In CS 136, you are going to be working with I/O (input and output) and Seashell has a testing framework for testing files with I/O.

  1. Go into the q4 project in Seashell.
  2. RUN the program. It expects you to enter input on the console. The console typically appears to the right of your code window. Try entering some numbers. Click on the console window and start typing.
  3. For each number you input, it should output another number.
  4. To stop inputting numbers, press ctrl+D to send the EOF signal or press the [EOF] button.
  5. Seashell has two 'modes' of running. When you click the [RUN ⧁] button, it expects input from the console. When you click on the [I/O TEST] button, it reads in input from input file(s).
  6. You should view the provided simple.in file, and then click on the [I/O TEST] button.
  7. Notice that the test fails! Seashell will run the program as though you had entered the contents of simple.in on the keyboard, and then verify that the program output matches the contents of the simple.expect file. Since the provided simple.expect file is empty, the output does not match and the test fails.
  8. Modify the simple.expect file so that it contains what you would expect the program to output for the given input in the simple.in file:
        12345678
        1337
        0
        4070
    
    NOTE: you must hit [ENTER / RETURN] after the last line.
  9. Click on the [I/O TEST] button again and ensure that your simple test passed.
  10. You can have more than one test. Create a new test called primes using the [Add Test...] button again.
  11. In primes.in, enter the first 5 prime numbers (starting with 2) each on its own line.
  12. Modify the corresponding primes.expect file so that it contains what you would expect the program to output for the primes.in input, and ensure that this test passes.
  13. Once both tests pass, submit your code to Marmoset.

BLACK QUESTION (moderate collaboration allowed)

Question 5: Retrieving feedback from MarkUs

In CS 136, you use Marmoset to submit your assignments. However, Marmoset does not have the ability to provide hand-marking feedback.

For questions that will be "hand-marked", we will be using the MarkUs system.

After an assignment deadline, we automatically submit your assignment to MarkUs.

For this assignment, we have submitted a "fake" assignment for you. Log into MarkUs to view that assignment.

Modify the file in q5 in Seashell to enter your Quest ID and your "Secret Code", and then submit your results to Marmoset.

NOTE: that unlike q3, for this question we are looking for your Quest ID, not your student number.


GOLD QUESTION (no collaboration allowed)

Question 6: Academic Integrity

In this part, you will be required to complete a questionnaire that demonstrates you understand the issues relating to Academic Integrity.

Follow the instructions on this page.

When completed, submit your completed file to Marmoset.


GOLD QUESTION (no collaboration allowed)

Question 7: Piazza

  1. Login to Piazza, and find the post with the secret word.
  2. Go into the A0 project in Seashell and click on q7 (you should see the file secret.txt already there).
  3. Modify the file secret.txt to contain the secret word.
  4. Click on 'SUBMIT QUESTION' to submit secret.txt to Marmoset.
NOTE: this is a different secret word than in q2. Ensure you do not get them mixed up.

GOLD QUESTION (no collaboration allowed)

Question 8: Completing an Integrity Statement

For most of the questions in this course, you will be required to complete an integrity statement

If you do not complete the statement, your assignment will not be graded

  1. Go into the A0 project in Seashell and click on q8.
  2. Complete the integrity statement in the hello.rkt file.
  3. When you [RUN] your program, it should just display "hello".
  4. Click on 'SUBMIT QUESTION' to submit hello.rkt to Marmoset.