answersLogoWhite

0

#include
#include
#include

using std::cin;
using std::cout;
using std::endl;
using std::string;
using std::toupper;


struct Employee
{
string getFullName()
{
return (firstName + " " + lastName);

}


string getGender()
{
if (toupper(gender) == 'M')
{
return ("Male");

}
else if (toupper(gender) == 'F')
{
return ("Female");

}
else
{
return ("Gender was not specified");

}

}



int getAge()
{
return age;

}


string getMartialStatus()
{
if (toupper(martial_status) == 'M')
{
return ("Married");

}

else if (toupper(martial_status) == 'S')
{
return ("Single");

}

else
{
return ("Martial status is not defined!");

}

}


int getNumberOfChildren()
{
return numberOfChildren;

}



string firstName;
string lastName;
char gender;
int age;
char martial_status;
int numberOfChildren;

};

int main()
{
Employee newEmployee;

cout << endl << "Enter first name: ";
getline(cin, newEmployee.firstName);

cout << endl << "Enter last name: ";
getline(cin, newEmployee.lastName);

cout << endl << "Enter gender (M for Male and F for Female): ";
cin >> newEmployee.gender;

cout << endl << "Enter age: ";
cin >> newEmployee.age;

cout << endl << "Enter martial status (M for married and S for single): ";
cin >> newEmployee.martial_status;

cout << endl << "Enter number of children: ";
cin >> newEmployee.numberOfChildren;

cout << endl << "Employee's full name: " << newEmployee.getFullName()
<< endl << "Gender: " << newEmployee.getGender()
<< endl << "Age: " << newEmployee.getAge()
<< endl << "Martial status: " << newEmployee.getMartialStatus()
<< endl << "Children: " << newEmployee.getNumberOfChildren()
<< endl;

system("PAUSE");
return 0;

}

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

Martial arts is a violent past time and children should not practice it.?

Martial arts is a violent past time and children should not practice it.


Are children martial art classes tax deductible?

No, they are not.


What has the author Gaku Homma written?

Gaku Homma has written: 'Aikido for Life' 'Aikido sketch diary' 'Children and the martial arts' -- subject(s): Self-defense for children, Aikido, Martial arts for children


At what age should children begin practicing martial arts?

Children can begin practicing martial arts as early as 4 or 5 years old, but the best age to start can vary depending on the child's maturity and interest in the activity. It is important to find a reputable martial arts school that offers classes specifically designed for young children.


What type of sports do children play in China?

martial arts and ping pong


Where is the Brown Institute of Martial Arts located?

Brown Institute of Martial Arts is located in Dayton, Ohio. This school offers classes for young children as well as adults. You will be trained by professional martial arts instructors at this school.


How many martial arts does Gary busey know?

Gary Busey black belts in all of the following martial arts: budo-jujitsu, capoeira, hapkido, "Jailhouse Rock," and kendo.


Is children martial art dangerous?

no it isnt dangerous, it's so very important for a child to know martial arts, so they can defend themselves...just guide them, so that they will not be harmed!


What is the best martial arts studio for families?

Most likely Taekwondo or Karate, these martial arts have many families involved and most studios of these take both children and adults as students, compared to martial art styles like BJJ that may not.


In What year did martial law end in Virginia?

Martial law in Virginia officially ended in 1870. It was imposed during the Reconstruction era following the Civil War to maintain order and enforce new laws. The end of martial law marked a significant shift towards restoring civilian governance in the state.


A special court-martial can award all of the following types of punishment except .?

A special court-martial can award various types of punishment, including confinement, hard labor, and reduction in rank. However, it cannot impose a sentence of dishonorable discharge or dismissal, as these penalties are reserved for general court-martial proceedings. Therefore, the type of punishment that a special court-martial cannot award is a dishonorable discharge.


How is martial arts used today?

Today, martial arts are used for various purposes including self-defense, physical fitness, and mental discipline. Many people practice martial arts to improve their health, build confidence, and develop focus and resilience. Additionally, martial arts are popular in competitive sports, with events like mixed martial arts (MMA) gaining significant attention. Furthermore, they are often incorporated into children's education to teach respect, discipline, and teamwork.