Question: For tests 5 and 6 , you will end up writing your own class, called TextCodec, make an instance of it , call the Encode
For tests and you will end up writing your own class, called TextCodec, make an instance of it call the Encode method described below and return the result of that method. The TextCodec class should be included within a new TextCodec.cpp file.
To create your TextCodec class, you will add the following access modifier, fields, constructor, and methods.
In addition, add the line #define TEXTCODEC at the top of TextCodec.cpp
For example:
#define TEXTCODEC
class TextCodec
fields of this class
constructors of this class
methods of this class
Your TextCodec class must have one member variable field which is:
a short int, which holds a numeric offset
You can name the field any name you want.
Your TextCodec class must have an overloaded constructor, which takes the offset variable that will be assigned to the field of the class:
TextCodecshort int offset
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
