The Central Bank has hired you to develop an application to validate aliases/usernames for the customer accounts of a selection of Irish banks. The application prompts the user to provide

Question 1. The Central Bank has hired you to develop an application to validate aliases/usernames for the customer accounts of a selection of Irish banks. The application prompts the user to provide one single line of text with the customer’s alias at a time. This may be repeated based on the specific rules described below. The purpose of the application is to validate the inputted alias and return whether it meets all of the rules assigned to you. The rules that you should use to validate the alias have been assigned based on the penultimate (i.e. second to last) digit of your student ID number. Please check Table 1Question 1. a. Rules to Validate a customer alias to identify the rules assigned to you.

Note:. Question 1. a. and Question 1. b. are to be developed in conjunction, Question 1. a. is the instantiable class (ValidPass) and Question 1. b. is the App class (ValidPassApp).

a. Develop an instantiable class, named ValidPass, for this application which contains:

·       A class definition

·       Suitable data members (instance variables)

·       A constructor

·       A setter method to set the given alias

·       A compute method to validate the alias according to the rules assigned to you in Table 1. Note: This method should demonstrate the use of programming concepts covered in our module. Marks will not be awarded for solutions that use concepts and data types/classes which have not been addressed/covered in our module. This is a submission requirement.

·       A getter method to return whether the alias is valid/not valid

The source code should be commented throughout highlighting and explaining where the key functionality is being addressed.

Note: The application should work irrespective of how the user provides the customer alias i.e. using upper case letters, lower case letters or a combination of both upper case and lower case letters

(30 marks)

£  Assigned Rules to Validate the Alias: The rules that you should use to validate the alias are assigned in Table 1 Question 1. a. Rules to Validate a customer alias.The rules are assigned based on the penultimate digit of your student ID. IMPORTANT: This is a submission requirement. If the incorrect rules are implemented, no marks will be provided for that functionality.

Table 1 Question 1. a. Rules to Validate a customer alias.

Penultimate (i.e. second
to last) digit of your student ID

Alias Rules ID

Rules to Validate
a customer alias

Examples

(Given alias
and corresponding validation result)

1

       OR

4  

       OR

7

       OR

0

 

 

AR1

Allied
Irish Bank (AIB)

The given
24-character alias should be in the following structure:

           AIBxx49210955ddddddddcvn

Note:
Any letter can be in either upper case or lower case in the provided alias.

 

The alias is
validated as follows:

a)      The
alias starts with the three letters of the banks acronym

           AIBxx49210955ddddddddcvn

 

b)      The
next two characters should be digits (x) in the range 0 – 9

           AIBxx49210955ddddddddcvn

 

c)       The
next 8 characters are specific to AIB, these should be the same for each AIB
alias checked

           AIBxx49210955ddddddddcvn

 

d)      The
next 8 characters should be digits (d) in the range 0 – 9, representing the
account number

           AIBxx49210955ddddddddcvn

 

e)      The
last section of the alias relates to the cvn, these should be digits in the
range 0 – 9, but can only be in ascending order

           AIBxx49210955ddddddddcvn

 

For
example, if the instantiable class receives:

·       The
alias “aiB004921095512345678257″, then the compute method should return VALID.

 

·       The
alias “AiB004921095565271283578″, then the compute method should return VALID.

 

·       The
alias “aiB004921095512345678253″, then the compute method should return
NOT VALID

 

·       The
alias “BiB004921095512345678253″, then the compute method should return
NOT VALID

 

·       The
alias “aiB00421095512345678253″, then the compute method should return
NOT VALID

 

 

2  

       OR

5

       OR

8  

AR2

Bank
of Ireland (BOFI)

The given 24-character
alias should be in the following structure:

           54326740BOFIxddddddddcvn

Note:
Any letter can be in either upper case or lower case in the provided alias.

 

The alias is
validated as follows:

a)      The
alias starts with 8 characters that are specific to BOFI, these should be the
same for each BOFI alias checked

           54326740BOFIdddddddddcvn

 

b)      The
next 4 characters are the four letters of the banks acronym

           54326740BOFIxddddddddcvn

 

c)       The
next character should be a single digit (x) in the range 0 – 9

           54326740BOFIxddddddddcvn

 

d)      The
next 8 characters should be digits (d) in the range 0 – 9, representing the
account number

           54326740BOFIxddddddddcvn

 

e)      The
last section of the alias relates to the cvn, these should be digits in the
range 0 – 9, but must be the same digit

           54326740BOFIxddddddddcvn

 

For
example, if the instantiable class receives:

·       The
alias “
54326740BOFI367229854333“,
then the compute method should return VALID.

 

·       The
alias “
54326740BofI489334521999“,
then the compute method should return VALID.

 

·       The
alias “
54326740BofI489334521998“,
then the compute method should return NOT VALID

 

·       The
alias “
54326740BoI489334521999“,
then the compute method should return NOT VALID

 

·       The
alias “
543267b0BofI489334521666“,
then the compute method should return NOT VALID

 

3

       OR

6  

       OR

9

AR3

Ulster
Bank (UB)

The given 24-character
alias should be in the following structure:

           49556891ddddddddUBxxxcvn

Note:
Any letter can be in either upper case or lower case in the provided alias.

 

The alias is
validated as follows:

a)      The
alias starts with 8 characters that are specific to UB, these should be the
same for each UB alias checked

           49556891ddddddddUBxxxcvn

 

a)      The
next 8 characters should be digits (d) in the range 0 – 9, representing the
account number

           49556891ddddddddUBxxxcvn

 

 

b)      The
next 2 characters are the 2 letters of the banks acronym

           49556891ddddddddUBxxxcvn

 

c)       The
next characters should be three digits (x) in the range 0 – 9

           49556891ddddddddUBxxxcvn

 

d)      The
last section of the alias relates to the cvn, these should be digits in the
range 0 – 9, but can only be in descending order

           49556891ddddddddUBxxxcvn

 

For
example, if the instantiable class receives:

·       The
alias “
4955689134523890uB349651“,
then the compute method should return VALID.

 

·       The
alias “
4955689184122810ub342753“,
then the compute method should return VALID.

 

·       The
alias “
4955689134523890UB349659“,
then the compute method should return NOT VALID

 

·       The
alias “
4655689134523890uB349651“,
then the compute method should return NOT VALID

 

·      
The alias
4955689134523890xB349651“,
then the compute method should return NOT VALID

 

Example: A student with the student ID = 22987654 would validate aliases using the rules identified by AR2 (because the penultimate digit of that student ID is 5).

b. Develop an application that uses the instantiable class ValidPass(the instantiable class previously developed at Question 1. a.) to validate aliases. The application should allow a user to enter multiple customer aliases. In order for the application to allow entering multiple aliases to be validated, please refer to Table 2Approaches to entering multiple aliases to be validated. The approach you have to implement has been assigned to you based on the last digit of your student ID number. The application will display on the screen the alias validation status (Valid/Not Valid), based on the entered alias, and appropriate rules. In the application class, please add a short comment for each method of the ValidPass class that you use/call in your application to explain why that method is needed.

Name the application class ValidPassApp.

(20 marks)

£  Approach for entering multiple aliases to be validated: Use Table 2Approaches to entering multiple aliases to be validated. Based on the last digit of your student ID find the approach you have to implement in your application.

IMPORTANT: This is a submission requirement. If the incorrect approach is implemented, no marks will be provided for that functionality.

Table 2 Approaches to entering multiple aliases to be validated.

Last
digit
of
your student ID

Approach
ID

Approaches
to entering multiple aliases to be validated (MAA)

0      OR

2      OR

4      OR

6      OR

8

MAA1

Ask the user at the beginning of the
application how many aliases they would like to validate and ensure that the
application enables the user to provide that amount of aliases and that each alias
is validated accordingly.

1      OR

3      OR

5      OR

7      OR

9

MAA2

Ask the user to provide an alias and after
the corresponding alias is validated and displayed on the screen, ask the
user if they would like to validate another alias. As long as the user enters
“yes” the application should work as described in the previous sentence. When
the user enters anything other than “yes”, no further aliases are validated.

Example: A student with the student ID = 22987654 would implement the approach corresponding to MAA1 (because the last digit of that student ID is 4).

Question 2. Further develop the application as follows:

a. First, implement in the instantiable class ValidPass(the instantiable class previously developed at Question 1. a.) another method which takes in as parameters (i) the number of passwords to be generated, and (ii) an array of  numbers between 11 and 19 to be used in a modulo/remainder calculation as part of the password generation for each of the passwords e.g., if 3 passwords are to be generated, then the array should contain 3 different numbers between 11 and 19 inclusive. The method should generate the required number of passwords. The method should return a one-dimensional array of String passwords. The Password Rules ID has been assigned based on the penultimate digit of your student ID number. Please check Table 3Question 2. a. Password Generator Rules to identify the functionality (PWD1 or PWD2) assigned to you.

Note: this method should demonstrate the use of programming concepts covered in our module. Marks will not be awarded for solutions that use concepts and data types/classes which have not been addressed/covered in our module. This is a submission requirement.

The source code should be commented throughout highlighting and explaining where the key functionality is being addressed.

(20 marks)

Method: You are required to implement the functionality assigned to you in Table 3 Question 2. a. Password Generator Rules. The functionality is assigned based on the penultimate digit of your student ID. IMPORTANT: This is a submission requirement. If the incorrect functionality is implemented, no marks will be provided for that functionality.

Table 3 Question 2. a. Password Generator Rules

Penultimate (i.e. second
to last) digit of your student ID

Password Rules ID

Rules to Create
the Password

Example

1

       OR

2

       OR

3

       OR

4

       OR

5

PWD1

The method
should create a password as follows. The password is a variable length code (i.e.,
a piece of text/String) formed from digits, special characters and upper case
letters

·       Using
the number 49210955, calculate the remainder based on the number entered in
the input.

·       Followed
by an ‘@’ symbol

·       Followed
by 6 upper case letters, selected at random from the English alphabet.

·       Note
that a digit or a letter can appear more than once in a password.

 

The password
should follow the  following format:

 

      moduloremainder@LLLLLL

           

For example:

·       if
the number to be used to generate the array for example 3, is passed in as an
argument in the compute method, then the method should create and return an
array with 3 passwords.

 

·       the
numbers passed in as an argument in the compute method should be used for
calculating the remainder for the corresponding password.

 

Examples of generated passwords:

 

o  
“3@XWTQAB”

o  
“5@LGPTSZ”

o  
“11@LABAIE”

6

       OR

7

       OR

8

       OR

9

       OR

0

PWD2

The method
should create a password as follows. The password is a variable length code (i.e.,
a piece of text/String) formed from digits, special characters and lower case
letters

·       The
password should start with 6 lower case letters, selected at random from the
English alphabet.

·       Followed
by an ‘#’ symbol

·       The
last element of the password is calculated as follows. Using the number
49556891,
calculate the remainder based on the number entered in the input.

·       Note
that a digit or a letter can appear more than once in a password.

 

The password
should follow the  following format:

 

       llllll#moduloremainder

 

For example:

·       if
the number to be used to generate the array for example 3, is passed in as an
argument in the compute method, then the method should create and return an
array with 3 passwords.

 

·       the
numbers passed in as an argument in the compute method should be used for
calculating the remainder for the corresponding password.

 

Examples of generated passwords:

o  
“abqram#4”

o  
“kjypaz#11”

o  
“bbmabx#8”

Example: A student with the student ID = 22987654 would create passwords according to the rules of PWD2 (because the penultimate digit of that student ID is 5).

b. Next, develop further the application class ValidPassApp (the class previously developed at Question 1. b) to use the method defined at Question 2. a. to demonstrate its functionality. First, prompt the user to provide the number of passwords they would like to generate (this should be a minimum of 3). Next, prompt the user to provide as many numbers (as the number of passwords to be generated) between 11 and 19 to be used in a modulo/remainder calculation as part of the password generation, e.g., if 3 passwords are to be generated, then the array should contain 3 different numbers between 11 and 19 inclusive. Next, call/invoke/use the method defined at Question 2. a. to generate the correct number of passwords according to the functionality assigned to you. Finally, the application should display the passwords computed by the method implemented at Question 2. a above.

(10 marks)

Application Development

The applications should be developed, compiled, and run using a text editor such as TextPad (or similar Text Editor alternative for macOS or Linux users) which enables you to compile and run Java applications.

Note that Java Development Kit (JDK) has to be installed on your machine in order to compile and run your application.

Alternatively, you should be able to access these tools through the Student Virtual Desktop (details available here).

Note: Where user input is required this should be provided via the keyboard. For reading user input from the keyboard, you are required to use the Scanner class in conjunction with System.in. This is a submission requirement.

Deliverables

The Terminal-Assignment Bases Assessment deliverables must be submitted via Moodle, they cannot be submitted by email. You are required to submit the following deliverables:

1) Complete Java source code (.java files) for the questions assigned to you

Submit the complete Java source code as a .zip file via the submission page TABA Source-Code available on the Software Development Moodle page.

2)      A report (in .pdf or .doc format) which includes:

o   The specific digits, mapped to the options/requirements that you have used to develop your application. E.g., 22987654, 5 = AR2/BOFI; 4 = MAA1; 5 = PWD1

o   A description of the input, main processing, and output (IPO) for each of the two main questions

o   The class diagram for your application

§  For creating the class diagram, you can either use an online tool, such as http://app.diagrams.net, or draw it by hand and take a photo

§  Be careful to adhere to appropriate syntax and structure and identify suitable data types for each data member/ instance variable.

o   Note that the entire java source code of your application must also be included as an appendix in your report! Note that the java source code must be included as text (i.e. copy and paste your code in the report, do not take a screenshot of your code!). This is a submission requirement.

Submit the report document via the TABA Report Turnitin submission page available on the Software Development Moodle page.

Marking Scheme

The marks for this assignment will be allocated as follows:

·       Application Implementation (80 marks)

o Question 1. a. (30 marks)

o Question 1. b. (20 marks)

o Question 2. a. (20 marks)

o Question 2. b. (10 marks)

o Note that the implementation evaluation includes the following

§  Fully compiling and executing application with no syntax or logical errors which addresses the full requirements of the application

§  All requirements have been implemented, and the application works according to the specification assigned to you

§  The application produces accurate output

·       Good coding practices and code understanding (13 marks)

o The application should be fully commented throughout highlighting and explaining where the key functionalities of the application are being addressed (10 marks)

o Well formatted and properly indented code. Appropriately named variables, methods, classes using the Java naming conventions (3 marks)

·       Report (7 marks)

o Evidence of designing and planning of the application prior to coding (the report should include the IPO and the class diagram) (7 marks)

NOTE: the examiners reserve the right to conduct mini presentations with a sample of the students, where students will provide answers to questions related to their assignment.