Question: 9 , Task 3 It turns out the email was from the elite Cyber Sleuths League ( CSL ) . Since you passed with flying

9, Task 3
It turns out the email was from the elite Cyber Sleuths League (CSL). Since you passed with flying colours you have just been recruited to join their team. Your first mission is to infiltrate the highly secure servers of Code Brew - the company you were unjustly fired from due to a mysterious conspiracy.
You have a personal vendetta, yes, but the stakes are higher: inside Code Brew's servers lies critical evidence that can expose a cyber syndicate's misdeeds. You must use your coding skills to crack the password and retrieve the evidence before it's too late,
You vaguely remember the password format, and it's up to you to put the pieces together. Think of it as a game of Wordle, where each correct guess brings you closer to the full password.
You are given this Task3.cpp file, it contains your main loop:9.1 Sub-Task 1: Char
You have been given a Char.h and Char.cpp file, it contains the function char findNext Char(char current) and char findChar(char target, char current ='a')
9
9.1.1 char findNextChar Function:
This function returns the next ASCII character. It also checks if the current character is the last in its respective case range (z' or 'Z).
If current is 'z', it wraps around and returns 'A' to start with uppercase letters.
If current is 'Z', it wraps around and returns 'a' to cycle back to lowercase letters.
If neither, it simply progresses to the next character in the ASCII sequence and returns that character.
This must be done using ternary if statements
9.1.2 char findChar Function:
This function finds a target character starting from the given current character.
It checks if the current character is the target character.
(a) If they match, the current character is returned as the result.
(b) If no match, the function calls itself with the target and the result of findNextChar(current)
This implementation uses ternary if statements to determine progression or match conditions.
9.2 Sub-Task 2: Int
You have been given a Int.h and Int.cpp file, it contains the function char convertChar(int character) and int findint (int target, int current =0)
9.2.1 findInt Function:
This function finds a target integer starting from the given current integer.
It checks if the current integer is the target integer.
(a) If they match, the current integer is returned as the result.
(b) If they do not match, the function calls itself with the target and current +1.
This implementation uses ternary if statements to increment the current integer until the target is matched.
9.2.2 convertChar Function
This function converts an integer to its corresponding ASCII character.
The function takes an integer character which represents a digit from 0 to 9
It returns the ASCII character equivalent by adding '0' to the integer. This converts the integer to a character ranging from '0' to '9',
This conversion is straightforward and does not involve conditional logic but relies on the ASCII standard where the digits 0-9 are sequentially ordered.
10
9.3 Sub-Task 3: SpecialChar
You have been given a SpecialChar.h and Special.cpp file, it contains the function char findSpecialChar(char target, int current)
9.3.1 findSpecialChar Function:
This function finds a target special character in the ASCII table, starting from a given current ASCII value
It checks if the current ASCII value matches the target character's ASCII code.
(a) If they match, the current ASCII character is returned as the result, effectively identifying the target character.
(b) If they do not match, the function calls itself with the target character and the next ASCII value (current +1).
This method utilizes ternary if statements to increment the current value until the target character's ASCII code is matched.
9 , Task 3 It turns out the email was from the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!