This id the code a used to answer my Terminal Assignment-based Assessment for the Software Development discipline.
A company has hired you to develop an application that enables a user to check if the provided piece of text conforms to the rules corresponding to the assigned item. The application prompts the user to provide one item (i.e. a piece of text). Next, the application uses the piece of text to determine if the provided text is valid (i.e. the text conforms to the rules assigned to you) or invalid (i.e. the text does NOT conform to those rules). The item assigned to you and the rules that you should implement to determine whether the item is valid or not have been assigned based on the penultimate digit of your student ID number. Please check Table 1 Question 1. a. Item and Rules to Determine the Validity of an Item for details about the functionality assigned to you. Note that the application should work irrespective of how the user provides the piece of text i.e. using upper case letters, lower case letters or a combination of both upper case and lower case letters. Once the piece of text provided by the user is read, the input from the user should be converted to upper case letters, and the converted input will be further checked if it is valid or not. Question 1. a. and Question 1. b. are to be developed in conjunction, Question 1. a. is the instantiable class (ItemChecker), and Question 1. b. is the App class (ItemCheckerApp).
** In my case it was a passport number check application.
a. First, implement in the instantiable class ItemChecker (the instantiable class previously developed at Question 1. a.) another compute method which takes in as a parameter a number. The method should generate/create as many items as the given number and should store those items in an array of String items. The method should return the array of computed items. The items that you should generate and the rules to implement to generate the items in this method have been assigned based on the penultimate digit of your student ID number. Please check Table 3 Question 2. a. Item and Rules to create the Item to find the functionality assigned to you.
b. Next, develop further the application class ItemCheckerApp (the class previously developed at Question 1. b) to use the method defined at Question 2. a. First, prompt the user to provide the number of items they would like to be created. Next, call/invoke/use the method defined at Question 2. a. to create the items according to the functionality assigned to you. Finally, the application should display on the screen the items created by the method implemented at Question 2. a.