Implementing container and class functionality

Assignment Help Other Subject
Reference no: EM132389275

Assignment

This assignment involves implementing container and class functionality to support measuring the properties of certain classes of codes.

You are to implement two containers:

1. A Codeword container for storing ordered lists of symbols making up a codeword.

2. A Codebook container containing a collection of codewords.

The symbols are themselves allowed to be of any type that supports certain functionality. We shall consider the containers after considering the two symbol classes you need to implement.

1. The first symbol class Mint allows us to store a single integer value in the range 0 to p 1, where p is a positive integer, the modulus. In this class you should overload the subtraction operator overloaded to produce the typical integer result modulo p.

2. The second symbol class Melt allows us to store a single lowercase letter from the English alphabet, with the subtraction operator overloaded to give 1 if the symbols are different and 0 if they are the same. There are p = 26 distinct possible symbols.

The Codeword container

This container should be used to store elements of the same type. It should be a templated container class. The following methods should also be provided.
1. The method Weight should determine the number of elements in the code that are not-equal to the "zero" symbol. For example, 0 2 0 3 3 3 0 has a weight of 4.
2. The method Distance should take another codeword and determine the sum of the element by element difference according to the overloaded subtraction operation for the contained symbol class.
For example, the distance between 0 1 2 3 0 1 and 0 0 2 0 0 2 for a Mint container with p = 7 would be determined as

3. The method Display should output the elements in the codeword, each separated by a space, with a final gap and the weight of the codeword displayed. For example,

The Codebook container

This container should be used to store collections of codewords. It should be a templated container class. The following methods should be provided.

1. The method minimumWeight should determine the minimum Weight value across all non-zero code- words.

2. The method calcDistance should determine the distances between every pair of codewords in the code, and store these values.

3. The method minimumDistance should determine the minimum Distance between two codewords in the code, as determined across all distinct pairs of codewords.

4. The method Display should display all the codewords contained in the container, using the Display method for the codewords themselves, and display the minimum weight and minimum distance for this code. The table of distances between codewords should be displayed also.

You generate values to populate your codewords by making calls to the functions provided in generateValue.h and libGenVal.a, using seed and modulus as arguments as needed.

After populating the codebook, you should calculate the minimum weights and distances for the code.

The code should be displayed using the code method Display().

Attachment:- Advanced Programming.rar

Reference no: EM132389275

Questions Cloud

Nucleosomes of inactive x-chromosome in mammals : Name the histone variant that is associated with the nucleosomes of inactive X-chromosome in mammals.
Process of natural selection : Explain how the process of natural selection drives the evolution of a species.
What part of the tree is doing photosynthesis : Think of an oak tree in the summer. What part of the tree is doing photosynthesis?
Explain the pathogenesis of woman symptoms : a. Explain the pathogenesis of this woman's symptoms of this woman's symptoms as it relates to myasthenia gravis.
Implementing container and class functionality : Implementing container and class functionality to support measuring the properties of certain classes of codes - Codeword container for storing ordered lists
What complications of traumatic head injuries : What complications of traumatic head injuries might lead to a coma?
Describe the structure of the plasma membrane of a cell : Describe the structure of the plasma membrane of a cell. Be sure to include a description of the fluid-mosaic model.
Property of amino acid codons : Mutant proteins whose genes experience a change in only one nucleotide, have a corresponding change in only 1 amino acid. What does this tell you
Polypeptides synthesized in vitro from mrnas : Thalassemia is a disease characterized by mutations that convert amino acid codons into stop codons. Suppose you were to compare the polypeptides synthesized

Reviews

Write a Review

Other Subject Questions & Answers

  Cross-cultural opportunities and conflicts in canada

Short Paper on Cross-cultural Opportunities and Conflicts in Canada.

  Sociology theory questions

Sociology are very fundamental in nature. Role strain and role constraint speak about the duties and responsibilities of the roles of people in society or in a group. A short theory about Darwin and Moths is also answered.

  A book review on unfaithful angels

This review will help the reader understand the social work profession through different concepts giving the glimpse of why the social work profession might have drifted away from its original purpose of serving the poor.

  Disorder paper: schizophrenia

Schizophrenia does not really have just one single cause. It is a possibility that this disorder could be inherited but not all doctors are sure.

  Individual assignment: two models handout and rubric

Individual Assignment : Two Models Handout and Rubric,    This paper will allow you to understand and evaluate two vastly different organizational models and to effectively communicate their differences.

  Developing strategic intent for toyota

The following report includes the description about the organization, its strategies, industry analysis in which it operates and its position in the industry.

  Gasoline powered passenger vehicles

In this study, we examine how gasoline price volatility and income of the consumers impacts consumer's demand for gasoline.

  An aspect of poverty in canada

Economics thesis undergrad 4th year paper to write. it should be about 22 pages in length, literature review, economic analysis and then data or cost benefit analysis.

  Ngn customer satisfaction qos indicator for 3g services

The paper aims to highlight the global trends in countries and regions where 3G has already been introduced and propose an implementation plan to the telecom operators of developing countries.

  Prepare a power point presentation

Prepare the power point presentation for the case: Santa Fe Independent School District

  Information literacy is important in this environment

Information literacy is critically important in this contemporary environment

  Associative property of multiplication

Write a definition for associative property of multiplication.

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