Savnet CPP #3 === # 1. IPv6 As a user, I want to validate an IPv6 address, So that I don't mess up my configuration. > An IPv6 address is represented as eight groups of four hexadecimal digits, each group representing 16 bits (two octets, a group sometimes also called a hextet). The groups are separated by colons (:). An example of an IPv6 address is: > > `2001:0db8:85a3:0000:0000:8a2e:0370:7334` ([source](https://en.wikipedia.org/wiki/IPv6_address)) **Acceptance criteria:** 1. Get from standard input, one line of string: the IPv6 to validate. 2. Each group of 16 bits, must be present to consider it valid. 3. Leading zeros for each group are optional. e.g. `0370` or `370` are both considered valid. 4. Valid chars are `0-9` and `a-f` (the [hexadecimal chars](https://simple.wikipedia.org/wiki/Hexadecimal)) - case insensitive. ## Examples Input: `2001:0db8:85a3:0000:0000:8a2e:0370:7334` Output: `Valid` -- Input: `0001:08:A3:00:0:8a2e:0370:7334` Output: `Valid` -- Input: `08:A3:00:0:11:12:AAFF` Output: `Invalid! Not enough groups.` -- Input: `11:22:08:A3:00:0:11:12:AAFF` Output: `Invalid! Too many groups.` -- Input: `11XY:22:A3:00:0:11:12:AAFF` Output: `Invalid! Unexpected hex char.` # 2. Palindrome As a user, I want to enter a positive two-byte decimal number, So that I find out if its binary representation is a palindrome or not. > > [Palindrome numbers](https://en.wikipedia.org/wiki/Palindromic_number) > [Online bitwiseCmd tool](https://bitwisecmd.com/) > **Acceptance criteria:** 1. Validate input, accept only positive integers that can be stored within two-bytes. 2. Detect if the binary representation is a palindrome. ## Examples Input: `65535` Output: `It is a palindrome` -- Input: `65536` Output: `Invalid number. Too large to fit in two-bytes.` -- Input: `-11` Output: `Invalid number. Negative numbers are not allowed.` -- Input: `33153` Output: `It is a palindrome` -- Input: `64238` Output: `It is NOT a palindrome` # 3. Geometry As a user, I want to enter a sphere's radius (in meters), So that I can calculate its diameter, surface, and volume. **Important**: You must use a class and implement the 3 methods. **Acceptance criteria** 1. validate input, accept only positive numbers below 100. 2. display rounded results to two decimals. ## Examples Input: `-1` Output: `Invalid radius length.` -- Input: `105` Output: `Invalid radius length.` -- Input: `10` Output: ``` Diameter: 20 m Surface: 1256.64 mp Volume: 4188.79 mc ```