Results 1 to 8 of 8
Like Tree1Likes
  • 1 Post By Fubarable

Thread: Cipher System

  1. #1
    Isaac93 is offline Member
    Join Date
    Dec 2011
    Location
    Malta
    Posts
    6
    Rep Power
    0

    Default Cipher System

    Hi everyone, I have an assignment where I have to create a cipher system. The problem is that all cipher systems' classes and their respective keys have to be managed by a module based on the façade design pattern and I have no idea how to do it? Please I really need help.

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,558
    Rep Power
    23

    Default Re: Cipher System

    First have you studied the façade design pattern and understand what it means to use it in a program design?
    If not, copy the parts you do not understand here and ask questions about it.

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

  4. #4
    Isaac93 is offline Member
    Join Date
    Dec 2011
    Location
    Malta
    Posts
    6
    Rep Power
    0

    Default Re: Cipher System

    Yes I have done an overview of all the design patterns and also found examples but still can't fully understand the question. I have a copy of the assignment sheet the problem is where it comes to both the cipher module and ui model pages 5 and 7. Thanks a lot for the help. https://viewer.zoho.com/docs/g8acci - the assignment sheet

  5. #5
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default Re: Cipher System

    I believe that your assignment tells you what must be done:

    This module should be designed to conform to the Facade Design Pattern which specifies the following
    1. An interface which defines the signature of all methods to be provided by the module.
    2. An implementation class (one or more) which implements the module interface.

    And so I would do just this: figure out what general methods would be needed by all Cipher classes, and create an interface with just those methods. Then have all Cipher classes implement that interface.
    Isaac93 likes this.

  6. #6
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,558
    Rep Power
    23

    Default Re: Cipher System


  7. #7
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default Re: Cipher System

    Quote Originally Posted by Norm View Post
    To the original poster, please notify us if you cross-post the same question in any other forum. No one likes duplicating work that's already been done elsewhere, least of all a volunteer.

  8. #8
    Isaac93 is offline Member
    Join Date
    Dec 2011
    Location
    Malta
    Posts
    6
    Rep Power
    0

    Default Re: Cipher System

    I'm sorry I didn't know I'm sort of new at this. Regarding the façade pattern I think it's working as it suppose to. I have a problem regarding the Key class, I don't know exactly if I have initialise a String a variable in the key superclass. The given question is shown below:
    hierarchy of Keys should be developed to group all common functionality that might be used in different cipher keys. An abstract class called Key should be developed as a basis of all Cipher Keys used by the system. It should at least provide the following methods:

    String toString()
    boolean setValue(String) (set internal state from String parameter if value is valid)
    boolean isValid(String)
    String generateRandom()

    Classes that might subclass Key are:
    NumberKey – holding the key value as an integer. Used for Caesar and Transposition.
    StringKey – which keeps the key as a String. Might also keep a Map for fast reverse
    lookup while deciphering. May be used for Simple Substitution and Vigenère.

    The whole Key hierarchy should be stored in a sub-package called key.

Similar Threads

  1. symmetric cipher help
    By George Lucas in forum New To Java
    Replies: 2
    Last Post: 12-27-2011, 09:21 PM
  2. Cipher Program
    By Shyamz1 in forum New To Java
    Replies: 2
    Last Post: 09-20-2011, 11:28 PM
  3. Caesar Cipher?
    By socboy6579 in forum Advanced Java
    Replies: 5
    Last Post: 10-29-2010, 10:59 PM
  4. How to cipher a string without using Cipher class?
    By arnab321 in forum New To Java
    Replies: 1
    Last Post: 09-08-2009, 11:19 PM
  5. cipher.. Won't work
    By jgonzalez14 in forum New To Java
    Replies: 1
    Last Post: 11-18-2008, 01:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •