Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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.
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
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started