

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Project; Class: Introduction to Computing Using MATLAB; Subject: Computer Science; University: Cornell University; Term: Fall 2008;
Typology: Study Guides, Projects, Research
1 / 3
This page cannot be seen from the preview
Don't miss anything!


The coded items below (e.g., c1e, s2a) indicate what a student’s solution should accomplish. Codes that begin with the letter ‘c’ deals with correctness; codes that begin with ‘s’ deals with style.
Grader: If a student’s solution does not accomplish task c1a, for example, then write the task code ‘c1a’ along with any diagnostic remarks you can give. Count the number of correctness and style errors separately.
Items marked with ** count as two errors. In the table below, the top row lists the possible scores (1 to 5). The next row lists the number of correctness errors corresponding to every score category. The style score is determined similarly. Enter the total score (maximum of 10) in CMS as the project score. If there are bonus questions, enter any bonus points separately in the “Bonus Bucket,” separate from the project score.
Student: Read the grading guide for every project, even if you get a perfect score! Notice from the table below that we often give one or two “freebies,” i.e., mistakes that don’t cost you any points. Learn from working on the project, and learn from any mistakes.
Score 0 1 2 3 4 5 #correctness errors 11+ 8 – 10 5 – 7 3 – 4 2 0 – 1 #style errors 9+ 7 – 8 5 – 6 3 – 4 2 0 – 1
(s0a) Use meaningful variable names
(s0b) Appropriate indentation
(s0c) Appropriate comment header in each script/function file
(s0d) Appropriate and concise comments throughout
(s0e) Reasonable line lengths; no horizontal scrolling
(s0f) [2* max] No superfluous code.
(s0g) [2* max] Reasonably efficient and concise code; a little inefficient is OK
(s0h) No debugging output.
(c0a) [2* max] Program successfully executes without crashing or infinite loop. (* for occasional, ** for persistent)
Suggested test case: (1) 0:00:00 (2) 23:59:59 (3) 9:15:00 (4) 8:45:
(c1a) Correctly asks for and retrieves user’s input.
(c1b) [2* max] Correctly calculates the positions and sizes of the fixed marks, including differenti- ating between the hour and the minute marks, and making the 3, 6, 9, 12 o’clock marks.
(c1c) [2* max] Correctly calculates the positions of the hour hand and the minute hand.
(c1d) Correctly uses the functions ‘DrawDisk’, ‘DrawStar’ or ‘DrawRect’.
(c1e) Correctly uses the ‘plot’ function.
(c1f) Correctly and clearly draws the clock, the hour hand, and the minute hand.
(c1g) Does not use arrays.
(s1a) Uses a loop to draw the marks.
(s1b) Draws the 3, 6, 9, 12 o’clock marks using a loop (if they are the same format).
(s1c) Code broken into appropriate sections clearly. Each section solves a subproblem.
Suggested test cases: (1) Inputs: a = 1, b = 1. Outputs: 1.414. (2) Inputs: a = 3, b = 4. Outputs: 5.000. (3) Inputs: a = 5, b = −4. Outputs: 6.403. (4) Inputs: a = − 3 , b = 4. Outputs: 5.000.
(c2a) Correctly asks for and retrieves user’s input.
(c2b) Correctly sets x 0 , y 0 and the error tolerance.
(c2c) [2* max] Correctly passes test cases (1) and (2).
(c2d) [2* max] Correctly passes boundary test cases (3) and (4).
(c2e) The loop ends, and no infinite loop!
(s2a) Displays the output neatly.
(s2b) The loop code is clear, not messed up.
(s2c) [2* max] Does not use BREAK.