Conditional modeling in neo4j

Dear Andrew, David:
I'm trying to do this model the way Andrew indicated, but I still need to learn the online tutorial to write user-defined stored procedures in neo4j.
I rewrite the case so that it could be read more clearly:

Students have test scores for 10 courses, the corresponding mark for each course are as follows:

rule1:
      if test.score between [ 90-100 ]   then    course.grade = A
       else if      [ 76 - 89 ]  -->  B
       else if      [ 60 - 75 ]  -->  C
       else if      [ 0   - 59 ]  -->  D

rule2:
       if a student get more than 6A and no D, then studentX.rating= "Outstanding"
         else if  4A+ and no D, --> "Good"
         else if no D, -->  "Passed"
         else   --> "Failed"

So those are the relevant rules, now a student named “Bob” has Scores like follows:

	Bob_test0.score = 90        #–>A
	Bob_test1.score = 91        #–>A
	Bob_test2.score = 92        #–>A
	Bob_test3.score = 93        #–>A
	Bob_test4.score = 94        #–>A
	Bob_test5.score = 95        #–>A
	Bob_test6.score = 96        #–>A
	Bob_test7.score = 87        #–>B
	Bob_test8.score = 78        #–>B
	Bob_test8.score = 69        #–>C

thus Bob get 7A, and no D, a query or stored procedure should get the result of :
Bob.rating = “Outstanding”

I don’t know if I can write and store some business rules (such as in the example above) in neo4j, specific data (such as Bob’s scores) is then processed according to rules through neo4j’s general stored procedures or query statements. And the rules are about classes. How to apply this rules to individuals of the class?
This user functional requirement is important and typical for many business scenarios and domains.
Thank you for providing professional guidance!