Find Jobs
Hire Freelancers

c++ File I/O Morse Code Converter

$30-50 USD

In Bearbeitung
Veröffentlicht vor fast 16 Jahren

$30-50 USD

Bezahlt bei Lieferung
**Program Action** 1. Your program will take 3 arguments at the command line. Syntax: program e|d filein fileout Arg 1. A single letter. Either a 'd' or an 'e'. Arg 2. The name of a file to be read in. Arg 3. The name of a file to be written to. 2. If the letter is a 'e' your program will read in filein and write out its content encoded in morse code format to fileout 3. If the letter is a 'd' your program will read in filein and decode the morse code it reads to english letters and write the result out to fileout. For example, assuming your program was compiled to morse, the following would demonstrate its use. sally% cat [login to view URL] sos the quick brown fox sally% morse e [login to view URL] [login to view URL] sally% cat [login to view URL] *** --- *** - **** * --*- **- ** -*-* -*- -*** *-* --- *-- -* **-* --- -**- sally% morse d [login to view URL] [login to view URL] sally% cat [login to view URL] sos the quick brown fox ## Deliverables You will also find the code implementations for bintree.h and binnode.h. You will need these files as well. **Program Action** 1. Your program will take 3 arguments at the command line. Syntax: program e|d filein fileout Arg 1. A single letter. Either a 'd' or an 'e'. Arg 2. The name of a file to be read in. Arg 3. The name of a file to be written to. 2. If the letter is a 'e' your program will read in filein and write out its content encoded in morse code format to fileout 3. If the letter is a 'd' your program will read in filein and decode the morse code it reads to english letters and write the result out to fileout. For example, assuming your program was compiled to morse, the following would demonstrate its use. sally% cat [login to view URL] sosa the quick brown fox sally% morse e [login to view URL] [login to view URL] sally% cat [login to view URL] *** --- *** - **** * --*- **- ** -*-* -*- -*** *-* --- *-- -* **-* --- -**- sally% morse d [login to view URL] [login to view URL] sally% cat [login to view URL] sos the quick brown fox *31251 Assignment 3 ??" Autumn 2008 Page* *2 of 6* **Details** The first thing your program must do is load in the file [login to view URL] and create two separate data structures. 1. An STL vector containing the english letters and associated morse codes in english letter order. You will use this vector when encoding the english to morse. You will use the find function from the <algorithm> library to find the code associated with a particular letter in the vector. 2. A bintree (using the code supplied) containing the english letters and associated morse code in morse code order. You can consider the morse code as a string which can be ordered using the overloaded relation operators. Make sure you rebalance the tree after storing the codes in it. You will use the tree to find the english letter associated with a particular morse code. While there are other data structures that would work, you must implement these data structures to store the letters and their codes. Do not use any other data structure to store the text . To simplify matters, you can assume that all files used to test your program will only contain lower case english letters or valid morse codes, spaces and new lines. The files will only contain letters or code but not both. However, your program will have to correctly handle spaces and new lines in the files. You will need to create a couple of structs to contain the lettercode and codeletter and place these in the data structures. While you would normally put this in separate files you will contain all your code in the one .cpp file to be submitted. Do not make any modifications to the bintree.h and binnode.h files. Restrictions: Use spaces instead of tabs for program indentation The program must use multiple functions No function can be greater than 60 lines No line can be greater then 80 characters *PLEASE NOTE* . It is a fundamental requirement of this assignment that you use the STL vector and bintree data structure to store the lettercode combinations, as outlined in the details section. Furthermore, the conversion must be done as you read and write to the files. Do not copy parts of the file to an array for the coding.
Projekt-ID: 3930620

Über das Projekt

25 Vorschläge
Remote Projekt
Aktiv vor 16 Jahren

Möchten Sie etwas Geld verdienen?

Vorteile einer Ausschreibung auf Freelancer

Legen Sie Ihr Budget und Ihren Zeitrahmen fest
Für Ihre Arbeit bezahlt werden
Skizzieren Sie Ihren Vorschlag
Sie können sich kostenlos anmelden und auf Aufträge bieten
Vergeben an:
Avatar des Nutzers
See private message.
$34 USD in 3 Tagen
5,0 (117 Bewertungen)
6,4
6,4
25 Freelancer bieten im Durchschnitt $32 USD für diesen Auftrag
Avatar des Nutzers
See private message.
$42,50 USD in 3 Tagen
4,9 (14 Bewertungen)
5,1
5,1
Avatar des Nutzers
See private message.
$21,25 USD in 3 Tagen
5,0 (13 Bewertungen)
4,9
4,9
Avatar des Nutzers
See private message.
$42,50 USD in 3 Tagen
5,0 (68 Bewertungen)
4,8
4,8
Avatar des Nutzers
See private message.
$12,75 USD in 3 Tagen
5,0 (77 Bewertungen)
4,6
4,6
Avatar des Nutzers
See private message.
$42,50 USD in 3 Tagen
4,9 (19 Bewertungen)
4,6
4,6
Avatar des Nutzers
See private message.
$42,50 USD in 3 Tagen
4,9 (16 Bewertungen)
3,7
3,7
Avatar des Nutzers
See private message.
$33,15 USD in 3 Tagen
4,3 (10 Bewertungen)
3,1
3,1
Avatar des Nutzers
See private message.
$20,40 USD in 3 Tagen
4,9 (4 Bewertungen)
2,6
2,6
Avatar des Nutzers
See private message.
$25,50 USD in 3 Tagen
4,7 (16 Bewertungen)
2,6
2,6
Avatar des Nutzers
See private message.
$25,50 USD in 3 Tagen
5,0 (5 Bewertungen)
2,1
2,1
Avatar des Nutzers
See private message.
$34 USD in 3 Tagen
5,0 (2 Bewertungen)
1,0
1,0
Avatar des Nutzers
See private message.
$34 USD in 3 Tagen
5,0 (2 Bewertungen)
0,2
0,2
Avatar des Nutzers
See private message.
$38,25 USD in 3 Tagen
0,0 (0 Bewertungen)
0,0
0,0
Avatar des Nutzers
See private message.
$34 USD in 3 Tagen
0,0 (0 Bewertungen)
0,0
0,0
Avatar des Nutzers
See private message.
$17 USD in 3 Tagen
0,0 (0 Bewertungen)
1,3
1,3
Avatar des Nutzers
See private message.
$30,60 USD in 3 Tagen
0,0 (0 Bewertungen)
0,0
0,0
Avatar des Nutzers
See private message.
$42,50 USD in 3 Tagen
0,0 (0 Bewertungen)
0,0
0,0
Avatar des Nutzers
See private message.
$38,25 USD in 3 Tagen
0,0 (0 Bewertungen)
0,0
0,0
Avatar des Nutzers
See private message.
$34 USD in 3 Tagen
0,0 (2 Bewertungen)
1,9
1,9
Avatar des Nutzers
See private message.
$34 USD in 3 Tagen
0,0 (0 Bewertungen)
0,0
0,0

Über den Kunden

Flagge von AUSTRALIA
Sydney, Australia
5,0
17
Zahlungsmethode verifiziert
Mitglied seit Apr. 28, 2008

Kundenüberprüfung

Danke! Wir haben Ihnen per E-Mail einen Link geschickt, über den Sie Ihr kostenloses Guthaben anfordern können.
Beim Senden Ihrer E-Mail ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.
Registrierte Benutzer Veröffentlichte Jobs
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Vorschau wird geladen
Erlaubnis zur Geolokalisierung erteilt.
Ihre Anmeldesitzung ist abgelaufen und Sie wurden abgemeldet. Bitte melden Sie sich erneut an.