quiz حل الأسئلة الجامعية manage_search الأرشيف

تم الحل ✓
categoryهندسة الحاسبات schoolبكالوريوس event_available2026-07-15

السؤال

Transcribed Image Text:

70:-1 Assignment 1 edited Cryptography with Strings and Character Arrays 1.1 Cryptography: الخلف Cryptography is a collection of technique to change the original message to secure a communication between two parties. "This field involves the process of encryption, in which a message, called plaintext, is converted into a scrambled message, called cipher text. It also involves decryption, turning a cipher text back into its original plaintext"(1). One simple type of encryption is to substitute each letter in the plaintext with another letter e.g. substitute each letter with the letter following it by one, two or any number of letters. If each letter will be substituted with the one after it, A will be substituted by B, B will be substituted by C... and so on. Finally, Z will be substituted with A. :(Example(1 letter plain text: hi welcome back cipher Text: ij xfmdpnf cbdl Example(4 letters): plain text: hi welcome back cipher Text: Im aipgsqi fego 1.2 Write a pseudo code (algorithm steps) for an encoder method that takes the plaintext and a number. The number represents how many letters the cipher letter is far from original letter. The algorithm should generate a cipher text for the plaintext by substituting each letter with letter following it by the specified number (5 points). Note: the steps should be written as comments before the next method in the code file. 1.3 Write a method based on your previous answer called encoder that takes a message as plain text and a number. The method should encrypt the message by substituting each letter in the message with the letter following it by the specified number. The method should return the cipher text. (20 point) 40:-4 Assignment 1 edited الخلف 1.4 Write a pseudo code (algorithm steps) for a decoder method that takes the cipher text and a number. The number represents how many letters the cipher letter is far from the original letter. The algorithm should generate the original plaintext for a given cipher text by substituting each letter with the letter preceding it by the specified number (5 points). Note: the steps should be written as comment before the next method in the code file. 1.5 Write a method called decoder that takes a message as cipher text and a number representing the cipher key that is used to encrypt the message. The method should return the cipher text to its original plaintext by substituting each letter by the letter before it according to the specified number. The method should return the plaintext. (20 point) Signature: String decoder (string yourVariableName, int your VariableName) Note: the class name should be Cipher 2Linked List Using circular linked list of which each node contains one word, design a method that takes the head of the linked lists and return true if there is a duplicate word.(25 points) Signature: Boolean checkDuplicate (Node<E>> yourVariableName) Note: the class name should be Duplicate 3 Recursion Print a SingleyLinkedList in reverse order by using recursive algorithm. (25 points) Signature: String reverse (Node<E>> your VariableName) Note: the class name should be SingleyLinkedList you can implments your own linked list or use the code provided in the slide

check_circle الجواب — حل مفصل خطوة بخطوة

hourglass_top