→This assignment is due by Friday, July 15, 2022, 11:59 PM.←
→ As with all assignments, this must be an individual effort and cannot be pair programmed. Any debugging assistance must follow the course collaboration policy and be cited in the comment header block for the assignment.←
→ Do not forget to complete the following labs with this set: L4A,
L4B
←
· Instructions · Rubric ·Submission ·
Ogham is a written alphabet from the 4th - 6th century used to write the early Irish language. Transliteration is the process of mapping from one system of writing to another based on phonetic similarity. Some scholars believe the Latin alphabet, used in nearby Roman Britannia, was the inspiration for ogham. Our program will read in a file containing ogham text, perform transliteration into Latin, and then create an ogham search engine when given Latin text.
You are given some helper files for this task. Download the ogham_starter_pack.zip. These files contain:
OghamStrings.h / .cpp
:- string constants containing the Unicode strings of each ogham character
test_print_all_ogham_strings_transliterations()
- prints the mapping of Ogham/Latin charactersstring ogham_to_latin(string)
- when given an Ogham Unicode string, returns the corresponding Latin characterstring latin_to_ogham(string)
- when given a Latin character, returns the corresponding Ogham Unicode character
ogham.txt
: a UTF-8 encoded file containing several ogham strings
Unicode Strings
A Unicode character is a "wide" character of variable length. The ogham characters are 24 bits. A standard character is 8 bits. Therefore, we will represent the ogham Unicode characters each as a string of three characters. When you read in the text file into a string, you will need to process the string as a sequence of substrings, each of length three. This substring corresponds to a single ogham character.
The OghamText
class
Begin by creating a class to store a line of Ogham text. The class needs to contain the following data members and methods:
- Data Members
- A linked list of strings: each element in the list corresponds to a single ogham letter
- Methods
OghamText()
: creates the empty linked list~OghamText()
: destroys the linked liststring toOghamString()
: prints the full ogham text wrapped with the start and end ogham charactersstring toLatinString()
: prints the Latin transliteration for the ogham textvoid append(string)
: adds the string parameter to the linked listint length()
: length of the linked list which corresponds to the length of the ogham text as wellbool matchesLatin(string)
: returns true if the Latin string parameter is a substring of the Ogham transliteration, false if not found
Be sure to use const as appropriate for both functions and parameters.
The Ogham Search Engine
As with our prior assignments, allow the user to provide a filename from the command line. If no file was provided, then
prompt the user to enter a filename. Open the file and verify if it opened. If the file opened, then create a list of OghamText
objects. Each line of the file corresponds to a different text of ogham. Once the file has been read, provide the user with a menu
of six options:
Select an option:
1: Print all Ogham strings
2: Print all Latin strings
3: Print all transliterations
4: Search for Latin occurrences (any)
5: Search for Latin occurrences (all)
6: Quit
Each menu option is described below
1: Print all Ogham strings
Print each ogham text with its position in the file.
1: ᚛ᚃᚐᚔᚂᚈᚓ᚜
2: ᚛ᚈᚑ᚜
3: ᚛ᚔᚏᚓᚂᚐᚅᚇ᚜
4: ᚛ᚃᚐᚔᚂᚈᚓ ᚈᚑ ᚔᚏᚓᚂᚐᚅᚇ᚜
5: ᚛ᚉᚓᚐᚇ ᚋᚔᚂᚓ ᚃᚐᚔᚂᚈᚓ᚜
6: ᚛ᚄᚂᚐᚔᚅᚈᚓ᚜
7: ᚛ᚉᚏᚐᚔᚉ᚜
8: ᚛ᚌᚑ ᚅᚓᚔᚏᚔ ᚐᚅ ᚁᚑᚈᚆᚓᚏ ᚂᚓᚐᚈ᚜
9: ᚛ᚌᚑᚑᚇ ᚌᚑᚁ᚜
2: Print all Latin strings
Print each ogham transliteration with its position in the file.
1: VAILTE
2: TO
3: IRELAND
4: VAILTE TO IRELAND
5: CEAD MILE VAILTE
6: SLAINTE
7: CRAIC
8: GO NEIRI AN BOTHER LEAT
9: GOOD GOB
3: Print all transliterations
Print each ogham text and transliteration with its position in the file.
1: ᚛ᚃᚐᚔᚂᚈᚓ᚜ => VAILTE
2: ᚛ᚈᚑ᚜ => TO
3: ᚛ᚔᚏᚓᚂᚐᚅᚇ᚜ => IRELAND
4: ᚛ᚃᚐᚔᚂᚈᚓ ᚈᚑ ᚔᚏᚓᚂᚐᚅᚇ᚜ => VAILTE TO IRELAND
5: ᚛ᚉᚓᚐᚇ ᚋᚔᚂᚓ ᚃᚐᚔᚂᚈᚓ᚜ => CEAD MILE VAILTE
6: ᚛ᚄᚂᚐᚔᚅᚈᚓ᚜ => SLAINTE
7: ᚛ᚉᚏᚐᚔᚉ᚜ => CRAIC
8: ᚛ᚌᚑ ᚅᚓᚔᚏᚔ ᚐᚅ ᚁᚑᚈᚆᚓᚏ ᚂᚓᚐᚈ᚜ => GO NEIRI AN BOTHER LEAT
9: ᚛ᚌᚑᚑᚇ ᚌᚑᚁ᚜ => GOOD GOB
4: Search for Latin occurrences (any)
Allow the user to enter any set of search terms. The user will enter a space separated list of strings that will be used as the search criteria. If any of the search words are present in the Latin transliteration of the ogham text, then print the ogham and list position. If no ogham texts match, then print "No matches found."
> to an
2: ᚛ᚈᚑ᚜
3: ᚛ᚔᚏᚓᚂᚐᚅᚇ᚜
4: ᚛ᚃᚐᚔᚂᚈᚓ ᚈᚑ ᚔᚏᚓᚂᚐᚅᚇ᚜
8: ᚛ᚌᚑ ᚅᚓᚔᚏᚔ ᚐᚅ ᚁᚑᚈᚆᚓᚏ ᚂᚓᚐᚈ᚜
> nothing will match
No matches found
4: Search for Latin occurrences (all)
Allow the user to enter any set of search terms. The user will enter a space separated list of strings that will be used as the search criteria. If all of the search words are present in the Latin transliteration of the ogham text, then print the ogham and list position. If no ogham texts match, then print "No matches found."
> to an
4: ᚛ᚃᚐᚔᚂᚈᚓ ᚈᚑ ᚔᚏᚓᚂᚐᚅᚇ᚜
> nothing will match
No matches found
6: Quit
Quits the program.
Grading Rubric
Your submission will be graded according to the following rubric.
Points | Requirement Description |
7 | OghamText class created correctly. |
2 | Ogham strings stored in Linked List as appropriate. |
2 | File read correctly. |
9 | Menu items 1-3 function properly. (3 pts each) |
10 | Menu items 4-5 function properly. (5 pts each) |
3 | Private test file generates correct results. |
5 | The above items make up 33/38 points towards the assignment. The rest of the assignment grade is based on how well the best practices are followed:
|
10 | All labs completed and submitted L4A, L4B |
48 | Total Points |
→This assignment is due by Friday, July 15, 2022, 11:59 PM.←
→ As with all assignments, this must be an individual effort and cannot be pair programmed. Any debugging assistance must follow the course collaboration policy and be cited in the comment header block for the assignment.←
→ Do not forget to complete the following labs with this set: L4A,
L4B
←
Submission
Always, always, ALWAYS update the header comments at the top of your main.cpp file. And if you ever get stuck, remember that there is LOTS of help available.
It is critical that you follow these steps when submitting homework.
If you do not follow these instructions, your assignment will receive a major deduction. Why all the fuss? Because we have several hundred of these assignments to grade, and we use computer tools to automate as much of the process as possible. If you deviate from these instructions, our grading tools will not work.
Submission Instructions
Here are step-by-step instructions for submitting your homework properly:
-
Make sure you have the appropriate comment header block at the top of every source code file for this set. The header
block should include the following information at a minimum.
Be sure to fill in the appropriate information, including:/* CSCI 261: Assignment 4: A4 - Ogham Transliteration
* * Author: XXXX (INSERT_NAME) * Resources used (Office Hours, Tutoring, Other Students, etc & in what capacity): * // list here any outside assistance you used/received while following the * // CS@Mines Collaboration Policy and the Mines Academic Code of Honor * * XXXXXXXX (MORE_COMPLETE_DESCRIPTION_HERE) */- Assignment number
- Assignment title
- Your name
- If you received any type of assistance (office hours - whose, tutoring - when), then list where/what/who gave you the assistance and describe the assistance received
- A description of the assignment task and what the code in this file accomplishes.
Additionally, update theMakefile
for A4 to generate a target executable namedA4
.
- File and folder names are extremely important in this process.
Please double-check carefully, to ensure things are named correctly.
- The top-level folder of your project must be named
Set4
- Inside
Set4
, create 3 sub-folders that are required for this Set. The name of each sub-folder is defined in that Set (e.g.L4A
,L4B
, andA4
). - Copy your files into the subdirectories of
Set4
(steps 2-3), zip thisSet4
folder (steps 4-5), and then submit the zipped file (steps 6-11) to Canvas. - For example, when you zip/submit
Set4
, there will be 3 sub-folders calledL4A
,L4B
, andA4
inside theSet4
folder, and each of these sub-folders will have the associated files.
- The top-level folder of your project must be named
- Using Windows Explorer (not to be confused with Internet Explorer), find the files
named
main.cpp, Makefile, *.h, *.cpp
.
STOP: Are you really sure you are viewing the correct assignment's folder? - Now, for A4, right click on
main.cpp, Makefile, *.h, *.cpp
to copy the files. Then, return to theSet4/A4
folder and right click to paste the files. In other words, put a copy of your homework'smain.cpp, Makefile, *.h, *.cpp
source code into theSet4/A4
folder.
Follow the same steps for each lab to put a copy of each lab's deliverable into theSet4/L4
folders. Do this process forSet4/L4A
(Node.h, LinkedList.h, LinkedList.cpp
),Set4/L4B
(Node.hpp, LinkedList.hpp, main.cpp
).
STOP: Are you sure yourSet4
folder now has all your code to submit?
- Now, right-click on the
"Set4"
folder.- In the pop-up menu that opens, move the mouse
"Send to..."
and expand the sub-menu. - In the sub-menu that opens, select
"Compressed (zipped) folder"
.
STOP: Are you really sure you are zipping aSet4
folder with sub-folders that each contain amain.cpp
file in it?
- In the pop-up menu that opens, move the mouse
- After the previous step, you should now see a
"Set4.zip"
file.
- Now visit the Canvas page for this course
and click the
"Assignments"
button in the sidebar.
- Find Set4, click on it, find the
"Submit Assignment"
area, and then click the"Choose File"
button.
- Find the
"Set4.zip"
file created earlier and click the"Open"
button.
STOP: Are you really sure you are selecting the right homework assignment? Are you double-sure?
- WAIT! There's one more super-important step. Click on the blue
"Submit Assignment"
button to submit your homework.
- No, really, make sure you click the
"Submit Assignment"
button to actually submit your homework. Clicking the"Choose File"
button in the previous step kind of makes it feel like you're done, but you must click the Submit button as well! And you must allow the file time to upload before you turn off your computer!
- Canvas should say "Submitted!". Click "Submission Details" and you can download the zip file you just submitted. In other words, verify you submitted what you think you submitted!
In summary, you must zip the "Set4"
folder
and only the "Set4"
folder, this zip folder must have several sub-folders, you must name all these folders correctly, you must submit the correct zip file for this
homework, and you must click the "Submit Assignment"
button. Not doing these steps is like bringing your
homework to class but forgetting to hand it in. No concessions will be made for
incorrectly submitted work. If you incorrectly submit your homework, we will not be able to
give you full credit. And that makes us unhappy.
→This assignment is due by Friday, July 15, 2022, 11:59 PM.←
→ As with all assignments, this must be an individual effort and cannot be pair programmed. Any debugging assistance must follow the course collaboration policy and be cited in the comment header block for the assignment.←
→ Do not forget to complete the following labs with this set: L4A,
L4B
←