Groupwork 4, Implement the converters for homework 4.
Short Description:
Implement the converters for homeworrk 4.
Goals
When you finish this homework, you should have:
- Created the converters necessary for homework 4.
- Built a test driver for these converters.
- Written a simple application that uses these converters.
Formal Description
- In any selected file configuration build the following functions
- int DecimalStringToInteger(string )
- string IntegerToDecimalString(int)
- int BooleanStringToInteger(string )
- string IntegerToBooleanString(int)
- int UnaryStringToInteger(string )
- string IntegerToUnaryString(int)
- int PositionlessStringToInteger(string )
- string IntegerToPositionlessString(int)
- int UrnfieldStringToInteger(string )
- string IntegerToUrnfieldString(int)
- int MayanStringToInteger(string )
- string IntegerToMayanString(int)
- Ya, the names are long, but they are descriptive.
- Implement any utility functions that you might need as well.
- Implement a test driver, ConvertersTest.cpp that tests all of these functions.
- Implement a program Rosetta.cpp
- This should ask the user for a file
- That file should contain a series of numbers in the form used by the calculator, one per line, no errors in the file.
- For each line in the file print
- The original number
- The number in decimal
- The number in all other formats.
- Except only print unary values less than 21.
- See below for full details.
- Provide a Makefile that will build your project.
Rosetta.cpp input file
Each line is just a number in the calculator format. Example:
.,0:maya
\\\\:murn
XX:posi
XXXXXXXXXXXXXXXXXXXX:unry
TFTFF:bool
20:deci
Rosetta.cpp output specification
The output should be in the following form:
- The original number echoed to the screen, newline
- The text "Integer: "
- The integer representation followed by a newline
- The text "Decimal: "
- The calculator decimal representation followed by a newline
- The text "Boolean: "
- The calculator boolean representation followed by a newline
- Only include the Unary output for values less that 21
- The text "Unary: "
- The calculator unary representation followed by a newline
- The text "Positionless: "
- The calculator positionless representation followed by a newline
- The text "Urnfield: "
- The calculator urnfield representation followed by a newline
- The text "Mayan: "
- The calculator mayan representation followed by a newline
- A blank line.
For the above input, the output should be
.,0:maya
20
Decimal: 20:deci
Boolean: TFTFF:bool
Unary: XXXXXXXXXXXXXXXXXXXX:unry
Positionless: XX:posi
Urnfield: \\\\:murn
Mayan: .,0:maya
\\\\:murn
20
Decimal: 20:deci
Boolean: TFTFF:bool
Unary: XXXXXXXXXXXXXXXXXXXX:unry
Positionless: XX:posi
Urnfield: \\\\:murn
Mayan: .,0:maya
XX:posi
...
Notes
- If I have reson to suspect that you are not contributing to the group project, I reserve the right to assign a lower grade after a proper investigation.
- The code must compile without warnings or errors using the following compiler flags:
-
-O3 -g -Wall -Wpedantic -Wextra -Werror
- This should include proper .h and .cpp files, included in the proper way.
Submission
- The group leader should submit a zip or tar file containing the group coding work.
- All members of the group, including the leader, should submit their own completed groupwork form.
Groups
Group Alpha | Devon, Adrian, Celeste |
Group 1 | Pralisha, Jordi, Jacob, Zandrew |
Group A | Gabriel, Junior, Hussein, Caden |
Group I | Maya, Bryan, Hayden, Connor |
Group First | Noah, Zach, Bianca, Chris |
Group Origin | Mason, Mari, Rafael |