Question
C++ problem: Convert your work into a class for my use based on the provided UML. I am building an interface based on the specifications
C++ problem:
Convert your work into a class for my use based on the provided UML. I am building an interface based on the specifications I provide, so your class must match the UML exactly.
The class should behave as follows:
constructor: Assigns the parameter to the private class member base 10 .
GetBase10: Returns the stored decimal value.
GetUnsignedBase2: Returns the stored decimal value as an unsigned binary string bits wide.
GetSignedBase2: Returns the stored decimal value as a twos complement signed binary string bits wide.
GetBase16: Returns the stored decimal value as a signed hexadecimal value.
SetBase10: Updates the value of the stored decimal integer member.
SetUnsignedBase2: Updates the value of the stored decimal integer by interpreting the parameter base 2 as an unsigned binary integer.
SetSignedBase2: Updates the value of the stored decimal integer by interpreting the parameter base 2 as an signed twos complement binary integer.
SetBase16: Updates the value of the stored decimal integer by interpreting the parameter base 16 as signed hexadecimal integer.
Submission directory:
1. A base converter.h file with your library includes and class declarations. 2. A base converter.cc file with your class definitions.
pkg Base Converter base 10 int Baseconverter(base 10 int) GetUnsignedBase2(bits int) string GetSignedBase2(bits int) string GetBase160 string SetUnsignedBase2(base 2 string) void Set Signed Base2(base 2 string) void Set Base16(base 16 string) void
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started