Explore BrainMass

Explore BrainMass

    Structures and Classes

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Use the example on p. 355 (screenshot attached) of the text to create your own structure related to an overtime pay calculator and define the variables needed within your structure to perform those calculations.

    Define and create a base class using the same variables that may serve the same function as the structure.

    © BrainMass Inc. brainmass.com October 10, 2019, 6:47 am ad1c9bdddf


    Solution Preview

    Actually the screenshot you posted is not the portion that you need. From the description you gave it looks like you are learning the syntax of structures and classes and get practice determining which variables are needed. So here are the steps:

    1. Determine which variables you need for your overtime calculator
    Obviously you need a variable for the overtime hours worked and for the pay rate of those hours. You may also include a variable for the calculated pay, but that's not really necessary because you can so quickly calculate it.

    2. Write the code to create a structure with these variables. Your screenshot seems to indicate that the example ...

    Solution Summary

    The structures and classes are provided for variables. A base class using the same variables that may serve the same function as the structure are given.