Find Jobs
Hire Freelancers

c++ File I/O Morse Code Converter

$30-50 USD

In Progress
Posted almost 16 years ago

$30-50 USD

Paid on delivery
**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.
Project ID: 3930620

About the project

25 proposals
Remote project
Active 16 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$34 USD in 3 days
5.0 (117 reviews)
6.4
6.4
25 freelancers are bidding on average $32 USD for this job
User Avatar
See private message.
$42.50 USD in 3 days
4.9 (14 reviews)
5.1
5.1
User Avatar
See private message.
$21.25 USD in 3 days
5.0 (13 reviews)
4.9
4.9
User Avatar
See private message.
$42.50 USD in 3 days
5.0 (68 reviews)
4.8
4.8
User Avatar
See private message.
$12.75 USD in 3 days
5.0 (77 reviews)
4.6
4.6
User Avatar
See private message.
$42.50 USD in 3 days
4.9 (19 reviews)
4.6
4.6
User Avatar
See private message.
$42.50 USD in 3 days
4.9 (16 reviews)
3.7
3.7
User Avatar
See private message.
$33.15 USD in 3 days
4.3 (10 reviews)
3.1
3.1
User Avatar
See private message.
$20.40 USD in 3 days
4.9 (4 reviews)
2.6
2.6
User Avatar
See private message.
$25.50 USD in 3 days
4.7 (16 reviews)
2.6
2.6
User Avatar
See private message.
$25.50 USD in 3 days
5.0 (5 reviews)
2.1
2.1
User Avatar
See private message.
$34 USD in 3 days
5.0 (2 reviews)
1.0
1.0
User Avatar
See private message.
$34 USD in 3 days
5.0 (2 reviews)
0.2
0.2
User Avatar
See private message.
$38.25 USD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$34 USD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$17 USD in 3 days
0.0 (0 reviews)
1.3
1.3
User Avatar
See private message.
$30.60 USD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$42.50 USD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$38.25 USD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$34 USD in 3 days
0.0 (2 reviews)
1.9
1.9
User Avatar
See private message.
$34 USD in 3 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of AUSTRALIA
Sydney, Australia
5.0
17
Payment method verified
Member since Apr 28, 2008

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.