/CSEN-1082-Mini-Project-1

In this project, the aim is to produce a textual representation of the visual programwithout interpreting or running it.

Primary LanguageJavaScriptMIT LicenseMIT

Visual Programming, Spring term 2021

Mini Project 1“Source-to-Source Transformation”

Index


Preface

The aim of your first mini-project is to introduce you to the idea of source-to-source transformation. In that context, an original program is transformed to a different but equivalent program. The two programs could be written in the same or different programming languages.

In the first 3-mini projects, you will be transforming a Scratch program to an object-oriented (Java) program. In this mini project, the aim is to produce a textual representation of the visual program without interpreting or running it. Scratch is an environment introduced to teach programming concepts. The platform is a visual environment through which kids could build interactive stories and games. The motivation was the interest of children to join after-school computer centers (e.g. the Intel Computer Clubhouses).

You can download an offline version of Scratch. Scratch commands are automatically represented through JSON. Your task is to transform the JSON representation into a runnable Java file.

The Java program should be able to show the same output the user sees through scratch. You thus have to:

  • Parse the JSON file
  • Transform it to an equivalent Java program
  • Make sure the Java program has an equivalent UI interface

Requirements

  • OpenJDK/Oracle JDK 14+
  • Prefered text editor

Blocks

The blocks that you should handle in your transformation are

  • Motion Blocks
    • Move
    • Turn
    • Go to x, y
    • Change x, y by
    • Set x, y
  • Looks Blocks
    • Say
    • Say for
    • Think
    • Think for
  • Event Blocks
    • When green flag clicked
    • When Key pressed
  • Control Blocks
    • Forever
    • If Then
    • If Then Else
    • Wait
    • Wait Until
    • Repeat
    • Repeat Until

Submission Guidelines

  • You should upload
    • Source code
    • Read-Me
  • Uploads are done via Google Drive/ Dropbox
  • URL submission via MET Website

References


Literatur

  • John Maloney, Mitchel Resnick, Natalie Rusk, Brian Silverman, and Evelyn Eastmond. The scratch programming language and environment.TOCE, 10(4):16:1–16:15, 2010
  • Mitchel Resnick, Yasmin Kafai, John Maloney, Natalie Rusk, Leo Burd, and Brian Silverman. A networked, media-rich programming environment to enhance technological fluency at after-school centers in economically-disadvantaged communities. Technical report, 2003