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

Algorithm, Write a algorithm to explain the processof wakingbup in morning

Write a algorithm to explain the processof wakingbup in morning

Explain static member functions, Static Member Functions All the object...

Static Member Functions All the objects of the class share static data members of a class. The example above demonstrates how to keep track of all the objects of a class which

Compiler design-limit the methods, Problem : Compiler Design - Limit the me...

Problem : Compiler Design - Limit the methods Rahul is a newbie to the programming and while learning the programming language he came to know the following rules: ·

Explain the special pointer this, The Special Pointer 'this' When vario...

The Special Pointer 'this' When various instances of a class come into existence, it naturally follows that each instance has its own copy of member variables. If this were not

C++, write a c++ program for minimum shelf downloads

write a c++ program for minimum shelf downloads

Write a program to sum any pair of numbers, Write a C++ program that reads ...

Write a C++ program that reads from keyboard 3 integers, with proper input prompt, and then displays the maximum sum of any pair of numbers from these three. If the 3 numbers are 5

C language, WHAT IS A C LANGUAGE? C IS A PROGRAMMING?

WHAT IS A C LANGUAGE? C IS A PROGRAMMING?

Arithmetic operation, a program that declares and prompts the user to enter...

a program that declares and prompts the user to enter two integer and performs the five arithmetic operations

Common c control flow instructions, In this Lab you will code 8086 assemble...

In this Lab you will code 8086 assembler equivalents (Virgo) for common C control flow instructions. This will give you an appreciation for how control flow is implemented in assem

Program is to perform string operations, Program is to perform string opera...

Program is to perform string operations: Program is to perform string operation without using in built functions using classes and object void mainmenu()    {    clrs

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