Giter VIP home page Giter VIP logo

jmcqg's Introduction

jmcqg โ€” Java multiple choice question generator

jmcqg is a generator for Java multiple choice questions, originally developed for summative tests of basic concepts' knowledge. Questions consist of some code and multiple choice answers regarding the value returned from a static method. It offers the following facilities.

  • Questions are easily created and auto-discovered in a package devoted to them. This allows their easy crowd-sourcing.
  • Multiple versions of each question can be generated, based on randomization.
  • The generator compiles and runs the code of each question, verifying the provided answer against it.
  • The output can be plain text or in the GIFT file format, which is easily importable into Moodle.
  • Potential for answering the questions through generative AI, such as ChatGPT, or by outsourcing the code understanding to a compiler, is minimized by creating the code as images, and exporting the result in the GIFT with medias format. For this to work, a tight deadline must be given for answering the questions so that OCR becomes impractical.

Suggestions for developing questions

If you are an academic teaching a Java course, drop me a note from your academic account with a pointer to the course page and your GitHub id, in order to give you access to the 35 questions we developed.

You can contribute questions by adding a new class to the questions directory. Use the Variables class as a model. Each question should test only one learning object and should be easily answered with pen and paper: much faster than copy-pasting the code to try it out on an IDE or asking ChatGPT. Keep the code readable and simple; do not obfuscate it and do not rely on edge cases or gotchas. Answers should not rely on knowing APIs in depth, but understanding basic principles. Each time the question is generated it should provide randomly different answers and ensure that the answers are guaranteed to be distinct.

Compile

mvn compile

Test

mvn test

Run tests multiple times by specifying the corresponding property, e.g.

mvn test -Dtest_repetitions=10

Run

mvn exec:java

Package for stand-alone execution

mvn package

Run stand-alone package

java -jar target/jmcqg-1.0-SNAPSHOT-jar-with-dependencies.jar

Command-line options

Get help on command invocation.

java -jar target/jmcqg-1.0-SNAPSHOT-jar-with-dependencies.jar -h

Specify to output a single question with the -q option, number of repetitions with -n, and the testing of generated questions with -t.

mvn package
java -jar target/jmcqg-1.0-SNAPSHOT-jar-with-dependencies.jar -q ConcatenatingStrings -n 10 -t

Generate and test 15 versions of each question in a ZIP with the code embedded as PNG images.

java -jar target/jmcqg-1.0-SNAPSHOT-jar-with-dependencies.jar -p questions2.zip -n 14 -t

jmcqg's People

Contributors

dspinellis avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.