Pathway W1000s Exercises

From Coder Merlin
Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder

W1001 The Wiki[edit]

W1002 The Client, the Server, and the Shell[edit]


W1003 Help Me![edit]

W1004 Emacs[edit]


W1005 Digital Journal[edit]


W1006 Source Control[edit]


W1007 GitHub[edit]

  • Push all of the journals in the Journals directory to GitHub and be sure to continue to push all new/modified journals as well. Note that this applies to essays and excursions as well.
  • Journals and essays should be stored in your "Journals" directory and pushed to your "Journals" repository.
  • Exercises and excursions should be stored in your "Experiences" directory and pushed to your "Experiences" repository.
  • Your final version of any exercise must be tagged as <ExerciseName>.Final. For example, for J1006, the file will be named J1006.txt (because it is a text file) and the final version should be tagged J1006.Final

W1008 Merlin Mission Manager[edit]


W1011 Number Systems[edit]


W1012 Alternative Base Addition[edit]


W1013 Boolean Algebra[edit]


W1014 Logic Gates[edit]


W1015 Bitwise Operations[edit]


W1016 Logic Composition[edit]

  • For ALL of these exercises, you may use ONLY:
    • Wires
    • Logic Inputs
    • Logic Outputs
    • Two-input NAND Gates
  • Construct your work using Falstad's Editor
  • All circuits must be on a single page
  • Label the page (using Text) with:
    • Your name
    • The date
  • Begin each circuit with a Blank Circuit
  • Label each circuit diagram (using Text) with:
    • The name of the logic gate (e.g. "NOT")
  • Save the document using the Save As... option from the File submenu and then click on the link presented
  • The file contains your work for the exercise. Create a new subdirectory, J1016, in your Journals directory. Upload the file to the J1016 directory via SFTP. Be sure to push the file to your GitHub repository.

  1. Construct a NOT gate
  2. Construct an AND gate
  3. Construct an OR gate
  4. Construct an XOR gate
  5. Construct a NOR gate


  • For ALL of these exercises, you may use ONLY:
    • Single-pole, single-throw switches (one or more)
    • Single-pole, double-throw relays (one or more)
    • A power supply
    • A lamp for output
    • Wire
  • Each switch must control exactly one relay and each relay must be an integral part of the functioning circuit
  • Construct your work using Falstad's Editor
  • Begin each exercises with a Blank Circuit
  • Label each circuit diagram (using Text) with:
    • Your name
    • The date
    • The name of the logic gate (e.g. "NOT")
  • Export each circuit using the File | Export As Text... option from the menu bar
  • The text contains all of your work for the exercise. Select the entire text, copy it, and paste it into your journal using the correct exercise number.

  1. Construct a NOT gate
  2. Construct an OR gate
  3. Construct an AND gate
  4. Construct an XOR gate


  1. Construct a NAND gate
  2. Construct a NOR gate

W1017 Binary Adders[edit]


W1018 SR Latch[edit]


W1021 Computer History[edit]


W1022 Computer Architecture[edit]


W1037 Expressions[edit]


W1039 Conversions[edit]


W1040 Printing and String Interpolation[edit]


W1089 Hello World[edit]


W1091 Algorithm Basics[edit]


W1151 Conditional and Flow Chart[edit]


W1152 While Loop[edit]


W1153 Repeat-While Loop[edit]


W1154 For Loop[edit]


W1165 Karel Introduction[edit]


W1171 Largest Number of Three[edit]


W1172 Greatest Common Divisor[edit]


W1173 Finding Primes[edit]


W1205 Function Introduction[edit]


W1292 Useful Randomness[edit]


W1301 Arrays[edit]


W1161 Basic Input[edit]

  1.  J1161  Create a journal and answer all questions in this experience. Be sure to include all sections of the journal, properly formatted.
  2.  M1161-10  Complete  Merlin Mission Manager  Mission M1161-10

W1351 Swap Function[edit]


W1352 Bubble Sort[edit]


W1501 Introduction to Objects[edit]


W1502 Object Attributes[edit]


W1503 Lines and Ellipses[edit]


W1504 First Steps on a Path[edit]


W1505 Images[edit]


W1511 Walking Turtles[edit]

  •  J1511  Create a journal and answer all questions. Be sure to include all sections of the journal, properly formatted.
  1. Draw a pentagon
  2. Draw an octagon
  3. Create a function to draw an n-gon (a polygon with n sides) where sides is a parameter to the function specifying the number of sides and length is a parameter to the function specifying the length of each side. Use your function to draw at least three n-gons, each with no fewer than eight sides. All n-gons should appear on the same canvas at the same time.
  4. Create another function that draws a house. The house must have at least two windows and one door. This should be drawn on another location on your canvas and be visible at the same time as the n-gons.
  5. Draw a "circle"

W1512 Colorful Turtles[edit]

  •  J1512  Create a journal and answer all questions. Be sure to include all sections of the journal, properly formatted. Upload an image of your graph paper drawing using an appropriate filename which includes "J1512" (such as J1512.png).
  1. Produce a new pattern by repeatedly drawing a polygon (of no fewer than five sides) of various sizes at various angles. Define your own color scheme and rotate through the colors.
  2. Before drawing your pattern, render to the canvas an aesthetic background using the drawing primitives that were covered in earlier projects (e.g. Ellipses, Rectangles, Images).

W1513 Patterns of Patterns[edit]

  • Produce all patterns specified above using graphic functions and the correct function name. (You may not use the Image class.)

W1521 Moving Along[edit]

  • Alter the Background so that the screen is cleared during each render cycle. Then click on the canvas again and demonstrate that the ball appears to move as the mouse is clicked.
  • Alter the Background so that the top half of the screen appears to be a sky of blue and the bottom half appears to be grass of green
  • Add at least three additional outdoor shapes to the Background using at least three additional colors. This is your creation, so feel free to use your imagination rather than going for the straight-forward sun, clouds, and trees.
  • Alter the Ball so that rather than responding to onEntityMouseClick events, it responds to onMouseMove events. To do so, conform to protocol MouseMoveHandler, and register and unregister with the dispatcher (registerMouseMoveHandler, unregisterMouseMoveHandler). The signature for onMouseMove is:
    func onMouseMove(globalLocation: Point, movement: Point)

W1522 Ping Then Pong[edit]

  1. Complete the Ball.calculate(canvasSize:) to properly handle bounces along the y axis
  2. Implement a power bounce such that immediately after a collision with the canvas edge the ball accelerates to twice its original velocity then slows back to that original velocity over several frames
  3. Whenever a collision occurs, deform the ball (squish it) in the direction of the collision then restore it back to its original dimensions over several frames

W1523 Paddle Paddle[edit]

  1. Use print statements to investigate the arguments provided to the onKeyDown event handler
  2. Select sensible keys to be used to move the left paddle up and down and to move the right paddle up and down
  3. Implement the required code to actually move the paddles in accordance with your selected keypresses

W1524 Score![edit]

  1. Ensure that paddles can't be moved off (above or below) the screen
  2. Add hit detection to the Paddle class
  3. If a ball strikes a paddle it should be deflected
  4. Add a scoreboard which will track the score of the game, incrementing the opponents score by 1 each time the ball strikes the wall

W1525 Containment[edit]

  1. Refactor all hit detection to rely only upon Containment
  2. Animate at least five background objects, at least three of which must be different instances of the same class

W1527 Team Play[edit]

  • Refactor your application to enable team play, i.e. two people on different computers playing the same game at the same time. The background must remain independent for each session.

== W1528 Private Means Private

  • Refactor your application using appropriate access modifiers by producing a well-planned, well-defined, and well-implemented interface and hiding all other methods and properties.