Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2 . 1 T M Write your own functions - Letter App In your tutorial class design and write a program which reads in a
T M Write your own functions Letter App
In your tutorial class design and write a program which reads in a name, address and message to be sent as a letter to the recipient.
Based on the description below write pseudocode for the program. Upload the pseudocode to the Ed workspace. NB Make sure your pseudocode is decomposed modularly.
As a class group produce a structure chart for the program. Upload a photo or drawing of the structure chart to the Ed workspace.
Write the code and test it in Ed
Annotate the code with comments explaining how to use each module functionprocedure and what they do not how they work
The program should work as described below
Description of the program
Create a main that calls three functions as follows:
Returns the label for the letter.
The label should include the title, first name, last name, and street address for the letter. It should be formatted to appear as it would on the front of a sent letter.
Returns the message to be send.
Your main should also call a function which returns the contents of the letter. The contents should consist of simply a subject line and then after a blank line the content of the message. The message should have a line that starts: RE: then the subject read from the user then a blank line, followed by the message.
Prints the label and the message.
Call a procedure that takes the label and the message and prints it to the terminal.
All values except the postcode should be read as strings, the postcode should be an integer between and
Example output:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started