You are on page 1of 2

RMIT Classification: Trusted

COSC2666 Programming First Semester 2022 C Programming Assignment


The Secret Message
Assessment
This assignment contributes 20% towards your assessment for Programming and will be
given a mark out of 40 as shown in brackets to the right of the Task List.
It must be your own independent work. You may not hire another author or copy another
person’s work.
Your assignment must not be submitted as a pair or group effort.
The program must be written in C, not C++ or any other language.

The due date for final submission is Sunday 29th May 2022. Late submissions will be
penalised at 10% per day (four marks per day) off the original mark.

You will present, for assessment,


• For windows users, your C program (suffix .c)
or, for Apple users, your Xcode project (suffix .xcodeproj).
• a WORD or pdf file with a flowchart that shows the flow of data through your
program and a screen shot of your program output after it has deciphered a
message.

The names of each of your two files will contain your name and student number.

Do not send your .exe programs. The assessor will compile and run your code.

The Scenario

You want to exchange confidential messages between yourself and a colleague.


You design and write a C program which can create a ciphered message and can decipher a
message using the same key.
You can then share your program with your trusted colleague.
The ciphered message should be difficult to decipher without the proper C program.

Author: Russell Moon, russell.moon@rmit.edu.au. 18/3/2022 1


RMIT Classification: Trusted

Task list and possible marks for completion of the task (in brackets to the right)

The C Program
1. The screen displays a clear description of how to use the program. (2)
2. The user has the option of creating a ciphered message or of deciphering a coded
message. (2)
3. A programmer (you) defined function ciphers the entered plain text message. (2)
4. A programmer (you) defined function deciphers an entered coded message. (2)
5. Switch statements are used in the coder defined functions. (2)
6. A screen display allows the user to view the input data and then to repeat the data
entry if se* thinks that it has errors (is invalid). (2)
7. The program code is laid out neatly with the proper indentation. (2)
8. The program code has at least ten comments explaining the purposes of different
sections of the C code. (2)
9. The program accepts a typed input message of up to 40 characters for ciphering. (2)
10. The program accepts a typed ciphered message of up to 40 characters for
deciphering. (2)
11. The cipher uses at least 40 different keyboard characters. (2)
12. The typed input message is stored as a one-dimensional array. (2)
13. A do...while() loop allows the user to repeat the program if se* chooses to. (2)

The Executable Program


14. A screen shot of the output of your executable program has been submitted. (2)
15. The screen display is clear, neat, and well laid out, based on the use of formatting
characters in the C program. (2)
16. The input data is correctly processed, resulting in valid output. (2)
17. The program is robust (does not crash if invalid data is entered). (2)

The Flowchart
18. The flowchart (which may be drawn free hand), is neatly set out and labelled. (2)
19. The flowchart is logical and uses the correct symbols. (2)
20. The flowchart accurately reflects your program design. (2)

Total 40
*he/she

Author: Russell Moon, russell.moon@rmit.edu.au. 18/3/2022 2

You might also like