How could i wrote this program , i need ur help ?

Hey , i really need your help to write this Programm c++ ?
Write a converter that converts decimal numbers into Bina bzw. numbers or Bina ̈ numbers in decimal numbers.
To do this, write a class Dec2Bin that converts decimal numbers into binary numbers and a class Bin2Dec that converts binary numbers into decimal numbers.
• The classes should be constructed so that the number to be converted is passed as a string, i. the constructions have the prototypes:
- Dec2Bin :: Dec2Bin (string decimal) or - Bin2Dec :: Bin2Dec (string binary).
• Each class should have a void convert () member function that does the calculation.
• Access to the converted number should be through the getter functions
- std :: string Dec2Bin :: GetBinary () or - int Bin2Dec :: GetDecimal ()
be made possible.
Tasks:
1.Read a number (bina ̈roderdecimal) asstring.You can use d or b to label the numbering system as you type
2. Convert the entered number with the corresponding class instance and output the result on the screen.
Hints:
• Of course, each class should have its own header file and the implementation should be done in the files Dec2bin.cpp or Bin2dec.cpp. The reading of the number should be done in the file main.cpp. The binary number calculated by class Dec2Bin should be rendered as a string repra.
• Customize your makefile to compile the three files and then link them to the executable file converters.
Last edited on
Please note that this is not a homework site. We won't do your homework for you. The purpose of homework is that you learn by doing. However we are always willing to help solve problems you encountered, correct mistakes you made in your code and answer your questions.

We didn't see your attempts to solve this problem yourself and so we cannot correct mistakes you didn't made and answer questions you didn't ask. To get help you should do something yourself and get real problems with something. If your problem is "I don't understand a thing", then you should go back to basics and study again.
Topic archived. No new replies allowed.