Question: In C + + Realize the given class structure. E - Talons virtual class, 2 4 / 7 ET , Number of trips ET ,
In C Realize the given class structure. ETalons virtual class, ET Number of trips ET PersonalET derived classes. Class constructors initialize all parameters. The Print function outputs all internal data.
ET ETalon.
Number of trips ET ETalon for the specified number of trips.
Personal ET personal ETalon, with the possibility to add the number of trips.
Talon Abstract class
ECoupon Constructor
Print Prints all elements of the class
Use Empty in abstract class
Add Empty in abstract class
serial serial number
ET
Time of Day ET Constructor
Print Prints all elements of the class
Use If activated false changes it to true and writes the activationdate to the activation variable
the date
If activated true, it checks whether the date differs from today by no more than
If no output "green", if yes "red"
activationdate date of activation
ctivated activation status truefalse
Number of trips ET
Number of Trips ET Constructor
Print Prints all elements of the class
Use Checks trips if successful outputs "green" if not successful "red"
reduces trip to
number of trips
PersonalET
PersonalET Constructor
Print Prints all elements of the class
Use Checks trips if successful outputs "green" if not successful "red"
reduces trip to
Add Increases the trip to
number of trips
house
surname
Create an ETalons array, put copies of each derived class in the array. In a cycle, output data about EVouchers using the Print function. In the main program, call the Use Add functions several times to show that the EVoucher system is working.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
