Question: Question2.h is needed. main.cpp cannot be changed. CONTEXT OF THE QUESTION A password for a website consists of three components which are: . letters, number,
Question2.h is needed. main.cpp cannot be changed.



CONTEXT OF THE QUESTION A password for a website consists of three components which are: . letters, number, special characters in that exact order. For example, a password could be: Password1: COP3503++ These components will be called: prefix, middle, and suffix respectively. In this example this is: prefix = COP middle = 3503 suffix = ++ You are given a binary file that has the following structure: . Number of passwords stored in the file (int) . Number of the characters in the letter part of the password (int) . Letters in the password (Chars) . A number (int) . Number of special characters (int) . Special characters (Chars) TASKS Your task is to: Using the given the structures name password and file: . (1 point) Define the default constructor such as: prefix = "ABC"; middle = 123; suffix = "+"; . (2 points) Define the parametrization for the structure, that takes all three elements as parameters and constructs the password from it. . (3 points) Complete the member function getGeneratedPassword in the password structure that takes in a fstream object and reads into it an object of type password. . (4 points) Complete the member function readAllPasswords in the file structure that reads all the passwords stored in the file. NOTE: . Do not change the already written code. . Some test cases are hidden. . Make sure to submit for grading and check if you have passed the three cases.File is marked as read only Current file: main.cpp 1 #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
