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

Define the float data type of c language, Define the Float Data Type of c L...

Define the Float Data Type of c Language? The float is used to define floating point numbers. The Floating point numbers are stored in 32 bits with 6 digits of precision. Eg

But operator overloading makes class look ugly; isn''t it , Q: But operator...

Q: But operator overloading makes class look ugly; isn't it assumed to make my code clearer? A: Operator overloading makes life simpler for the users of a class, not for develop

Roman code python help , In general, Roman numerals can be converted mathem...

In general, Roman numerals can be converted mathematically by simply assigning a numerical value to each letter, according to the chart below, and calculating a total: M=1000 | D=5

Program to find the number, i need a program that find the number of negati...

i need a program that find the number of negative integers in a list.

When should you employ multiple inheritance?, Q: When should you employ mul...

Q: When should you employ multiple inheritance? A:There  are  three  acceptable  answers:-  "Rarely," "Never," and  "while  the  problem  domain cannot be modeled accurately any

E^x, Write a program to calculate e^x using the formula: e^x = 1 + x/1! + ...

Write a program to calculate e^x using the formula: e^x = 1 + x/1! + x^2/2! + x^3/3! + ...... Allow the user to enter the integer number x, then do the calculation in a loop (for

Demostrate java and c client server exchaniging, Task 1 Demonstrate a J...

Task 1 Demonstrate a Java client and server exchanging one text message in each direction. Task 2 Demonstrate a C client and server exchanging one text message in each

Explain floating literal, Floating  literal They can be written in comm...

Floating  literal They can be written in common decimal as well as scientific notation (floating point representation). By default it is of type double. F, L is applied only to

Converting base type to class type (char to string), Converting Base Type t...

Converting Base Type to Class Type (char to string)   class String { char *name; int length; public: String(void) {length =0; name = new char[length+1];

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