3.3 Grade Book Assignment

Under Construction

This page is currently being built. Please check back soon.

A platypus
3.3 Grade Book Assignment — overview

Work through the user stories in order. Each story states the goal and acceptance criteria; its nested tasks retain the detailed implementation and verification steps.

1.Gather your resources
A Open the assignment resources
Set up the checkpoint
2.Copy your GradeBook 3.2 Assignment. Rename the folder and .sln to 3.3
A Verify the required change or observation

Check the result against this instruction: Copy your GradeBook 3.2 Assignment. Rename the folder and .sln to 3.3.

Read useful student and assignment descriptions
3.Review the feature design
A Identify the contracts and expected behavior

This focused design shows the members or flow relevant to this feature. Keep unchanged members from your preceding checkpoint; follow the tasks below for the order of intermediate edits.

Student and assignment descriptions. class Student { + ToString() : string {override} } class Assignment { + ToString() : string {override} } note right of Student Name: Samantha, Knowledge Level 87.8, Required Sessions: 4 end note note right of Assignment Name: Plan, Difficulty: 2.1, Points: 5 end note
Student and assignment descriptions
  • New
  • Changed
  • Removed
4.Add a ToString override method to the Student and Assignment classes
public override string ToString()
A Verify the required change or observation

Check the result against this instruction: Add a ToString override method to the Student and Assignment classes.

5.In the Student's ToString method, return a string that produces the following result
Snip - Student ToString; compare object identities, field values, and execution position with your debugger.
Snip - Student ToString
A Verify the required change or observation

Check the result against this instruction: In the Student's ToString method, return a string that produces the following result.

6.In the Assignment's ToString method, return a string that produces the following result
Snip - Assignment ToString; compare object identities, field values, and execution position with your debugger.
Snip - Assignment ToString
A Verify the required change or observation

Check the result against this instruction: In the Assignment's ToString method, return a string that produces the following result.

Receive a letter grade and encouragement
7.Review the feature design
A Identify the contracts and expected behavior

This focused design shows the members or flow relevant to this feature. Keep unchanged members from your preceding checkpoint; follow the tasks below for the order of intermediate edits.

Abstract grading and feedback contracts. abstract class Attempt { + Score : double {get; protected set} + {abstract} LetterGrade : string {get} + {abstract} EncouragementMessage : string {get} + {abstract} Grade(possiblePoints : double) : void } abstract class Assignment { + {abstract} CreateAttempt(studentName : string, date : string, accuracy : double) : Attempt } Attempt <|-- GradedAttempt Attempt <|-- CompleteIncompleteAttempt Assignment <|-- PlanAssignment Assignment <|-- MidtermAssignment Assignment <|-- FinalAssignment
Abstract grading and feedback contracts
  • New
  • Changed
  • Removed
Graded attempt letter selection. start if (Score >= 90?) then (yes) :grade = "A"; elseif (Score >= 80?) then (yes) :grade = "B"; elseif (Score >= 70?) then (yes) :grade = "C"; else (no) :grade = "F"; endif :Return grade; stop
Graded attempt letter selection
  • New
  • Changed
  • Removed
Letter grade rules
Attempt kind Condition Letter
Complete/incomplete Score > 0 S
Complete/incomplete Score <= 0 U
Graded Score >= 90 A
Graded 80 <= Score < 90 B
Graded 70 <= Score < 80 C
Graded Score < 70 F
Exact encouragement messages
Letter Message
A, B, or S Great work!
C Good work, keep practicing!
F or U Please correct your errors and resubmit for full credit.
Any unsupported letter Unsupported letter grade detected.
8.Modify the class structure based on the class diagram and text below
Review this feature’s design and requirements
A Make the Assignment class abstract, as well as it's CreateAttempt method
9.In the LetterGrade property in the CompleteIncompleteAttempt class, if the score is greater than 0 return the string "S" otherwise return "U"
A Verify the required change or observation

Check the result against this instruction: In the LetterGrade property in the CompleteIncompleteAttempt class, if the score is greater than 0 return the string "S" otherwise return "U"

10.In the LetterGrade property in the GradedAttempt class, return the proper letter grade based on the Score
Review this feature’s design and requirements
A Verify the required change or observation

Check the result against this instruction: In the LetterGrade property in the GradedAttempt class, return the proper letter grade based on the Score.

11.In the EncouragementMessage property in the CompleteIncompleteAttempt class, define a switch statement that switched on the LetterGrade property with cases for "S", "U" and default using this story’s design reference
Review this feature’s design and requirements
A Verify the required change or observation

Check the result against this instruction: In the EncouragementMessage property in the CompleteIncompleteAttempt class, define a switch statement that switched on the LetterGrade property with cases for "S", "U" and default using this story’s design reference.

12.In the EncouragementMessage property in the GradedAttempt class, define a switch statement that switched on the LetterGrade property with cases for "A", "B", "C", "F" and default using this story’s design reference
Review this feature’s design and requirements
A Verify the required change or observation

Check the result against this instruction: In the EncouragementMessage property in the GradedAttempt class, define a switch statement that switched on the LetterGrade property with cases for "A", "B", "C", "F" and default using this story’s design reference.

13.In the Student class, change the return of the TakeAssignment method from Attempt to string and return the attempt object's EncouragementMessage value instead of the attempt object
A Verify the required change or observation

Check the result against this instruction: In the Student class, change the return of the TakeAssignment method from Attempt to string and return the attempt object's EncouragementMessage value instead of the attempt object.

14.In the MainWindow, define a private field named attemptMessage of type string
A Verify the required change or observation

Check the result against this instruction: In the MainWindow, define a private field named attemptMessage of type string.

15.Assign the attemptMessage field to the returned value from TakeAssignment (5 total)
A Verify the required change or observation

Check the result against this instruction: Assign the attemptMessage field to the returned value from TakeAssignment (5 total).

16.Check Your Work (Blackboard)
A Set a breakpoint in the Student class in the TakeAssignment method on the line of code that returns the EncouragementMessage value
B Start the application. Click the 'New Blackboard' button. Click the 'Take midterm' button
C Press F11. Ensure the debugger steps into the GradedAttempt class's EncouragementMessage property
D Step through the property. Ensure that the debugger steps into the LetterGrade property and returns "B". Ensure that the EncouragementMessage property assigns the result variable to "Great work!"
E Press F11 to return to the MainWindow. Press F11 to step over the call to TakeAssignment. Ensure that the attemptMessage variable is assigned to "Great work!"
CYW - Midterm attemptMessage; compare object identities, field values, and execution position with your debugger.
CYW - Midterm attemptMessage
17.Check Your Work (Canvas):
A Set a breakpoint at the end of the writeFInalPaperButton_Click
B Start the applicaiton. Click the 'New Canvas' button. Click the Finish plan' button. Click the 'Write midterm essay' button. Click the 'Write final paper' button
C Ensure that your values match the values below

Please ignore the (string) Type property in the Assignment class. All other values are correct.

CYW - Canvas Assignment Values; compare object identities, field values, and execution position with your debugger.
CYW - Canvas Assignment Values
Submit your work
18.Ensure your code is StyleCop compliant
A Verify the required change or observation

Check the result against this instruction: Ensure your code is StyleCop compliant

19.Zip the solution and submit to the Feedback System
A Verify the required change or observation

Check the result against this instruction: Zip the solution and submit to the Feedback System.

20.Submit the Feedback System URL to the correct assignment in Canvas
A Verify the required change or observation

Check the result against this instruction: Submit the Feedback System URL to the correct assignment in Canvas.

Completion checklist
21.Review the required evidence
A Check every acceptance criterion

Return to each user story and confirm that you can demonstrate its acceptance criteria. Use the task checkboxes to track completion; a checked box is not a substitute for testing or inspecting the required evidence.

Read useful student and assignment descriptions Receive a letter grade and encouragement
B Build and inspect the final solution

Remove temporary lines used only to demonstrate compile-time errors. Build without errors or warnings, check StyleCop compliance, and rerun the required scenario paths.

C Follow this activity’s submission instructions

Use the submission or attendance instructions in this page. For a Feedback System submission, upload the requested ZIP, review and resolve the feedback, and submit the resulting URL to the matching Canvas activity. For a Canvas quiz, enter only the requested answers; for an oral final, complete the scheduling and attendance steps.