c++ Program Please see where i do mistake, C/C++ Programming

Assignment Help:
#include
#include
#include
#include
#include


class Employee
{
private:
char *Name; //Set them as pointers...
int IdNumber;
char *Department;
char *Position;

public:

void setName(char Name);
void setDepartment(char Dept);
void setIdNumber(int ID);
void setPosition(char POS);
}
{
Employee::Employee()
{
Name=" ";
IdNumber=0;
Department=" ";
Position=" ";
}
void Employee::setName(const char* Name)
{
Name = Name;
}
void Employee::setIdNumber(int ID)
{
IdNumber = ID;
}
void Employee::setDepartment(const char* Dept) //WTF? why integer? Keep as character string!
{
Department = Dept;
}
void Employee::setPosition (const char* POS) //Same thing here!
{
Position = POS;
}
char Employee::getName() //const //What are these for?
{
return Name;
}
int Employee::getIdNumber() //const //What are these for? Plus, get your return types right!
{
return IdNumber;
}
char Employee::getDepartment() //const //What are these for? Plus, get your return types right!
{
return Department;
}
char Employee::getPosition() //const //What are these for? Plus, get your return types right!
{
return Position;
}
int main()
{
Employee SusanMeyer(), MarkJones(), JoyRogers();
SusanMeyer.setPosition("Vice President"); //etc.. for all the other guys...
}
getch();
};

Related Discussions:- c++ Program Please see where i do mistake

#titlethe Average Temperature in Paradise.., Writing and compiling a progra...

Writing and compiling a program from a given Use Case definition. Follow the Average Temperature in Paradise

Last ant on rod, There are ''n'' ants on a ''n+1'' length rod. The ants are...

There are ''n'' ants on a ''n+1'' length rod. The ants are numbered from 1 to n and are initially placed at positions starting from position 1 till position n. They are moving eith

Beti, how is a beti a beti

how is a beti a beti

Wap in c to find determinant of matrix order 3x3 , Normal 0 fal...

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

How can define an array, Q: How can Define an Array? An Array is define...

Q: How can Define an Array? An Array is defined in much the alike manner as ordinary variables except that every array name must be accompanied by a size specification (that is

We want database development, Presently we are using several spreadsheets t...

Presently we are using several spreadsheets to give weekly activity and income reports. Much of the information is being frequently re-keyed into several spreadsheets - we are look

Can any constructor throw an exception?, Can any constructor throw an excep...

Can any constructor throw an exception? How to handle error while the constructor fails?

Stack operations - c++, Stack operations - C++: Write a program to def...

Stack operations - C++: Write a program to define basic stack operations in c++. int Stack::push(int elem) {    int m = getmax();    if (top    {       put_

Assigment, Hi is there any chance to get assignment for fresher tutor

Hi is there any chance to get assignment for fresher tutor

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd