Advanced C Programming

Spring 2021 ECE 264 :: Purdue University

⚠ This is a PAST SEMESTER (Spring 2021).
Due 4/6

JSON 3: retry + const

Overview

This is a special opportunity to fix any remaining issues you had in HW11 and HW12.

The requirements are the same as for HW11 and HW12, with one minor change: a_pos is now declared as char const** a_pos instead of char** a_pos. Also, you must submit as EC02 (i.e., not HW11 or HW12).

If you achieve ≥90% on EC02, you will receive extra credit equal to the total weights of HW11 and HW12—in addition to whatever credit you already received for HW11 and HW12. Testing will be the same as for HW11 and HW12; no additional test cases will be added. If your score on EC02 is <90%, then you will get no credit for EC02 and it will not affect your grade.

EC02 is optional. Extra credit counts toward the numerator—but not the denominator—in your final grade calculation. Submission and scoring will works like any other assignment.

Aim for 100% (not 90%). This is the time to finish the JSON assignments.

Getting started

This assignment has an updated json.h with one change: a_pos is declared as char const** a_pos instead of char** a_pos.

Use 264get to fetch the new json.h.

you@ecegrid-thin1 ~ $ 264get ec02
you@ecegrid-thin1 ~ $ cd ec02

Copy your HW12 code into your EC02 directory.

you@ecegrid-thin1 ~/ec02 $ cp --no-clobber ../hw12/* ./

The --no-clobber flag tells the cp command to not overwrite existing files in your EC02 directory. That ensures that the json.h you just fetched with 264get won't be overwritten by your old json.h from HW12. The short form of cp --no-clobber ▒▒▒ is cp -n ▒▒▒.

Update your Makefile so this will be submitted as EC02.

you@ecegrid-thin1 ~/ec02 $ vim Makefile

Submit

To submit EC02 from within your ec02 directory, type 264submit EC02 json.c json.h test_json.c expected.txt miniunit.h clog.h Makefile

⚠ Be sure to submit this as EC02, not HW12. That will likely require a change to your Makefile.

Pre-tester

The pre-tester for EC02 has been released and is ready to use.

Q&A

  1. How can I be sure I have ≥90%?

    Your target should be 100%. Don't settle for 90%! If your code passes all tests in the pretester with no errors/warnings and you have made a reasonable effort to follow the code quality standards, then you will get the credit for EC02.
  2. Will this hurt my grade if I don't turn it in?

    No. It is optional.
  3. Will this hurt my grade if I …?

    No.
  4. How will I know what will be tested?

    Scores for HW12 will be released by Thu 4/1/2021.
  5. Will any new tests be added?

    No. The tests will be the same as for HW11 and HW12.
  6. What if I get <90% on EC02?

    If you get <90% on EC02, then it will not affect your grade. There will be no partial credit for scores of <90% on EC02.
  7. What if I get <89.9999999% on EC02?

    89.9999999% < 90%.
  8. Why is the score cutoff so strict?

    This is an opportunity to “finish” the JSON sequence. We don't want someone who got 50% on HW11 and HW12 to turn in the same code again and end up with the equivalent of 100% for concepts and skills demonstrated in an assignment sequence they did not actually finish.
  9. Will this affect my score on HW11 or HW12?

    No.
  10. Is extra credit the same as bonus points or participation points?

    No. Those three things—extra credit, bonus points, and participation points—are separate. Each offers you a different way to recover in case of a stumble. Extra credit simply adds to the numerator in your homework scores calculation, but does not affect the denominator. Think of it like a make-up opportunity.
  11. If I get 95% on EC02, do I get 95% of the credit or 100% of the credit?

    You would get 95% of the credit.
  12. What if I submit EC02 late?

    The 90% requirement applies before any late penalties. If you submit EC02 after the deadline, but your score was ≥90% prior to adding late penalties, then you will get credit for EC02, minus those penalties. For example, if your submission is perfect (100%) but you submit 12 hours late, you will receive 70% of the possible credit for EC02.
  13. I got 100% on HW12. Should I resubmit the same code for EC02?

    Yes! Be sure to edit your Makefile to submit as EC02 and make the change to declare a_pos as char const** a_pos.
  14. Does that mean I could effectively get twice as much credit for the same work?

    Yes! Well, there is a small amount of additional work to change the declaration of a_pos and resubmit as EC02.
  15. I finished HW12 with 100% but forgot to submit again as EC02. Can I still get credit?

    No. You must submit within the timeframe for EC02 in order take advantage of this opportunity.
  16. Can I get credit for the bonuses twice?

    No.
  17. Can I submit the bonuses with EC02?

    No. However, we will accept the HW12 bonuses as HW12 any time until April 6, 2021.

    Submit bonuses as HW12. Submit EC02 as EC02.

Updates

Updates may be added here.

4/7/2021 Corrected cp command in setup instructions and added explanation of the -n/--no-clobber flag.