Question: 3 3 . 2 LAB: State ID renewal ( Copy assignment ) Given class StateID, overload the assignment operator ( in StateID.cpp ) so as

33.2 LAB: State ID renewal (Copy assignment)
Given class StateID, overload the assignment operator (in StateID.cpp) so as to allow a StatelD object to be
assigned to another StatelD object.
StateID contains a pointer to an array of strings with length 5, which contains the state identification card's
information. The information stored in the array should be in order of Name, State, Identification Number, Date of
Birth, and Expiration Date.
In main. cpp, create a new StateID object as a backup of the old state ID (copy id to the new object).
main.cpp then sets id's state, identification number, and expiration date to "Pennsylvania", "87654321", and
"1/25/2028" respectively.
Print both the renewed and old state ID card's information using each ID's own print member function.
The output of main.cpp is:
3 3 . 2 LAB: State ID renewal ( Copy assignment )

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!