Create our own simple lossless data compression algorithm

Assignment Help Data Structure & Algorithms
Reference no: EM133634971

Programming Concepts

Assignment - Compression is used to reduce resource usage, such as data storage space or transmission capacity. Compression can be either lossy or lossless. Lossless compression reduces bits by identifying and eliminating statistical redundancy. No information is lost in lossless compression. Lossy compression reduces bits by identifying unnecessary information and removing it. The process of reducing the size of a data file is referred to as data compression.

In this assignment we are going to create our own simple lossless data compression algorithm and implement it as a C++ class. In this assignment you will feed your class an input file that contains various words. Your class will read these words, keep track of when it finds a new word that it did not encounter previously and assign a number to that word. Your program will write an output file that contains the compressed data which will be the numbers that are associated with the words that were in the input file.

For example, if my input file had the following text: "test this file test test test", then the output file might look like this: "12 31 1 1". In this case my program would have associated the number "1" with the word "test", the number "2" with the word "this" and "3" with the word "file". To make this assignment easier, we will only deal with words and not punctuation or newlines. You can also treat the word "test" and "Test" as the same word or treat them as separate words. It is ok to limit your program to a set number of words that it can store (try to store at least 1000 unique words). At the end of your output file you must print out a list of each word and the associated number that your program used to compress the data so that we could decompress and read the data.

In your program you must use file input and output. You must use object oriented design to write your code in C++. You must use exception handling. (Use try and catch statements.) You must create at least 3 different test input files. You must create a header file (.h) and separate your class source code file (.cpp) from your main source code file. (You should turn in at least 3 source code files, one header file and 2 source code files.) Remember that your header file contains just definitions and not source code. You must also turn in all 3 (or more) of your test input files (.txt).

Do not use a vector, you can use a simple array. Do not use anything that would require you to include the libraries algorithm.h or vector.h or similar. If you have any questions about this, let me know before submitting the assignment. Remember that your code must be appropriately commented. You must use inline comments and block comments. (Your class member function comment blocks should be above your function declarations in your header file.)

Reference no: EM133634971

Questions Cloud

Define the term-cognitive dissonance : Define the term, cognitive dissonance, and describe how you (as a teacher) can stimulate child development by provoking cognitive dissonance deliberately.
How many overdose deaths were there each day in 2016 : For every 100 drug overdose deaths, 66 involved an opioid.B. If there are 365 days in a year, about how many overdose deaths were there each day in 2016
How do you think her experiences studying abroad in mexico : Read the story of Audre Lorde. Where did she study in Mexico, and how do you think her experiences studying abroad in Mexico informed her work?
What did you find most interesting from listening to podcast : In the podcast, Judy mentions the IDEA and 504. What are these and who do they apply to? What did you find most interesting from listening to the Podcast?
Create our own simple lossless data compression algorithm : Create our own simple lossless data compression algorithm and implement it as a C++ class. In this assignment you will feed your class an input file
What do you need to improve as related to your teaching : What do you need to improve as related to your teaching? What do you want to know and be able to do from a pedagogical lens by the end of this course?
Who did you tell about your abstinence project : What was the chosen behavior? What led you to choose this behavior? Who did you tell about your abstinence project? How did this impact you?
How is your classroom organized for instruction : Who are the students with whom you work? How is your classroom organized for instruction, in accordance to your students' varied learning needs?
How would you define advocacy : How would you define advocacy? How do see yourself advocating for ELs? What does shared responsibility to educate ELs mean to you?

Reviews

len3634971

2/5/2024 12:48:31 AM

Hello! I just needed some help with this assignment in Microsoft's Visual Studio Code thank you!

Write a Review

Data Structure & Algorithms Questions & Answers

  Implement an open hash table

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

  Use a search tree to find the solution

Explain how will use a search tree to find the solution.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Currency conversion development

Currency Conversion Development

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  Data structures for a single algorithm

Data structures for a single algorithm

  Write the selection sort algorithm

Write the selection sort algorithm

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd