Write a C++ program to add, sort, and display the details of a user in an array and also to remove the detail in an array.
Southall Hotel is hosting a brand new year's party, for everyone in town. To make proper arrangements they asked people to register themselves on their website if they are attending the party. The website provides the person with three functionalities
- Register themselves for the event.
- Sort the already registered guests if they want to check whether their friends or acquaintances are already registered or not.
- Cancel their registration from the event if they wish to, by deleting their registered entry.
Write a C++ program to add, sort, and display the details of a user in an array and also to remove the detail in an array.
Strictly adhere to the Object-Oriented specifications given in the problem statement. All class names, member variable names, and function names should be the same as specified in the problem statement.
The class User has the following private attributes/member variables
Data type | Variable |
string | name |
long long int | mobileNumber |
string | username |
string | password |
Include appropriate constructors for the above class.
The class UserBO has the following functions:
Member Function | Description |
void adddetails(string name,long long int mobilenumber,string username,string password,int i) | The function to add the details of a user in an array object. |
void sortdetails(int n) | The function to sort and display the user details |
void removeuser(string name, int n) |
The function to remove the user detail present at the |
Declare an array in the BO class to store the user details
In the main method, create an array of user instances/objects and call the above methods.
Refer sample input and output for formatting specifications.
------------------------------
SAMPLE OUTPUT AND INPUT PROVIDED IN ATTACH KINDLY SEE ! AND MATCH OUTPUT AS IT IS
Trending now
This is a popular solution!
Step by step
Solved in 2 steps