Code Monkey home page Code Monkey logo

tdt4250-2019's Introduction

tdt4250-2019

Repository for the assignments of the course TDT4250 at NTNU

Assignment 1

Structure

no.tdt4250.model

contains the source code and the model

  • src contains the generated source code
  • model contains the ECore model, the generator model and a dynamic instance

no.tdt4250.model.tests

contains the generated and the custom tests for the source code

Model

Model

Assignment 2

Get started

  • Install BndTools
  • Import all projects starting with no.tdt4250.conversion into the eclipse workspace

Structure

  • no.tdt4250.conversion.api: defines the API for all other components / projects
  • no.tdt4250.conversion.converter: contains the used converter for converting the values (TransientConverter, which can convert value transiently)
  • no.tdt4250.conversion.gogo: the service for commands for gogo console
  • no.tdt4250.conversion.servlet: the service to start a servlet for humand readble output of the conversion
  • no.tdt4250.conversion.temperature: contains basic temperature conversions
  • no.tdt4250.conversion.rest: the rest service for converting values

API

Start project no.tdt.4250.conversion.rest Make an http GET-request to localhost:8080 with parameters:

  • value (Double): the value that should be converted
  • from (String): the unit of value
  • to (String): the unit of the target converted value

For example: localhost:8080/convert?from=Fahrenheit&to=Kelvin&value=20 returns following:

{
    "success": true,
    "value": 20,
    "converted": 266.4833333333333,
    "unitFrom": {
        "name": "Fahrenheit",
        "symbol": "°F"
    },
    "unitTo": {
        "name": "Kelvin",
        "symbol": "K"
    }
}

Gogo Console

Commands:

  • list: lists all available direct conversions
  • add: add a new conversion e.g.: add "Centimeter(cm) = Inch(in) * 0.393 + 0"

Assignment 3

Model

I simplified the model to the relevant data for Assignment 3 Model

Transformation

The model is transformated to .html wih Acceleo M2T. The package no.tdt4250.model.html.main contains the transformation. The output for the instance no.tdt4250.model/model/programmes.xmi is here It was generated by the Acceleo Java Standalone.

Running the transformation

  • Install the Eclipse Acceleo Plugin
  • Run the generateHTML.mtl file as Acceleo Programm in no.tdt4250.model.html.main.
    • specify the the instance with no.tdt4250.model/model/programmes.xmi and your desired target directory

tdt4250-2019's People

Contributors

kegesch avatar

Watchers

 avatar  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.