Write the class definition for a class named employee

Assignment Help Other Subject
Reference no: EM13283322

Step 1:

Write the class definition for a class named Employee. The class should include data members for an employee object%u2019s name and salary. (The salary will be an integer). The class should contain two member functions: the constructor and a function that allows a program to assign values to the data members.

Step 2:

Add two member functions to the Employee class. One member function should allow any program using an employee object to view the contents of the salary data member. The other member function should allow the program to view the contents of the employee name data member. (Hint: Have the member function simply return the contents of the appropriate data member.)

Sep 3:

Add another member function to the Employeeclass. The member function should calculate an employee object%u2019s new salary, based on a raise percentage provided by the program using the object. Before calculating the raise, the member function should verify that the raise percentage is greater than or equal to zero. If the raise percentage is less than zero, the member function should display an error message.

Step 4:

The instructions to create an employee object, assign values to the object, display the name and current salary, calculate the new salary, and then display the new salary are missing from the program. Complete the program, using these comments as a guide.

Reference no: EM13283322

Questions Cloud

Differences in normal aging-primary aging-seconday aging : Describe the key differences between normal aging, primary aging, and secondary aging.  What control do we have over each of these processes, and how are they influenced by internal changes, external changes, and daily life exposures?  Reflect on the..
Build an organizational strategic plan : Strategic planning and the tradtional steps to build an organizational strategic plan
Navy vessels by guessing their locations on a grid : Write a program to play a game in which you try to sink a fleet of five navy vessels by guessing their locations on a grid. The program uses random numbers to position its ships on a 15 X 15 grid.
Deal-closing techniques : NOW THAT SHE HAD TO, JEAN M C GUIRE WASN'T sure she could. Not that she didn't understand what to do. Wright Boazman, sales director for Sunrise Land Developers, had made the step clear enough when he described a variety of effective "deal..
Write the class definition for a class named employee : Write the class definition for a class named Employee. The class should include data members for an employee object%u2019s name and salary. (The salary will be an integer). The class should contain two member functions: the constructor and a function..
Briefly discuss the issues around the use of repos : Briefly discuss the issues around the use of (and reliance on) repos by banks.
Hospitals and health systems : Debate the need for hospitals from the perspective in the early 1900s and in the 21st century. You are a health care professional looking to serve your community and you decided to open a hospital with a couple of individuals who want to provide this..
Develop an envisioned methodology : Support your paper with a minimum of 7 resources. In addition to these specified resources, other appropriate scholarly resources, including older articles, may be included.
Modify each practice to promote high quality service : Identify three human resource practices that can impede customer service employees from delivering high quality service. Describe how you would modify each practice to promote high quality service.

Reviews

Write a Review

Other Subject Questions & Answers

  Freelancers and fans film their own commercials

Freelancers and fans film their own commercials for their favorite products and post them on Web sites. This is referred to as ________.

  Can the victim of a rape sue the offender

"One of the firm's lawyers has asked you to conduct research on behalf of a client. The client is the victim of a sexual assault and did not report the event to the police. Can the victim of a rape sue the offender? If so, what are the potential dama..

  Effects of caffeine on both water and mineral balance

What advice would you give a friend who regurlary relies on caffeine-containing beverages to quench his thirst? Consider the effects of caffeine on both water and mineral balance.

  Contemporary nursing issue

I am working on a project related to a contemporary nursing issue, the nursing shortage, and need to describe the theory related to strategies to help with nursing shortage.

  How to decrease cognitive dissonance by restoring positive

Some psychologists recommend you can decrease cognitive dissonance by restoring positive self-evaluations which are threatened by dissonance.

  How jamcracker fit in application service provide space

What do you mean by Application Service Provider? Write factors that drive their emergence? How does Jamcracker fit in ASP space?

  Movements of the earliest americans

Discuss the historical detective work involved in tracking the movements of the earliest Americans.

  Critical path present the most risk to a project

Explain which critical path present the most risk to a project, and explain what types of contingencies you need to put into place to protect the success of the project?

  Ethical considerations in us constitution

Critically discuss the framework that the Constitution of the United States establishes to ensure that all citizens are treated with the same ethical considerations?

  Describing erikson stages of development

Determine and describe Erikson's stages of development as each applies to your own personality formation. How did success at one stage prepare you for meeting the next challenge.

  Defining political systems

Describe the different party systems, political parties, and party leaders of the political systems. What factors contribute to the election or appointment of the leaders and officials of the different systems and parties?

  Relationship between popular media and violence

What do you think is the relationship between popular media and violence? Do you think that media violence can cause or contribute to "real life" violence?

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