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. E-Talons virtual class, 24/7 ET, Number of trips ET, PersonalET derived classes. Class constructors initialize all parameters. The Print() function outputs all internal data.
24/7 ET 24/7 E-Talon.
Number of trips ET E-Talon for the specified number of trips.
Personal ET personal E-Talon, with the possibility to add the number of trips.
-Talon Abstract class
E-Coupon() Constructor
Print() Prints all elements of the class
Use() Empty in abstract class
Add() Empty in abstract class
serial serial number
24/7 ET
Time of Day ET() Constructor
Print() Prints all elements of the class
Use() If activated false changes it to true and writes the activation_date to the activation variable
the date
If activated true, it checks whether the date differs from today by no more than 1.
If no, output "green", if yes "red"
activation_date date of activation
ctivated activation status (true/false)
Number of trips ET
Number of Trips ET() Constructor
Print() Prints all elements of the class
Use() Checks (trips>0) if successful outputs "green" if not successful "red"
reduces trip to 1
number of trips
PersonalET
PersonalET() Constructor
Print() Prints all elements of the class
Use() Checks (trips>0) if successful outputs "green" if not successful "red"
reduces trip to 1
Add() Increases the trip to
number of trips
house
surname
Create an E-Talons array, put 2 copies of each derived class in the array. In a cycle, output data about E-Vouchers using the Print() function. In the main program, call the Use(), Add(), functions several times to show that the E-Voucher system is working.

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 Databases Questions!