-
November 6th, 2009, 06:45 AM
#1
Help with C# console application
Hello,
I need help with creating a console application on C# If somebody can help I will be very thankful! Here is my exercise:
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of
places down the alphabet. This example is with a shift of three, so that a B in the plain text
becomes E in the cipher text. In cryptography, a Caesar cipher, also known as a Caesar's
cipher, the shift cipher, Caesar's code or Caesar shift, is one of the simplest and most widely
known encryption techniques. It is a type of substitution cipher in which each letter in the
plaintext is replaced by a letter some fixed number of positions down the alphabet. For
example, with a shift of 3, A would be replaced by D, B would become E, and so on. The
method is named after Julius Caesar, who used it to communicate with his generals.
American Standard Code for Information Interchange (ASCII) is a character encoding based
on the English alphabet and it is included in UNICODE standard. ASCII includes definitions
for 128 characters: 33 are non-printing, mostly obsolete control characters that affect how text
is processed; 94 are printable characters (the space is not printable). The ASCII character
encoding is used on nearly all common computers, especially personal computers and
workstations.
Develop a static class with two methods, one for encoding and one for decoding. Both
methods take a string as parameter and return the processed string. You develop an algorithm
that substitutes a given character with one with 4 places down in alphabet and another that
decodes the ciphered text. Create a Console application that tests your methods.
Thanks in advance!
-
November 6th, 2009, 12:56 PM
#2
Re: Help with C# console application
No one here is going to do your homework for you.
-
November 8th, 2009, 04:34 PM
#3
Re: Help with C# console application
It has been seen thousend of times that its no help to do your work for you. In real life you need to do your job and nobody can do it for you. If someone does the work for you, you will not be able to see your own problems, you will not be able to learn of your mistakes and you will stay unable to solve this easy and bigger problems in future. Cheating alwasy is cheating yourself.
Jonny Poet
To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
If anyone felt he has got help, show it in rating the post.
Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
My latest articles :
Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7
-
November 9th, 2009, 02:48 PM
#4
Re: Help with C# console application
The solution is already given, you just need to write the code. Just write it.
Develop a static class with two methods, one for encoding and one for decoding. Both
methods take a string as parameter and return the processed string. You develop an algorithm
that substitutes a given character with one with 4 places down in alphabet and another that
decodes the ciphered text. Create a Console application that tests your methods.
-
November 9th, 2009, 04:44 PM
#5
Re: Help with C# console application
I've got the answer. I solved this very one last night.
-
November 10th, 2009, 11:52 AM
#6
Re: Help with C# console application
I had to do a project similar to this once. This requires a little more work, but you can make an array with the ACSII Codes and reference the array. You can use google to find a list that is easily formattable for putting it in an array in c#.
Good Luck.
- It's a long way to the top if you want to rock n' roll - AC/DC
Check out my band and support the music:
www.blueruinmusic.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|