The goals of this assignment are to learn the following:

Computer Science Principles Curriculum

Common Core Standards


In the StudentGrades application you will practice storing values in arrays and continue practicing object-oriented programming. First create a Quorum class named Student under the 'New File' menu option. You will also need a new blank application with your main.quorum file. In this class you will store the name of the student, the max possible score the student can get, and an array of scores the student has received on assignments. For this project you will assume each student only has 5 scores, each worth 100 points. This means the max possible score is 500 points. In addition to these class variables you will need to define the following actions in the Student class:

use Libraries.Containers.Array
class Student 
    //define class variables here

    //sets the student name
    action SetName(text name)

    //get the student name
    action GetName returns text

    //set the scores for the student
    action SetScores(Array scores)

    //Returns the students overall grade in the class
    //An A is 90 to 100 percent, a B is 80 to 89 percent,
    //a C is 70 to 79 percent, a D is 60 to 69 percent, and
    //an F is anything lower than 60 percent
    action GetFinalGrade returns text
        return ""

    //a private action to help you calculate the total points
    //a student has (stored in the scores array).
    private action GetPointTotal returns number
        integer totalPoints = 0
        //your code here
        return totalPoints

    //a private action that gets the final percentage a student
    //has in the class (their total points/ max points possible).
    private action GetFinalPercentage returns number
        number value = 0
        return value

In main.quorum you will need to define two arrays: one to store Student objects and another to store grades, an integer. Once you have defined these arrays you can start to construct each student and their grades. Define two students with the names and grades listed below:


Once this information is stored you can loop through the Array of students and output some basic information. The program should produce output that does the following:

Sample Output

student jenny is at array index 0
jenny's grade is a A
student john is at array index 1
john's grade is a B

Design Criteria

Next Tutorial

In the next tutorial, we will discuss Challenge 5.1, which describes a session on creating an in-game map in Quorum.