CSC160 (UG20) 01
    Lab 6: Arrays & Vectors II
    Skip To Content
    Dashboard
    • Login
    • Dashboard
    • Calendar
    • Inbox
    • Help
    Close
    • My Dashboard
    • CSC160 (UG20) 01
    • Assignments
    • Lab 6: Arrays & Vectors II
    SP 2021 (UNDG)
    • Home
    • Assignments
    • Modules
    • TC/WC Appt Scheduler
    • Collaborations
    • WSJ Context
    • EvaluationKIT Course
    • EvaluationKIT
    • Barnes & Noble Bookstore

    Lab 6: Arrays & Vectors II

    • Due Mar 23, 2021 by 4pm
    • Points 10
    • Submitting a file upload
    • File Types cpp
    • Available after Mar 23, 2021 at 2pm

    Overview

    In this lab, you'll practice using arrays and vectors to solve programming tasks.

    Learning outcomes

    By the end of this lab, you should be more comfortable...

    • interacting with 2D arrays
    • tracing function calls
    • creating complex Boolean expressions
    • implementing pseudo code
    • enums

    Exercises

    Download gridworld.cpp. This is a mostly implemented game in which a 2D world is represented as a grid of chars. The player, represented as the char 'A', can move up, down, left, or right on the grid, attempting to avoid enemies ('&'), pick up treasure ('$'), and reach the goal ('X'). Movement is shown by printing out the grid after every move. There are four TODOs spread out across three functions, which you should locate and complete in this order:

    • printWorld  (1 TODO)
    • getMove (2 TODOs)
    • updateWorld (1 TODO)

    Before you start, read through the code to see what global variables and constants there are, what functions there are, and how the functions connect (you don't need a deep understanding of functions at this point). Note that this does not use the zyBook convention of placing function definitions above main, but rather puts function declarations above main and function definitions below main.

    Implement each TODO incrementally: don't wait until you're totally done a TODO to compile and test; go for small wins to build confidence, ensure you're on the right track, and to focus your debugging.

    We'll go over each of TODO after 20 minutes.

    Submitting

    Upload your .cpp file with what you've accomplished at the end of lab to this assignment.. Your grade for the lab is based on effort, not whether you complete all of the assigned problems; you will get full credit as long as you work diligently during the 2-hour lab period.

    PA options

    Please see the syllabus and course schedule (both on the homepage) for more information about how many programming assignments you are required to pass, due dates, etc. Of note: you do not need to attempt every or even most PAs.

    • PA 6.1: Gridworld with random layout and points 
    • PA 6.2: Gridworld with moving enemies 
    • PA 6.3: Speed reader I 
    1616529600 03/23/2021 04:00pm
    Additional Comments:
    Rating max score to > pts

    Rubric

     
     
     
     
     
     
     
         
    Can't change a rubric once you've started using it.  
    Find a Rubric
    Find Rubric
    Title
    You've already rated students with this rubric. Any major changes could affect their assessment results.
    Title
    Criteria Ratings Pts
    Edit criterion description Delete criterion row
    This criterion is linked to a Learning Outcome Description of criterion
    threshold: 5 pts
    Edit rating Delete rating
    5 to >0 pts
    Full Marks
    blank
    Edit rating Delete rating
    0 to >0 pts
    No Marks
    blank_2
    This area will be used by the assessor to leave comments related to this criterion.
    pts
      / 5 pts
    --
    Additional Comments
    Total Points: 5 out of 5