Question: Use the following specification to code a complete C++ module named Passport : enum class Country { Russia, Great_Britain, United_States, None }; Basic Details Your
Use the following specification to code a complete C++ module named Passport:
enum class Country { Russia, Great_Britain, United_States, None }; Basic Details
Your Passport class includes at least the following data members:
- the address of a C-style null-terminated string of client-specified length that holds the name of the Passport holder.
- the Country (use one of the enumeration constants defined above, defaulting to None).
Public Member Functions
Default constructor
A custom constructor that receives in its parameters the Country (optional) and the address of a C-style null-terminated string containing the holder's name. This function stores the data received in the current object's instance variables. If the client has omitted the Country argument, this function assumes that the country is United_States.
A query named stamp that receives in its sole parameter the address of a C++ string (optional) containing an entry stamp. This function returns a normalized C++ string. If the current object has a non-empty holder's name and the received stamp is not empty, the normalized string is a concatenation of the holder's name and the stamp enclosed in brackets ([ ]) separated from the name by a single space. Otherwise, the normalized stamp is the cancelled. In the case of a United_States passport, the normalized stamp should not include any leading blanks, while the normalized stamp for all other Countrys should include any leading blanks that are present.
A class function named noPassports that returns the number of Passport objects that currently exist and have not yet been destroyed.
Other Features
Include in your design all special member functions required to manage your objects.
You are allowed to add as many private members as you see fit.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
