CSC 486: CodeWorkout Exercise Documentation – YAML Files

Overview:

This is how the documentations works out of YAML files for CodeWorkout. Before I start explaining, if you do not know what YAML is pleased the link below and if you do not know what CodeWorkout is please follow this link: What is CodeWorkout?

What is YAML?

Getting started:

Any way to first thing off with a bang let’s look at a YAML file:

An Example of a Multiple Choice Question

– external_id: cs1114-sp2016-hw02-q07
is_public: false
experience: 50
language_list: Java
style_list: multiple choice, single answer
tag_list: initialization, objects
current_version:
version: 1
creator: edwards@cs.vt.edu
prompts:
– multiple_choice_prompt:
position: 1
question: |
A special kind of method that is used to initialize a brand new
The object, when it is created, is called a:
allow_multiple: false
choices:
– answer: constructor
position: 1
value: 1
– answer: initializer
position: 2
value: 0
– answer: creator
position: 3
value: 0
– answer: builder
position: 4
value: 0

An Example of a Coding Question

– name: powLoop
external_id: powLoop
is_public: false
experience: 50
language_list: Java
style_list: code writing
tag_list: loops, logic, arithmetic
current_version:
version: 1
creator: edwards@cs.vt.edu
prompts:
– coding_prompt:
position: 1
question: |
Given two numbers, `n` and `x`, use a loop to compute the value
of `n` raised to the `x` power–that is, `n` multiplied by itself
`x` times. You may not use standard library functions from the
`Math` class in your answer.
class_name: Answer
method_name: powLoop
starter_code: |
public int powLoop(int n, int x)
{
___
}
wrapper_code: |
public class Answer
{
___

public static class Math {}
public static class java
{
public static class lang
{
public static class Math {}
}
}
}
tests: |
“1, 0”,1,example
“2, 4”,16,example
“3, 2”,9,example
“3, 0”,1
“0, 3”,0
“-2, 2”,4
“2, 7”,128
“10, 3”,1000
“5, 3”,125
“3, 4”,81,hidden

Starting from the top:

external_id:

A string use for the sole purpose of identifying a question this is the application.

is_public:

A string that defines if the user can see the excise in the gym.

experience:

An integer that is usually out of 100 pts based on difficulty level of the question. Only used in the gym.

language_list:

String(s) that represent tags of coding languages. For example: language_list: C++

style_list:

String(s) that that represent tags of a type of questions. For example language_list: multiple choice

tag_list:

String(s) that that represent tags of a type of question content. For example language_list: logic

current_version:

This is used to setlist version control that way we know what the current version of this assignment is.

version:

This tells what version number is this assignment.

creator:

This tells who the creator of the assignment is

prompts:

Tells the application, what to prompts that user. Example: multiple_choice_prompt

position:

Tells the location of this question for the use of multiple part questions.

question:

This is the question you have asked the user.

Multiple Choice Questions:

choices:

The field for setting up multiple choice questions. There two parts to choices, one being position and the other being a value.

position:

This is an integer for the location of the multiple choice answer. Integer counter starts at 1 and go from there.

value:

This is an integer from 0 to 1. 1 being correct and 0 being wrong.

Coding Questions:

class_name:

Answer is the only tag know

method_name:

The name of the method used by the user for the answer.

starter_code:

The starting code for the user that will be displayed in the code environment.

wrapper_code:

Code that needs to complete testing.

tests:

Tests results for the pursuit of check the answer.

 

Advertisements

One Reply to “CSC 486: CodeWorkout Exercise Documentation – YAML Files”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s