CS-1C Assignment 4

$30.00

Category: Tags: , , , You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (3 votes)

1. Using assignment #2, derive a SoftwareTester class from the
Employee class. Add the following data members to the a
SoftwareTester class:
a. A character pointer for the SoftwareTester’s
address (e.g. char * address)
b. A character pointer for the SoftwareTester’s city
c. A character pointer for the SoftwareTester’s state
d. A zip code
2. Write and test change address, city, state, and zip code
member functions for the SoftwareTester class.
3. Write a copy constructor for the SoftwareTester class.
4. Write a deep copy member function for the SoftwareTester
class.
5. Change the print SoftwareTester function to display all its
data members.
6. Change the age and city of a SoftwareTester. Test your
change methods.
Note: (a) Your constructors for the SoftwareTester class that
have parameters should use dynamic memory and (b) you will have
to write a destructor that frees dynamic memory
Test your program by
Adding a cout statement to your copy constructor,
constructors, and destructors.
1. Write a function that passes by copy (the copy constructor
should be called)
2. Write a function that passes by reference
Assignment 4
3. Write a function that returns by copy (the copy constructor
should be called)
4. Write a function that returns by reference (the copy
constructor should not be called)
5. Use the initialization construct (the copy constructor should
be called)
6. Test your deep copy function
SoftwareTesters
Name Employee’s
Id
Phone Age Gender Job title Salary Hire Date
Joe Calculus 64879 949-555-1234 42 M Math Wiz $110,000 8/31/2017
Mary
Algebra
76309 213-555-5555 22 F Math Helper $170,123 05/08/2017
Jo Trig 10192 714-703-1234 29 F Math
Contact
$200,000 12/25/2016
Name Address City State Zip Code
Joe Calculus 1234 Main Avenue Laguna Niguel CA 92677
Mary
Algebra
3333 Marguerite Pkwy Mission Viejo CA 92646
Jo Trig 9876 Elm Street San Clemente CA 92672