Multiple Language Problems

A user recently got in touch and mentioned that they were creating essentially the same problem in both Java and Python and wondered if there was an easier way.  That got us thinking. It seems silly to have to create separate problems when all that’s different is the language.

Looking into our code there’s really not any difference in a Java or Python problem if you’re using Simple Testing or Output Matching. The only real difference is what you set the language drop down to when you create the problem. So we’ve added a Multiple option to the language drop down.

Separate Starter Code

First thing to check is that, when multiple languages is selected, is that there are tabs over the starter code field. This way you can give your students starter code depending on what language they’re using.

Now you can give your students something to start with no matter which language they’re using.

Attached Files

If you’re attaching data or other files to submissions there’s an extra option there as well.

Between the visibility toggle and the trash can icon there’s now a drop down so that you can pick which languages go with which attached files. If you leave it at the default of All they’ll be there for any language. If you select either Java or Python your students will only see them when they’ve selected that language.

Student’s View

There’s a little addition to the Test button on multiple language problems.

The button changes from just Test to Test and the current language. Your students can change between languages by clicking on the down arrow on the right.

When you click test ClassCube will run your code the same way it always has.

Unit Testing

One snag. You won’t have the multiple languages option if you’re using a problem set to Unit Testing for grading.  Since you would be writing a separate unit test file, or set of files, for each language anyway it made more sense to keep this one separate.

What’s Next?

Currently a problem is either a set language or multiple languages. Our first tweak to allowing multiple languages is to allow you to select the language when you create an assignment.

Let’s say you’re teaching a Java course and a Python course and want to use the same problem in both. By allowing you to select the language at the assignment level you’ll be able to keep your Java students submitting Java and your Python students submitting Python.

The plan is to roll assignment language selection within the next few weeks.

And adding multi language problems was done as a precursor to adding support for more languages in ClassCube. Java and Python are great, but it’s not our place to limit how you use ClassCube in the classroom. By the beginning of the Fall semester we’re planning support for more languages. C++ and JavaScript are the first two on our list.

If you have another language you’d like to see added, or just want to +1 C++ or JS, please let us know.

Why ClassCube?

Are you spending too much time grading your students' source code?

ClassCube is an online tool for Computer Science teachers that allows you to create lab assignments for your students. They'll submit their code online and ClassCube will automatically grade it for you.

Teaching with ClassCube…

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>