User Tools

Site Tools


viennastar_conversion_tools

Vienna*: Conversion Tools for Geometries, Meshes and Data Files

Description

There are many different file formats to store geometries, meshes and all kinds of related data. The goal of this project is to implement additional conversion tools for currently unsupported formats, to enhance existing tools by making them more potent (by covering the entire (or at least a wider) part of the file format specification), more robust (by implementing better error-handling) and more maintainable (by improving code quality and adding documentation). Another explicit goal is to collect and/or create test files to demonstrate the correct behavior of the tools.

Benefit for the Student

Constructive feedback via code reviews (online or in person) and exposure to best practices will allow the student to drastically increase his/her skills in software engineering in general, and in writing high quality C++ code in particular.

Benefit for the Project

Robust support of many different file formats significantly increases the appeal of the Vienna* infrastructure. Improved code quality and documentation ensures extensibility and maintainability in the future.

Requirements

strong general coding skills, at least moderate C++ experience, affinity to doing things right (instead of just getting them done)

Mentors

Andreas Morhammer

Puzzle

Write a program that reads a file (given as the first command line argument) that contains simple (+,-,*,/,(,)) arithmetic expressions, such as:

(3*(5+1))/2-3*17

Strings encountered within the file are to be treated as variables, e.g.:

probability*(3+value)

is an arithmetic expression with 2 variables called “probability” and “value”

Treat every line in the file as a new expression and prompt the user to input a value for each variable that is found (if any), then print the result to the console.

For example, an input file named expressions.txt containing two lines:

(3*(5+1))/4-3*17

probability*(3+value)

Should generate something like the following output:


$ yourprogram expressions.txt

result of line 1: -42

please define value for variable 'probability':

0.5

please define value for variable 'value':

2

result of line 2: 2.5


The goal is to make your code as robust and elegant as you can.

Feel free to use C++11 language features (the actual project will have to be implemented without the help of the C++11 standard, the Vienna* infrastructure offers many similar features however).

viennastar_conversion_tools.txt · Last modified: 2015/03/23 15:36 by viennastar