> CS 202 Computer Science II

CS 202 Computer Science II

Fall 2019


Note: Do not under any circumstances leave your home directory world and/or group accessible in such a manner that others can view your assignment work.

Skip to the latest assignments

  1. HW 1 - Linux and CS Systems Bootcamp

    Remember to read and consult the Linux and CS Systems Bootcamp for getting around Linux. In this assignment, you practice these skills (and this is HW1 for cs151 as well, and having you turn it in before them lets us make sure there are no problems).

    This first HW assignment also gets you used to using our handin system for turning in assignments.

    1. Login to your cs202 account, and run the following commands to check out HW 1:

      	    cd ~
      	    handin -C HW1
      Note that this will create a directory HW1 inside your homw directory, and will copy over empty files that you will then edit with answers to the following.

    2. Use the nano text editor to edit your ~/HW1/hello.txt file. Run the commands

      	    cd ~/HW1
      	    nano hello.txt
      Inside of hello.txt in nano fill out the information about yourself that the file asks for (name, major, intended graduate term, experience with programming if any).

    3. Use the hostname and uptime commands when you are logged in to one of the CS systems to see how many days the system has been up. Use the nano text editor to edit your ~/HW1/uptime.txt file and put the following information - (a) what hostname reported, (b) date and time you ran the commands, (c) how many days or hours the uptime command said the system has been up.

      	    cd ~/HW1
      	    hostname
      	    uptime
      	    nano uptime.txt

    4. Use Linux commands to browse to the directory where Jeff keeps his webpages and files for this course. Use the ls command to see how many files are in the directory and what the size is of the largest and smallest.

      	    cd ~jkinne/public_html/cs202-f2019
      	    ls -lh
      	    cd code
      	    ls -lh
      Edit your ~/HW1/courseDir.txt file and in the file give the following (a) How many files were in the ~jkinne/public_html/cs202-f2019 directory, (b) What is the size of the largest and smallest files in that directory, (c) How many files are in the code directory.
      	    cd ~/HW1
      	    nano courseDir.txt

    5. Use Linux commands to copy the file hello.c from Jeff's 202 directory into your HW1 directory

      	    cd ~jkinne/public_html/cs202-f2019
      	    cd code
      	    cp hello.c ~/HW1
      Note - originally with HW1, there was a hello.py in the checkout instead of hello.c You can copy either one and we will take it.

    Handing in - to handin your assignment, browse to the directory that contains your HW1 directory and use the handin command to turn in your files.

        cd ~
        handin HW1
    Note that you must do this before the due date; late submissions will not be accepted. Also, each time you run "handin HW1" your previous submission is removed, with the new one replacing it.

    Grading - each of the above is worth 1 point, and they are graded "all or nothing", either you have done it correctly or not. We are glad to check your work early, just ask us before/after class or during office hours.

    Due: 21-08-2019 (11:59pm Terre Haute time) / 5 pts

  2. QUIZ 2 - C keywords and data types

    The point of this HW assignment is to be familiar with what all of the C keywords and operators are for, and the basic data types.

    • Will cover everything in the C Programming Study Guide. You should be able to answer - what is an operator/keyword/punctuation for, what will be the result of code using these operator/keyword/punctuation.
    • List of keywords is appendix A2.4 in The C Programming Language.
    • Constants and string literals are appendix A2.5, A2.6.
    • Operators are all in appendix A7.
    • Data types and declarations are in appendix A8. Note that for gcc, the #bytes for the basic datatypes is - char 1, short 2, int 4, long 8, float 8, double 16.
    • Statements are in appendix A9.
    • Functions definitions/calls are in appendix A10.
    • Pre-processor is appendix A12.
    • A summary of all of that is in A13 - this contains a complete list of keywords and operators/punctuation.
    • Sample quiz - quiz2_sample.txt

    In class on August 27. 5-10 pts (TBD)

  3. HW3 - C programming bootcamp

    Complete all of the programs listed as "Basic programming" and "A Bit More Involved" on the C Programming Bootcamp. Note that you should create a hackerrank account and make sure your program is judged as correct by hackerrank. It is okay to look at the comments for the problems; don't search explicitly to try to find source code. You should check out the assignment with handin (HW3) so you are using the right file names, and will turn them in with handin as well.

    Grading - each program is 1 point, all or nothing. Make sure hackerrank grades it as correct.
    Note - if you have more than 10 correct, you get more than 10 points.
    Note - the first 8 should be "easy enough", then get 1 or 2 from the "a bit more involved" group.
    Note - late work will be accepted up to one week late. You will recieve 80% credit for late work that is correct.
    Note - for those who turned in more than 10 correct solutions, your grade was 10 + (total-10)/2, so the highest you could get was 12/10.
    Note - if hwcheck did not grade your program as correct, you did not get the points. If you think it's wrong let us know.

    Due: 26-Aug-2019 11:59pm, 10 pts

  4. HW4 - mattermost and such
    1. Go to judy.indstate.edu and create an account on the CS mattermost server (if you haven't already). For your account creation, use your @sycamores.indstate.edu email address, and use your name or portal id for your login name. Join the "ISU CS" team. Go to the "C Programming" channel and post a question or an answer. For one of the programs you are working on, post a question. If you can answer someone else's question, post an answer. I want to see at least 3 meaningful posts, and this will count as 3 HW points.
    2. Come to Jeff during office hours. You get 2 points for this. You need to come prepared to ask about one of the bootcamp problems or one of the examples from class.
    3. Come see Gage during office hours. You get 2 points for this. You need to come prepared to ask about one of the bootcamp problems or one of the examples from class.
    4. Join with another student as "homework friends" for this week. You should discuss some of the bootcamp problems with your homework friend. If your homework friend has solved any problems that you haven't, get some tips. Note - if you have full credit on HW3 (>= 10 points) you need to be HW friends with someone who does NOT have full credit.

    Note - you need to check out the HW4 assignment and complete the text files about what you have done for this assignment

    Grading notes - you did have to handin this assignment to get a grade. If you did not hand it in you were given a 0. If you did hand it in, you can run handin -g HW4 to see what we took off for. If you think there was a mistake in what points were taken off get in touch with Jeff. Late work for this assignment has been turned on so you can do whatever you missed. We will grant 100% late credit through Tuesday Sept 10, and will regrade on Wednesday Sept 11.

    Due: 31-Aug-2019 11:59pm, 10 HW points

  5. HW5 - bit operations
    • Checkout the HW assignment in your cs202 account with
      	cd ~
      	handin -C HW5
    • There are 5 problems, and each will be worth 2 points. TBD whether they are graded all-or-nothing or not.
    • Demo of how the correct solutions should work - how to use handin, demo of correct programs
    • Model solutions posted to youtube

    Due: 06-Sep-2019 11:59pm, 10 HW points

  6. Quiz6

    In class 06-Sep-2019, 10 points

  7. HW7 - RPN with linked list
    • Check out using handin, follow instructions in the file
    • Model solutions posted to youtube

    Due 18-Sep-2019, 10 points

  8. HW8 - Contest1
    • Programming assessment problems. Maybe a bit more involved than the programming assessment problems that you'll have on paper.
    • These may be released to the rest of the CS students as well as part of a programming contest.

    Grading - all or nothing, like the programming assessment.

    Due 07-Oct-2019 / 10 HW points

  9. HW9 - acm_contest
    • Complete at least 3 problems, each being 3 points. Problems that are easier - lab monitors, friday 13, desks, counting friends?, interesting numbers. The rest of the problems need the right idea to be able to solve.

    Grading... For each problem - full credit for correct and fast enough solution, half credit for correct but too slow solution. Full credit for the whole assignment could be 2 and 2 halves. 3 and 2 halves would be 4/3 (that would go in as 12 out of 9).

    Due ??-Nov-2019, 9 points

  10. HW42 - BST
    • Checkout with handin and see instructions.
    • Code check when you are done with each of the numbered steps in the README file.

    Due Nov 15, 50 points?

  11. HW11 - the common good or game
    • Something designed to help people or the community
  12. HW12 - 202games
    • Follow the directions in the assignment description
    • Games that are claimed: cs20213 black jack, cs20211 alphabet-attack, cs20207 street-fighter-knockoff, cs20203 frogger, cs20220 galaga, cs20209 tetris, cs20218 flappy-bird, cs20216 nethack-alike, cs20201 snake, cs20200 mario-alike, cs20208 battleship.
    • Note - you can work in pairs if you want to. If you do, then you do the basic framework / starting point together (take turns typing). Then you either continue doing it all together (pair programming!) or split up the work fairly and coordinate often.

    Grading - 13 style, 13 includes required elements (dynamic memory, structures or classes, loops/ifs), 14 correctness, 10 awesomeness.

    TURN IN BY PUSHING TO GITLAB TO YOUR BRANCH

    Due Dec 15 noon, 50 points

Note: course website layout/code/template from Steve Baker. Anything horrible is not his fault.