Answered step by step
Verified Expert Solution
Link Copied!

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. 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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions