Showing posts with label requirements. Show all posts
Showing posts with label requirements. Show all posts

Thursday, March 6, 2008

Build and Manage Clickpaths

Build a Clickpath:
  1. The user has the ability to build a clickpath based on an existing set of functions
    1. In order to successfully build a clickpath, the user has to fill all the required fields. The required field are as follows:
      1. The user should be able to select an Application Name
      2. The user should be able to select a Version
      3. The user should be able to select a System
      4. The user should be able to select a Sub-system
      5. The user should be able to enter a Use Case Name
      6. The user should be able to select an Actor
      7. The user should be able to select a Function(s)
        1. The user should have the ability to search for functions via Basic Search or Advanced Search as described below
        2. The user should be able to choose only one function at a time in order to add the functions in order
    2. The user should have the option to add any notes or comments related to the clickpaths
  2. Once the clickpath has been successfully created, the user will receive an inline verification, with the clickpath information (application name, version, system, sub-system, actor, use case name, and functions) as well as the clickpath ID generated by the system.
Basic Search
  1. The user has the ability to search for clickpaths using one of the four following criteria:
    1. The user can search for a clickpath by entering a clickpath ID
    2. The user can search for a clickapth by entering a use case name
    3. The user can search for a clickapth by selecting a sub-system
    4. The user can search for a clickpath by selecting an actor
    5. The user can choose "contains", "equals", or "start with" option when searching for clickpaths.

Advanced Search
  1. The user has the ability to perform a complex search based on multiple criteria
    1. The user can choose "contains", "equals", or "start with" option when searching for clickpaths
    2. The user can perform a search on any of the following fields:
      1. Application Name
      2. Version
      3. System
      4. Sub-system
      5. Actor
      6. Use Case Name
      7. Function Name
      8. Status Message Name (from a function)
    3. The user can perform a complex search by using "AND" or "OR" operator

Edit Clickpath
  1. The user has the ability to edit a clickpath that already exists in the system
    1. The user will search for the clickapth using either the Basic Search or the Advanced Search
    2. The user is able to select the clickpath he wants to edit
    3. The user will be able to edit the following fields:
      1. Application Name
      2. Version
      3. System
      4. Sub-system
      5. Use Case Name
      6. Actor
      7. Functions
        1. The user will have the ability to re-order the already chosen functions
        2. The user will have the ability to remove functions from the list
        3. The user will have the ability to add new functions to the list
      8. Any additional notes or comments
  2. Once the clickpath has been successfully modified, the user will receive an inline verification, with the clickpath information: application name, version, system, sub-system, actor, use case name, clickpath ID and functions

Remove Clickpath
  1. The user has the ability to remove a clickpath(s) from the system
    1. The user will search for the clickpath(s) using either the Basic Search or the Advanced Search
    2. The user has the ability to select the clickpath(s) from the search results and choose to remove them

Sample Java code for fun

I was given a set of requirements that I can quote:
write me a program that reverses the order of a sentence

Does that mean the sentence is reversed in terms of each letter? Or is it each word? Or is it each word reversed? Well, I did one of each for kicks.

So here is each piece. Enjoy.

package com.blogpost.revolutioniselouder;


public class Main
{
/**
* This function reverses all letters in a string
* @param s string to reverse
* @return a string with all letters in reverse order
*/
public String reverseAllLetters( String s )
{
StringBuffer stringToReturn = new StringBuffer( s );

// Use the StringBuffer's reverse function to reverse all letters
stringToReturn = stringToReturn.reverse();

return stringToReturn.toString();

}

/**
* This function takes a string and a separator, splits the string and then individually
* reverses each of the letters. Keep in mind that punctuation will be reversed as well
* _if_ it is not used as the separator.
* @param s String to reverse words
* @param separator the pattern to split the string by
* @return a String with every word reversed. For example if the String is 'car cat', the returning
* reult is 'rac tac'.
*/
public String reverseLettersInAWord( String s, String separator )
{
StringBuffer stringToReturn = new StringBuffer();
// split the string using separator passed in
String[] splitStrings = s.split( separator );

/* cycle through the split strings, reverse their letters, re-generate string */
for ( int i = 0; i < face="courier new"> {
stringToReturn.append(reverseAllLetters( splitStrings[ i ] ) );
stringToReturn.append( separator );
}
return stringToReturn.toString();
}

/**
* Reverses Words in a string. If a string is 'car cat', the reversed string owuld be
* 'cat car'
* @param s String to reverse words
* @param separator the pattern to separate the words by
* @return String with words in reversed order
*/
public String reverseWords( String s, String separator )
{
StringBuffer stringToReturn = new StringBuffer();
String[] splitStrings = s.split( separator );

/* Take the last word, add it to the beginning of new string and continue until the split original string is parsed through */
for ( int i = splitStrings.length; i > 0; i-- )
{
stringToReturn.append( splitStrings[ i - 1 ] );
// add separator, so string looks normal
stringToReturn.append( separator );
}
return stringToReturn.toString();
}

/**
* Try some simple testing with one string for each string.
*/
public static void main( String [] args )
{
String s = "Never in the field of human conflict was so much owed by so many to so few.";
Main m = new Main();
System.out.println( m.reverseAllLetters(s) );

System.out.println( m.reverseLettersInAWord( s, " " ) );

System.out.println( m.reverseWords( s, " " ) );
}

}

Hopefully, the output will be proof enough:

.wef os ot ynam os yb dewo hcum os saw tcilfnoc namuh fo dleif eht ni reveN
reveN ni eht dleif fo namuh tcilfnoc saw os hcum dewo yb os ynam ot os .wef
few. so to many so by owed much so was conflict human of field the in Never

Lets hope that meets the requirements.

Add and Manage Functions.

Add a Function:
  1. The user will be able to add functions into the database.
    1. In order to successfully add a function, the user has to fill all the required fields. The required field are as follows:
      1. The user should be able to select an Application Name
        1. If the application name does not exist on the list, the user will have the ability to add a new application name.
      2. The user should be able to select a Version
        1. If the version does not exist on the list, the user will have the ability to add a new version.
      3. The user should be able to select a System
        1. If the system does not exist on the list, the user will have the ability to add a new system.
      4. The user should be able to select a Sub-system
        1. If the sub-system does not exist on the list, the user will have the ability to add a new sub-system.
      5. The user should be able to enter a Function Name
      6. The user should be able to select an Actor
        1. If the actor does not exist on the list, the user will have the ability to add a new actor.
      7. The user should be able to enter a Status Message
    2. The user should have the option to add any notes or comments related to the function
  2. Once the function has been successfully added, the user will receive an inline verification, with the function information: application name, version, system, sub-system, function name, actor, status message.
NOTE: we are assuming users will not entering helper function.


Basic Search
  1. The user has the ability to search for functions using one of the four following criteria:
    1. The user can search for a function by entering a function name
    2. The user can search for a function by entering a status message
    3. The user can search for a function by selecting a sub-system
    4. The user can search for a function by selecting an actor
    5. The user can choose "contains", "equals", or "start with" option when searching for functions.

Advanced Search
  1. The user has the ability to perform a complex search based on multiple criteria
    1. The user can choose "contains", "equals", or "start with" option when searching for functions
    2. The user can perform a search on any of the following fields:
      1. Application Name
      2. Version
      3. System
      4. Sub-system
      5. Actor
      6. Function Name
      7. Status Message
    3. The user can perform a complex search by using "AND" or "OR" operator

Edit Function
  1. The user has the ability to edit a function that already exists in the system
    1. The user will search for the function using either the Basic Search or the Advanced Search
    2. The user is able to select the function he wants to edit
    3. The user will be able to edit the following fields:
      1. Application Name
      2. Version
      3. System
      4. Sub-system
      5. Function Name
      6. Actor
      7. Status Message
      8. Any additional notes or comments
  2. Once the function has been successfully modified, the user will receive an inline verification, with the new function information: application name, version, system, sub-system, function name, actor, status message.

Remove Function
  1. The user has the ability to remove a function(s) from the system
    1. The user will search for the function(s) using either the Basic Search or the Advanced Search
    2. The user has the ability to select the function(s) from the search results and choose to remove them