Hello,
We just started studying classes right now, we are studying classes. Unfortunately, my teacher is not very helpful.
I was given a study guide for my midterm and one of the questions there was to create a half adder. I already did the .h part and i believe it is correct. However, I have not done the two .cpp aspects. I don't know what a half adder is because i just started studying gates and have not done half adder yet.
I have posted the .h i.e the header aspect of the class. However, I need help as to write the driver .cpp and the other .cpp. Please help me cos this is the toughest question in the study guide. thank you.
#pragma once
#using <mscorlib.dll>
using namespace System;
class Complex
{
private:
bool sum;
bool carry;
public:
HalfAdder();
HalfAdder(double, double);
set_HalfAdder(bool, bool);
get_HalfAdder();
};
P.s> i think i am expected to initialize the data members to 0. the purpose of the program is to demonstrate the above functions i.e the set_half adder and the get_half adder functions.