A company wants their payroll system developed in OOP in C++ and they have approached you for the basic structure and functionality. They want an object with name and salary properties. The object should have a default constructor that initialises the properties to null and a parameterised constructor. The object should also have two accessors (methods of accessing the contents of a property), one for each property. They also want a method that will compare two objects and tell which has a better salary than the other.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter9: Advanced Modularization Techniques
Section: Chapter Questions
Problem 19RQ
icon
Related questions
Question
A company wants their payroll system developed in OOP in C++ and they have approached you for the basic structure and functionality. They want an object with name and salary properties. The object should have a default constructor that initialises the properties to null and a parameterised constructor. The object should also have two accessors (methods of accessing the contents of a property), one for each property. They also want a method that will compare two objects and tell which has a better salary than the other.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Data members
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning