classes :: classwork
Answer the following questions:
- How can a constructor be identified?
- Could a private variable be used outside of the class where it has been declared?
- What is the purpose of a constructor?
- What keyword calls on the constructor to create an object?
- What operator is used to associate objects and members?
- Create an object of type Shape named "squared".
- What is the purpose of the get() accessor method?
Payroll mini assignment
- Partially re-write CPT 1
- Create an object of type GrossPay that will return the weekly pay of an employe
- Create an object of type Taxes that will return the taxes of an employe
- Use DemoEmployee (main()) to instantiate a GrossPay and Taxes objects
- Calculate the NET pay only
- Use as many arguments as you see fit
- Must use an Accessor Method
- If you want ot write a third class to compute the net pay, go ahead