Do accept my apologies aVague...
NO actually classes are not my strong point so i did some reading and the program i designed is as follows however my problem with it is i am unsure as to whether i am answering the question from section a in this particular program... Because how i understand it is the section a you need a program to perform the arthmetic tasks and it is not until section b does it need to understand the short hand form.... but that is what i think...
Code:
#include<iostream.h>
#include<conio.h>
// declaration section:
class Arithmetic
{
private:
int a;
public:
void seta(int a);
void displayArithmeticOperations();
};
// implementation section:
void Arithmetic::displayArithmeticOperations()
{
cout<<”Enter initial value of a”<<a<<endl;
//print message and value to screen
cout<<”The initial value of a you typed is: “<<a<<endl;
}
void main()
{
int a= a+12;
//print message and value to screen
cout<<”After applying a=a+12 new value of a is: “<<a<<endl;
int a= a-12;
//print message and value to screen
cout<<”After applying a=a-12 new value of a is: “<<a<<endl;
int a= a*12;
//print message and value to screen
cout<<”After applying a=a*12 new value of a is: “<<a<<endl;
int a= a/12;
//print message and value to screen
cout<<”After applying a=a/12 new value of a is: “<<a<<endl;
int a= a%12;
//print message and value to screen
cout<<”After applying a=a%12 new value of a is: “<<a<<endl;
getch();
}