Write a program, which takes an integer
n and on the next rows prints
n messages (for each message read a few lines). Each message starts with
message(each on a new line).
errorCode(each on a new line).
Print in the console each read message, formatted depending on its
messageType. After the headline of the message print as much
=, as the length of the said headline and print an empty line after each message (to understand in detail look at the examples).
The problem should be solved by defining four methods:
ReadAndProcessMessage(), so that only the last method is invoked by the
credit card purchase
Invalid customer address
Email not confirmed
User registered successfully
Customer has not email assigned
Define and implement the four shown methods.
ReadAndProcessMessage() read the type of message from the console and according the read type read the rest of the data (one, two or three more lines). After that invoke the method for printing the given type of message.
Test your solution here: https://judge.softuni.bg/Contests/Practice/Index/594#12.